Errors and fixes
The format of the error bodies Echo Token Station returns, and the HTTP status, error body and fix for each case (including video generation).
When Echo's API cannot process a request, it returns an HTTP status (a 3-digit number that shows the result) and an error body in JSON.
Check these first
- Base URL:
https://token.echohub.io/v1for the OpenAI format andhttps://token.echohub.iofor the Anthropic format. If the path you call has no/v1, you get 404 even with a correct key (the response is the website's HTML page, not JSON) - API key: in 「APIキー」 (API keys) in the console, check that the key is not stopped and that it has spending limit left
- Balance: check it in 「残高とチャージ」 (Balance and top-up) in the console
- Model ID: check that it matches the ID in the model list
Error body format
Errors are returned in one of two formats, matching the format of the endpoint you called.
| Endpoint | Format |
|---|---|
/v1/messages (Anthropic format) | The same format as the Anthropic API. error.type holds the kind of error |
Others (/v1/chat/completions, /v1/responses and so on) | The same format as the OpenAI API. error.code may hold the kind of error |
Example in the Anthropic format (wrong key):
{"type":"error","error":{"type":"authentication_error","message":"Invalid API key"}}Example in the OpenAI format (insufficient balance):
{"error":{"message":"Insufficient balance","type":"api_error","param":"","code":"insufficient_quota"}}- Decide the kind of error from the HTTP status and
error.type(Anthropic format) orerror.code(OpenAI format). The wording ofmessagecan change, so do not branch on it in your program - For errors returned by the upstream API (the API of the provider that actually runs the model),
messagemay contain the upstream's wording as is - The order of the fields differs between errors
| HTTP status | error.type in the Anthropic format | error.code in the OpenAI format (main values) |
|---|---|---|
| 400 | invalid_request_error | Empty string, invalid_request, the upstream's value (for example context_length_exceeded); for video generation task_not_found, task_not_ready, task_failed, upstream_error |
| 401 | authentication_error | Empty string |
| 403 | permission_error | insufficient_quota (not enough balance or spending limit) |
| 404 | not_found_error | Empty string; for video generation task_not_found |
| 410 | — | artifact_gone (video generation: the provider no longer keeps the file) |
| 429 | rate_limit_error | rate_limit_exceeded |
| 500, 502, 503, 504 | api_error | server_error, service_unavailable, model_not_found |
| 529 | overloaded_error | — |
In the OpenAI format, error.type is mostly api_error for errors that Echo returns. When an upstream error is passed through as is, it holds the upstream's value. On the video generation endpoints (/v1/videos), error.type follows the HTTP status (invalid_request_error for 400, authentication_error for 401, permission_error for 403, not_found_error for 404 and 410, api_error for 500 and above).
Causes and fixes by case
| Case | HTTP status | message in the error body | Fix |
|---|---|---|---|
The path you call has no /v1 | 404 | None (the response is the website's HTML page, not JSON) | Fix the base URL |
The path you call has /v1 twice | 404 | Invalid URL (POST /v1/v1/…) | Fix the base URL |
| You called an endpoint that is not supported | 404 | Invalid URL (POST /v1/…) | Check what is supported in the API reference |
| The key is wrong, missing, stopped, expired or deleted, or has used up its spending limit | 401 | Invalid API key | Check the key's status and spending limit in the console |
| Insufficient balance | 403 | Insufficient balance | Top up |
| The estimated price of this request is more than the key's remaining spending limit | 403 | This API key has reached its spending limit | See Limits and rate limits |
| The model ID is wrong, or Echo does not offer the model | 503 | The model {モデル ID} does not exist or is not available | Check the model ID |
| The request cannot be read as JSON | 400 | Invalid request: invalid JSON request body | Fix the request |
| The request body is larger than 128 MB | 400 | Invalid request: request body exceeds 128 MB: request body too large | Make the request smaller |
| A required field is missing | 400 | Text that includes the field name (for example field messages is required) | Fix the request |
| The input is longer than the model's context length (the number of tokens it can handle at once) | 400 | The upstream's wording (for example prompt is too long: 250000 tokens > 200000 maximum) | Shorten the input |
| You exceeded your account's rate limit | 429 | Rate limit exceeded for your account, please retry after 60 seconds | Wait for the number of seconds in the Retry-After header (60 seconds) and send again |
| Too many requests from the same IP address | 429 | Too many requests from your IP address, please retry after the number of seconds in the Retry-After header | Wait for the number of seconds in the Retry-After header and send again |
| You exceeded the upstream API's rate limit | 429 | The model service is temporarily rate limited, please retry after 60 seconds | Wait for the number of seconds in the Retry-After header (60 seconds) and send again |
| Echo cannot connect to the upstream API | 500 | The model service is temporarily unavailable, please try again later | Wait a little and send again |
| The upstream API returned an error | 500 | The upstream's wording (for example Internal server error) | Wait a little and send again |
| The upstream API returned something other than JSON | 502 | The model service returned an error (HTTP 502), please try again later in the Anthropic format, The model service returned an invalid response, please try again later in the OpenAI format | Wait a little and send again |
| The upstream API is temporarily unavailable, or there is a problem with Echo's account at the upstream API | 503 | The model service is temporarily unavailable, please try again later | Wait a little and send again. Contact us if it continues |
| Echo's server is temporarily stopped or busy (maintenance and so on) | 503 | The service is temporarily unavailable, please try again later | Wait a little and send again |
| The upstream API is overloaded | 529 | Overloaded (Anthropic format) | Wait a little and send again |
| A request that cannot be processed and matches none of the above | 400, 403 | The request could not be completed | Contact us with the request ID |
Video generation errors
Errors specific to video generation (/v1/videos). The steps and the values each model accepts are in Video generation.
| Case | HTTP status and error.code | message in the error body | What to do |
|---|---|---|---|
| A value such as the length or resolution cannot be used with the model | 400, invalid_request or an empty string | An English sentence giving the reason (for example MiniMax-H3 duration must be an integer between 4 and 15 seconds) | Fix the value |
| The provider did not accept the request | 400, upstream_error | The model service rejected the request, check the parameters and try again | Check the values and the URLs of images and other files |
| Wrong task ID, or a task of another account | 400 (404 when downloading the file), task_not_found | Task not found | Check the ID |
| The file was requested before the task completed | 400, task_not_ready | The video is not ready yet | Download after status becomes completed |
| The file of a failed task was requested | 400, task_failed | The video generation failed | Submit again |
| The provider no longer keeps the file | 410, artifact_gone | Artifact content is no longer available | The file cannot be downloaded. Submit again |
Errors returned at submission are free. A task whose generation failed shows status failed when you check its progress, and its price has been refunded in full.
Errors to retry
| Retry | Do not retry |
|---|---|
| 429, 500, 502, 503 (except for a wrong model ID), 504, 529 | 400, 401, 403, 404, 410 |
- Retry with a limit on the number of attempts, waiting a little longer each time
- If there is a
Retry-Afterheader, wait at least that many seconds. 429s caused by your account's rate limit and by the upstream API's rate limit carryRetry-After: 60, 429s caused by the per-IP limit carry the number of seconds to wait, and 503s carryRetry-After: 5(a 503 caused by a problem with Echo's account at the upstream API can carryRetry-After: 60) - A wrong model ID is also returned as 503. In the OpenAI format
error.codeismodel_not_found. In the Anthropic formatmessagecontainsdoes not exist or is not available - The OpenAI and Anthropic SDKs retry 429 and 500-and-above errors up to 2 times by default, so a wrong model ID also fails only after 2 retries. Claude Code keeps retrying for more than a minute (Claude Code)
When streaming stops partway
With streaming (receiving the answer piece by piece), HTTP 200 is returned first and then the answer is sent. If the upstream API then returns an error or the connection is cut, you receive the following (as of 2026-09-27; planned fix: [ ]).
| Format | When the upstream API returns an error partway | When the connection is cut partway | How to check the whole answer arrived |
|---|---|---|---|
| Anthropic format | No error arrives; the answer ends partway | The answer ends partway | message_stop arrives and stop_reason in message_delta has a value |
| OpenAI format (Chat Completions) | Data containing error arrives | It ends with data: [DONE] without any data in which finish_reason has a value | Data in which finish_reason has a value has arrived |
| OpenAI format (Responses API) | Not checked | Not checked | response.completed has arrived |
If the whole answer did not arrive, send the same request again. When the connection is cut, you are charged for what was generated before it was cut (Pricing and top-ups).
Contacting us
Every response that Echo's API processes, successful or not, has a request ID (a number that identifies one call). The same value is in the X-Request-Id and request-id response headers.
| What you use | Where to find the request ID |
|---|---|
| curl | Run with -i and look at the x-request-id header |
| OpenAI Python SDK | _request_id on the response |
| Anthropic Python SDK | _request_id on the response |
Contact us through https://echohub.io/contact with the following information. The contact form is on the Echo AI Hub site and can be used after the member site opens.
- When the error happened (Japan time)
- The request ID
- The model ID and the endpoint path you used
- The key's name (do not send the key itself)
- The HTTP status and the error body
Sources
| What | Source | Checked |
|---|---|---|
Error bodies, HTTP statuses, Retry-After, the request ID headers, the 404 without /v1 (rechecked on 2026-10-11), what arrives when streaming stops partway, SDK retries | Measured in Echo's test environment, with relay settings that align the error body formats and a server that returns test responses in place of the upstream API | 2026-09-27 |
The body and Retry-After of rate-limit 429s, Retry-After on 503, the 400 for requests larger than 128 MB, 401 for keys that have used up their limit and for stopped, expired and deleted keys | Measured in Echo's test environment (same relay settings as production) | 2026-09-28 |
| The per-IP rate limit | Echo relay server settings (as of 2026-09-28) | 2026-09-28 |
Automatic retries and _request_id in the OpenAI SDK | https://github.com/openai/openai-python | 2026-09-27 |
_request_id in the Anthropic SDK (read from the request-id header) | https://github.com/anthropics/anthropic-sdk-python | 2026-09-27 |
| Error types in the Anthropic format | https://platform.claude.com/docs/en/api/errors | 2026-09-27 |
| Error bodies and HTTP statuses of video generation | Measured in Echo's test environment (same relay settings as production, with a server that returns test responses in place of the provider's API) | 2026-10-01 |