Answer: You create a pairing code by sending a POST request to /api/pair, which creates a short-lived, single-use code for a /auth/connect/:code pairing link. Status: Confirmed Entry: tool/opencode/integrations/create-pairing-code Revision: 3 Digest: sha256:25f53bce9d951357 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:55:29Z Last changed: 2026-11-19T13:34:28Z (code type: — → short-lived, single-use) Last verified: 2026-11-20T13:44:16Z Next check: 2026-11-21T13:44:16Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of endpoint | /api/pair | [1] | 2026-11-20 method | post | [1] | 2026-11-20 code type | short-lived, single-use | [1] | 2026-11-20 operation ID | server.pair | [1] | 2026-11-20 success status | 200 | [1] | 2026-11-20 Sources: [1] opencode. "API | OpenCode". https://opencode.ai/docs/api Role: primary. Accessed: 2026-11-20T13:44:16Z Quote: "post /api/pair Create pairing code" (Supports: endpoint, method) Quote: "Create a short-lived, single-use code for a /auth/connect/:code pairing link." (Supports: code type) Quote: "Operation ID server.pair" (Supports: operation ID) Quote: "200 PairingCode PairingCode" (Supports: success status) Snapshot SHA-256: c91807bd273f8c1b4e42b17b65a46d3e17fc5565dd7e358171b7afe48cf0de5c (captured 2026-11-18T13:37:54Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-18T13:37:55Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:44:16Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:44:16Z Last attempt: 2026-11-20T13:44:16Z Notes and limitations: Extracted automatically from a single official source (section "Server"). Related: https://latestn.com/tool/opencode/integrations/customize-effect-layers How do I customize or provide layers in the opencode Effect SDK? https://latestn.com/tool/opencode/integrations/define-gui-plugin How do I define a GUI plugin for opencode? https://latestn.com/tool/opencode/integrations/define-rpc-methods-errors-events How do I define RPC methods, errors, and events in an opencode plugin? https://latestn.com/tool/opencode/integrations/create-effect-client How do I create an Effect client for the opencode HTTP API? https://latestn.com/tool/opencode/integrations/create-effect-host How do I create an opencode host with the Effect SDK? https://latestn.com/tool/opencode/integrations/create-host How do I create an embedded opencode host in my application? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-19T13:34:28Z | changed | code type: — → short-lived, single-use | [1] 2026-11-19T13:34:28Z | changed | description: Create a short-lived, single-use code for a /auth/connect/:code pairing link. → — | [1] 2026-11-14T13:41:46Z | changed | success status: — → 200 | [1] 2026-11-14T13:41:46Z | changed | operation ID: — → server.pair | [1] 2026-11-14T13:41:46Z | changed | description: — → Create a short-lived, single-use code for a /auth/connect/:code pairing link. | [1] 2026-11-14T13:41:46Z | changed | method: — → post | [1] 2026-11-14T13:41:46Z | changed | endpoint: — → /api/pair | [1] 2026-11-14T13:41:46Z | changed | Success response type: PairingCode → — | [1] 2026-11-14T13:41:46Z | changed | Operation ID: server.pair → — | [1] 2026-11-14T13:41:46Z | changed | Description: Create a short-lived, single-use code for a /auth/connect/:code pairing link → — | [1] 2026-11-14T13:41:46Z | changed | Method: post → — | [1] 2026-11-14T13:41:46Z | changed | Endpoint: /api/pair → — | [1] 2026-11-13T03:55:29Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/opencode/integrations/create-pairing-code/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/opencode/integrations/create-pairing-code POST: https://latestn.com/dispute/tool/opencode/integrations/create-pairing-code with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/opencode/integrations/create-pairing-code?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I create a pairing code with the opencode API? Revision 3, last verified 2026-11-20T13:44:16Z. https://latestn.com/tool/opencode/integrations/create-pairing-code (accessed 2026-11-21T09:50:17Z). @misc{LatestN_tool_opencode_integrations_create_pairing_code_r3, title = {How do I create a pairing code with the opencode API?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/opencode/integrations/create-pairing-code}}, note = {Revision 3; digest sha256:25f53bce9d951357; last verified 2026-11-20T13:44:16Z; accessed 2026-11-21T09:50:17Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/opencode/integrations/create-pairing-code