Two settings. Any agent.
Every tool needs the same two things: a CodingPass Base URL and your key. Paste the key once and every snippet on this page is ready to copy.
Base URLs
Anthropic-compatible
Messages API. Claude Code, Cline and the Anthropic SDKs. No /v1 at the end.
OpenAI-compatible
Chat Completions and Responses. Codex, OpenCode and the OpenAI SDKs.
Paste your key, pick your tool.
Stays in this tab. It only fills in the snippets on this page.
Each tool starts with a sensible default. Your plan decides which models answer.
Add the two export lines to ~/.zshrc or ~/.bashrc, open a new shell, then start Claude Code.
export ANTHROPIC_BASE_URL="https://codingpass.ai" export ANTHROPIC_AUTH_TOKEN="cp-live-your-key"
claude --model claude-sonnet-5-5
Check that the key works
List the models your key can reach. A JSON list back means the key and the URL are right; a 401 means the key is wrong.
curl https://codingpass.ai/v1/models \ -H "Authorization: Bearer cp-live-your-key"
Your tool isn’t listed?
Any tool that lets you set an Anthropic or OpenAI Base URL works. Look for a Base URL or custom provider field, paste the URL and your key, and use a model ID from Models.
Still stuck? Write to [email protected] with the tool name and the x-request-id header from the response.
Every error, its status, and what to do.
The gateway answers with a standard HTTP status and the error shape your client already knows. The type is the one Anthropic and OpenAI use, so SDKs handle it as usual; the message is written for people. The error code below shows next to each failed request in the console’s request log.
Two shapes, depending on the endpoint
/v1/messages, /v1/messages/count_tokens)HTTP/1.1 429 Too Many Requests retry-after: 4253 x-should-retry: false x-ratelimit-remaining-5h: 0 x-ratelimit-reset-5h: 1h10m53s x-request-id: req_8f2c41d07ab3 { "type": "error", "error": { "type": "rate_limit_error", "message": "Account limit reached: your 5h quota is used up for all models. Resets at …" } }
/v1/chat/completions, /v1/responses, /v1/models)HTTP/1.1 401 Unauthorized x-request-id: req_5b1f09c2e7d4 { "error": { "message": "Invalid API key", "type": "authentication_error", "param": null, "code": null } }
| Status | Code | When it happens and what to do |
|---|---|---|
| 400Bad request | ||
| 400 | invalid_requestinvalid_request_error | Request body not valid When it happens: The body is not valid JSON, or a required field is missing: How to fix:
|
| 401Authentication | ||
| 401 | invalid_api_keyauthentication_error | API key not accepted When it happens: The key is missing, mistyped, deleted, or sent in a header the gateway does not read. How to fix:
|
| 403Permission | ||
| 403 | no_subscriptionpermission_error | No active plan When it happens: The key is valid, but its account has no active plan: none was bought, it has ended, or a renewal payment failed. How to fix: |
| 404Not found | ||
| 404 / 405 | wrong_base_urlnot_found_error | Wrong Base URL or method When it happens: The request reached the gateway on a path or method it does not serve. Usually the Base URL has an extra or missing How to fix:
|
| 404 | model_not_foundinvalid_request_error | Model not in your plan When it happens: The model ID is misspelled, or the model is not included in your plan. How to fix:
|
| 413Too large | ||
| 413 | body_too_largeinvalid_request_error | Request too large When it happens: The request body is over the gateway’s size limit, usually because of very long context or large attachments. How to fix:
|
| 429Limits | ||
| 429 | quota_exceededrate_limit_error | Allowance used up When it happens: A 5-hour, weekly or monthly cap is reached, for one model or for the whole account. The message names the window and the reset time; How to fix:
|
| 429 | concurrency_limitedrate_limit_errorSafe to retry | Too many requests at once When it happens: Your plan allows a fixed number of requests in flight, and a new one arrived while all of them were busy. How to fix:
|
| 429 | no_upstream_availablerate_limit_errorSafe to retry | Model at capacity When it happens: This model is at capacity right now. How to fix:
|
| 5xxModel provider | ||
| 4xx / 5xx | upstream_errorapi_errorSafe to retry | Model provider returned an error When it happens: The model provider rejected or failed the request, and the gateway passed its status and message through. A 502 means the request still failed after retries. How to fix:
|
| 503Unavailable | ||
| 503 | plan_unavailableapi_errorSafe to retry | Plan check unavailable When it happens: The gateway could not load your plan for a moment. The problem is on our side, not with your key. How to fix:
|
| 503 | quota_unavailableapi_errorSafe to retry | Allowance check unavailable When it happens: The gateway could not read your usage counters, so it refused the request instead of guessing. The problem is on our side. How to fix:
|
| 503 | upstream_unavailableapi_errorSafe to retry | Request could not be served When it happens: The model could not take this request before replying. Retrying usually works. How to fix:
|
| 503 | no_upstreamapi_error | Model not served right now When it happens: The model is in your plan but is not available at the moment. How to fix:
|
| 200 / 499During the reply | ||
| 200 | stream_incompleteapi_errorSafe to retry | Stream cut off When it happens: The reply started with 200 but the stream ended before it was complete, so the client shows a reply that stops partway or an error at the end. How to fix:
|
| 499 | client_aborted | Cancelled by the client When it happens: Your client closed the connection before the reply finished: you pressed Esc or Ctrl+C, the client timed out, or the network dropped. 499 appears only in your request log; the client never receives it. How to fix:
|
Errors marked “safe to retry” are temporary: wait a second or two, or the retry-after seconds, and send the same request again. Most SDKs do this on their own for 429 and 5xx. Everything else needs a change on your side first.
Useful response headers
| Header | Meaning |
|---|---|
| x-request-id | Unique ID of this request, the same one shown in your usage log. Include it when you write to [email protected]. |
| retry-after | Seconds to wait before retrying. Sent with 429 and with temporary 503s. |
| x-should-retry | Sent as false with quota_exceeded: the official Anthropic and OpenAI SDKs then stop retrying on their own, because the wait is a whole window. |
| x-ratelimit-remaining-<window> | Sent as 0 with quota_exceeded. The suffix is the window you hit: 5h, week or month. Whether it's the account or a single model is in the error message. |
| x-ratelimit-reset-<window> | Sent with quota_exceeded: how long until that window frees up, for example 1h10m53s. |
| x-ratelimit-limit-concurrency | Sent with concurrency_limited: how many requests your plan runs at once. x-ratelimit-remaining-concurrency is 0. Not sent when the 429 is about upstream capacity. |