Troubleshooting
{baseUrl} means your platform API root without a trailing / or /v1. Replace it with the actual address when checking configuration.
Error reference
| HTTP status | error.code | Meaning and action |
|---|---|---|
| 400 | INVALID_REQUEST | Invalid or missing parameters such as model or prompt. Check the model ID and request format. |
| 401 | — | Missing authorization or an invalid token. Check the full key and the Bearer prefix. |
| 404 | TASK_NOT_FOUND | The task does not exist or belongs to a different API key. |
| 429 | — | Rate limit reached or insufficient balance, depending on the platform response. Reduce concurrency and check your balance. |
| 500 | INTERNAL_ERROR | Internal server error. Retry later. |
| 503 | — | No available upstream channel. Try another permitted group or model. |
Standard error response:
{ "error": { "code": "...", "message": "..." } }
Frequently encountered issues
Q1: 401 token.not_provided
The key was not passed correctly. Check:
- The
Authorizationheader hasBearerfollowed by one space and the key. - The client key is in the API Key field, not Organization ID.
- The key has not expired or been deleted.
Q2: 401 even though the key is correct
Check the credential type. Model endpoints use an sk- model API key. Management endpoints under /api/... use a management access token. They are not interchangeable.
Q3: 404 Invalid URL
The client may have built a URL such as /v1/v1/chat/completions. Review the URL rules: when the client appends /v1, configure only the root URL.
Q4: model not found or no available channel in the group
The model ID may be misspelled, or the selected group may not provide it.
- Use
GET /v1/modelsto check the exact ID. - Check the token's group in the console, or choose automatic grouping if your deployment supports it.
Q5: Claude Code asks you to sign in or subscribe
The environment variables may not have taken effect, or ANTHROPIC_BASE_URL may incorrectly include /v1.
echo $ANTHROPIC_BASE_URL
It should show the root URL represented by {baseUrl}. Confirm that ANTHROPIC_AUTH_TOKEN is set for this configuration, and reopen the terminal if necessary.
Q6: Codex CLI reports a wire_api error
Check the configuration format supported by your Codex version. Use wire_api = "responses" and base_url = "{baseUrl}/v1". The model and upstream must support /v1/responses; do not assume the current version still supports the legacy chat mode.
Q7: Connection succeeds but the model list is empty
Some clients maintain their own model list. Add model IDs manually, or use Sync Models / Check to retrieve them through /v1/models.
Q8: Slow responses or frequent timeouts
The selected group's upstream route may be congested. Choose another available group, such as cn1 or ovip2 if offered by your deployment, or reduce max_tokens.
Q9: Streaming stops unexpectedly
Clients handle SSE differently. Try disabling the client's proxy setting, or use a non-streaming request to isolate the problem.
Q10: No result after submitting an image or video task
Endpoints that return a task_id are asynchronous and require polling. Synchronous image endpoints return the result directly. If a query returns 404 TASK_NOT_FOUND, confirm that the task ID is correct and that the query uses the same API key as the submission.