Answer: You authenticate by replacing with a personal API key or a service account key created in the Console, sent as an Authorization: Bearer header. Paid models require the header. Status: Confirmed Entry: tool/opencode/permissions-and-security/inference-api-authentication Revision: 2 Digest: sha256:1579f6ebac368ce9 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:56:45Z Last changed: 2026-11-19T13:35:41Z (Free-tier restriction: — → HTTP 403) Last verified: 2026-11-20T13:45:50Z Next check: 2026-11-21T13:45:50Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Header format | Authorization: Bearer | [1] | 2026-11-20 Token type | personal API key or a service account key | [1] | 2026-11-20 Header requirement | Paid models require the header. | [1] | 2026-11-20 Free-tier restriction | HTTP 403 | [1] | 2026-11-20 Sources: [1] opencode. "Inference API | OpenCode". https://opencode.ai/docs/console/api/inference/ Role: primary. Accessed: 2026-11-20T13:45:50Z Quote: "Authorization: Bearer " (Supports: Header format) Quote: "Replace with a personal API key or a service account key created in the Console" (Supports: Token type) Quote: "Paid models require the header." (Supports: Header requirement) Quote: "other clients receive HTTP 403" (Supports: Free-tier restriction) Snapshot SHA-256: e1da61312d81fefce7e76b803741ed679160de4364b224489538394584ff700c (captured 2026-11-19T13:35:41Z) 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-19T13:35:41Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T13:45:50Z. No independent second source is configured for this entry Last successful check: 2026-11-20T13:45:50Z Last attempt: 2026-11-20T13:45:50Z Notes and limitations: Extracted automatically from a single official source (section "Authentication"). Related: https://latestn.com/tool/opencode/permissions-and-security/permission-actions-and-effects What permission actions and effects does opencode support, such as allow, ask, and deny? https://latestn.com/tool/opencode/permissions-and-security/permission-rule-matching-order How does opencode decide which permission rule applies when multiple rules match? https://latestn.com/tool/opencode/permissions-and-security/policies-vs-permissions How do opencode policies differ from permissions? https://latestn.com/tool/opencode/permissions-and-security/console-model-list-authentication How do I authenticate a request to the opencode Console model list API? https://latestn.com/tool/opencode/permissions-and-security/default-agent-permissions How do I set default permissions for opencode agents? https://latestn.com/tool/opencode/permissions-and-security/deny-provider-with-policy How do I deny a provider in opencode using policies? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-19T13:35:41Z | changed | Free-tier restriction: — → HTTP 403 | [1] 2026-11-19T13:35:41Z | changed | Header requirement: — → Paid models require the header. | [1] 2026-11-19T13:35:41Z | changed | Header format: — → Authorization: Bearer | [1] 2026-11-19T13:35:41Z | changed | Free-tier restriction status: HTTP 403 → — | [1] 2026-11-19T13:35:41Z | changed | Paid models requirement: Paid models require the header. → — | [1] 2026-11-19T13:35:41Z | changed | Authorization header: Authorization: Bearer → — | [1] 2026-11-13T03:56:45Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/opencode/permissions-and-security/inference-api-authentication/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/permissions-and-security/inference-api-authentication POST: https://latestn.com/dispute/tool/opencode/permissions-and-security/inference-api-authentication with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/opencode/permissions-and-security/inference-api-authentication?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I authenticate requests to the opencode Inference API? Revision 2, last verified 2026-11-20T13:45:50Z. https://latestn.com/tool/opencode/permissions-and-security/inference-api-authentication (accessed 2026-11-21T09:53:37Z). @misc{LatestN_tool_opencode_permissions_and_security_inference_api_authentication_r2, title = {How do I authenticate requests to the opencode Inference API?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/opencode/permissions-and-security/inference-api-authentication}}, note = {Revision 2; digest sha256:1579f6ebac368ce9; last verified 2026-11-20T13:45:50Z; accessed 2026-11-21T09:53:37Z} } 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/permissions-and-security/inference-api-authentication