API
OpenCode Direct API OpenAI-compatible endpoint to opencode
live

OpenCode Direct API

Talk to opencode's own servers directly with your opencode API key (from opencode.ai/auth). No local installation and no third-party service in the loop.

Base URL

https://opencode-api.boqsc.eu/go/v1

Send your opencode API key as Authorization: Bearer <key>. Go plan is the default.

Zen vs Go plan

opencode has two billing plans. This subdomain proxies both — switch with the path prefix:

Model IDs differ per plan: Go uses opencode-go/deepseek-v4-flash in config (the API accepts the bare model id), Zen uses deepseek-v4-flash.

Try it

Press a button to run a live request.

curl (non-streaming)

curl https://opencode-api.boqsc.eu/go/v1/chat/completions \
  -H "Authorization: Bearer <key>" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-v4-flash","messages":[{"role":"user","content":"Say OK"}]}'

curl (streaming SSE)

curl -N https://opencode-api.boqsc.eu/go/v1/chat/completions \
  -H "Authorization: Bearer <key>" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-v4-flash","stream":true,"messages":[{"role":"user","content":"Count to 3"}]}'

Disable thinking (optional)

DeepSeek thinks by default (extra reasoning content and latency). Turn it off per request by adding "thinking": false to the body — the proxy maps it to reasoning_effort: "none" upstream. "thinking": true (or omitting it) keeps thinking on, and an explicit reasoning_effort (none/low/ medium/high) is forwarded as-is and wins over the toggle.

curl https://opencode-api.boqsc.eu/go/v1/chat/completions \
  -H "Authorization: Bearer <key>" \
  -H "Content-Type: application/json" \
  -d '{"model":"deepseek-v4-flash","thinking":false,"messages":[{"role":"user","content":"Say OK"}]}'

List models

curl https://opencode-api.boqsc.eu/go/v1/models -H "Authorization: Bearer <key>"
Your API key is only sent to this page's same-origin proxy and then straight to opencode. It is never stored server-side. Don't share the key.