Go bridge that exposes Qoder through OpenAI-compatible and Anthropic-compatible local APIs.
Supported endpoints:
POST /v1/chat/completions— OpenAI Chat CompletionsPOST /v1/responses— OpenAI Responses (used by Codex CLI)POST /v1/messages— Anthropic Messages (used by Claude Code CLI)
# 1. Login (only needed once or when token expires)
go run ./cmd/qoder2api-login
# 2. Start the bridge
go run ./cmd/qoder2api
# 3. Point your client at http://127.0.0.1:8963go run ./cmd/qoder2api-loginOpens the browser for Qoder authorization. Token is saved to ~/.config/qoder2api/auth.json. After that, start the bridge directly without setting any environment variables.
Custom output path:
go run ./cmd/qoder2api-login -o /path/to/auth.jsonCompatibility mode using auth JSON exported from the Qoder client:
QODER_AUTH_JSON=/absolute/path/to/auth.json go run ./cmd/qoder2apiAccepted JSON shapes:
- Root object containing
securityOauthTokenandrefreshToken - Root object containing
auth_user_info_raw - Array whose first item contains
auth_user_info_raw
Cloud Agents API mode:
QODER_PAT=your_pat go run ./cmd/qoder2apiDefault bind:
http://127.0.0.1:8963
Optional environment variables:
| Variable | Description | Default |
|---|---|---|
QODER_HOST |
Listen address | 127.0.0.1 |
QODER_PORT |
Listen port | 8963 |
QODER_MODEL |
Default model | auto |
QODER_TIMEOUT_SEC |
Request timeout (seconds) | 300 |
QODER_BASE_URL |
Qoder API base URL | https://api.qoder.com |
QODER_WORKSPACE_ROOT |
Workspace path | empty |
QODER_PROXY_URL |
HTTP proxy | empty |
QODER_CA_FILE |
Custom CA certificate | empty |
QODER_INSECURE_SKIP_VERIFY |
Skip TLS verification | false |
PAT mode:
QODER_PAT=your_pat docker compose up --buildAuth JSON mode:
docker build -t qoder2api:local .
docker run --rm -p 8963:8963 \
-e QODER_HOST=0.0.0.0 \
-e QODER_AUTH_JSON=/auth.json \
-v /absolute/path/to/auth.json:/auth.json:ro \
qoder2api:localCodex uses the Responses API with a base URL ending in /v1.
Edit ~/.codex/config.toml:
[model_providers.custom]
name = "custom"
wire_api = "responses"
base_url = "http://127.0.0.1:8963/v1"ANTHROPIC_BASE_URL=http://127.0.0.1:8963 ANTHROPIC_API_KEY=test-key claudeIf settings override the base URL, use --setting-sources local.
QODER_AUTH_JSONuses a compatibility backend derived from official Qoder client traffic. Upstream client/API changes can require updates.- For
QODER_AUTH_JSON, preferQODER_MODEL=autounless you have verified a specific model key. - Anthropic
thinkingblocks are only exposed when the request explicitly enables Anthropicthinking. - For legacy image streaming without explicit client tools,
/v1/messagesuses a compatibility fallback: it aggregates the upstream result and emits valid Anthropic SSE.
go test ./...
go build -o qoder2api ./cmd/qoder2apiThis project is for educational and research purposes only. Use at your own risk. The author is not responsible for any consequences arising from the use of this software, including but not limited to account suspension, data loss, or legal disputes.
Do not use this project for any commercial purpose or in any way that violates the terms of service of Qoder or any third-party service.
Auth JSON files and token files contain live credentials. Never commit them to version control.