Routescope APIRoutescope API

Errors and Troubleshooting

Authentication, balance, model permission, parameter, timeout, and rate-limit troubleshooting

This page only summarizes issues already mentioned in the API documentation and tutorials. When no exact error code is documented, the issue is described as possible 400, 401, 403, 404, timeout, or request failure.

Common Issues

CategoryPossible SymptomWhat to Check
Authentication failure401Check whether the API Key is missing, whether the full sk- prefix is preserved, and whether you use Authorization: Bearer sk-....
Token unavailable401 / 403Check whether the token is disabled, expired, out of quota, or blocked by IP restrictions.
Insufficient balance403 or request failureCheck wallet balance, top-up records, and consumption changes.
Model missing or not allowed403 / 404Use List Available Models to confirm whether the current token can see the target model.
Incorrect endpoint404Check whether the Base URL matches the tool. Codex/OpenAI-compatible tools usually use https://api.routescope.ai/v1; Claude Code usually uses https://api.routescope.ai.
Parameter error400Check whether protocols are mixed. OpenAI Chat uses messages, Gemini uses contents[].parts[], and Claude Messages requires max_tokens.
Claude Code experimental betas400May appear as context_management: Extra inputs are not permitted. Disable experimental betas as described in the tool guide.
TimeoutTimeoutHigh-resolution images, long video tasks, long text, or slow upstream responses may time out. Query async task status when applicable.
Rate limit429 or request failureRPM, TPM, and concurrency limits follow backend configuration and API responses.

Authentication Failure

Check these first:

  1. The request header should be Authorization: Bearer sk-your-token.
  2. The copied secret should be complete and should keep the sk- prefix.
  3. The token should not be disabled, expired, or blocked by IP restrictions.
  4. The client field should match the tool, such as OPENAI_API_KEY in Codex auth.json and ANTHROPIC_AUTH_TOKEN for Claude Code.

Insufficient Balance

If the key and model are correct but calls still fail, check:

  • Whether current balance is sufficient.
  • Whether recent top-up has completed.
  • Whether usage-log consumption matches expectations.

Model Missing or Not Allowed

Common causes:

  • The model ID was typed incorrectly.
  • The current token restricts available models.
  • The account or group has not enabled the model.
  • The client model is not returned by /v1/models or /v1beta/models.

OpenAI-compatible model list:

curl https://api.routescope.ai/v1/models \
  -H "Authorization: Bearer sk-your-token"

Gemini-native model list:

curl https://api.routescope.ai/v1beta/models \
  -H "Authorization: Bearer sk-your-token"

Parameter Errors

Do not mix protocol fields:

ProtocolCorrect Structure
OpenAI Chat CompletionsPOST /v1/chat/completions, body includes model and messages.
Claude MessagesPOST /v1/messages, body includes model, messages, and max_tokens.
Gemini Generate ContentPOST /v1beta/models/{model}:generateContent, body uses contents[].parts[].
Imagen PredictPOST /v1beta/models/{model}:predict, body uses instances and parameters.
OpenAI-style image editingPOST /v1/images/edits, OpenAI-style editing requires multipart/form-data source image upload.
Doubao Seedream editingPOST /v1/images/edits, reference images are passed through the JSON image field.

Request Timeout

These cases may time out:

  • High-resolution image generation or many images in one request.
  • Long video generation tasks.
  • Slow upstream channels.
  • Oversized request bodies or too many reference images.

For video and async image tasks, save the task ID and query status through task query endpoints or task logs.

Rate Limits

Exact RPM, TPM, and concurrency values follow backend configuration and API responses. The current documentation does not list one fixed rate-limit code, so do not hardcode a single error code in business logic.

How is this guide?

Last updated on