DocsErrors and fixes

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

  1. Base URL: https://token.echohub.io/v1 for the OpenAI format and https://token.echohub.io for 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)
  2. API key: in 「APIキー」 (API keys) in the console, check that the key is not stopped and that it has spending limit left
  3. Balance: check it in 「残高とチャージ」 (Balance and top-up) in the console
  4. 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.

EndpointFormat
/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):

JSON
{"type":"error","error":{"type":"authentication_error","message":"Invalid API key"}}

Example in the OpenAI format (insufficient balance):

JSON
{"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) or error.code (OpenAI format). The wording of message can 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), message may contain the upstream's wording as is
  • The order of the fields differs between errors
HTTP statuserror.type in the Anthropic formaterror.code in the OpenAI format (main values)
400invalid_request_errorEmpty 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
401authentication_errorEmpty string
403permission_errorinsufficient_quota (not enough balance or spending limit)
404not_found_errorEmpty string; for video generation task_not_found
410—artifact_gone (video generation: the provider no longer keeps the file)
429rate_limit_errorrate_limit_exceeded
500, 502, 503, 504api_errorserver_error, service_unavailable, model_not_found
529overloaded_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

CaseHTTP statusmessage in the error bodyFix
The path you call has no /v1404None (the response is the website's HTML page, not JSON)Fix the base URL
The path you call has /v1 twice404Invalid URL (POST /v1/v1/…)Fix the base URL
You called an endpoint that is not supported404Invalid 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 limit401Invalid API keyCheck the key's status and spending limit in the console
Insufficient balance403Insufficient balanceTop up
The estimated price of this request is more than the key's remaining spending limit403This API key has reached its spending limitSee Limits and rate limits
The model ID is wrong, or Echo does not offer the model503The model {モデル ID} does not exist or is not availableCheck the model ID
The request cannot be read as JSON400Invalid request: invalid JSON request bodyFix the request
The request body is larger than 128 MB400Invalid request: request body exceeds 128 MB: request body too largeMake the request smaller
A required field is missing400Text 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)400The upstream's wording (for example prompt is too long: 250000 tokens > 200000 maximum)Shorten the input
You exceeded your account's rate limit429Rate limit exceeded for your account, please retry after 60 secondsWait for the number of seconds in the Retry-After header (60 seconds) and send again
Too many requests from the same IP address429Too many requests from your IP address, please retry after the number of seconds in the Retry-After headerWait for the number of seconds in the Retry-After header and send again
You exceeded the upstream API's rate limit429The model service is temporarily rate limited, please retry after 60 secondsWait for the number of seconds in the Retry-After header (60 seconds) and send again
Echo cannot connect to the upstream API500The model service is temporarily unavailable, please try again laterWait a little and send again
The upstream API returned an error500The upstream's wording (for example Internal server error)Wait a little and send again
The upstream API returned something other than JSON502The 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 formatWait a little and send again
The upstream API is temporarily unavailable, or there is a problem with Echo's account at the upstream API503The model service is temporarily unavailable, please try again laterWait a little and send again. Contact us if it continues
Echo's server is temporarily stopped or busy (maintenance and so on)503The service is temporarily unavailable, please try again laterWait a little and send again
The upstream API is overloaded529Overloaded (Anthropic format)Wait a little and send again
A request that cannot be processed and matches none of the above400, 403The request could not be completedContact 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.

CaseHTTP status and error.codemessage in the error bodyWhat to do
A value such as the length or resolution cannot be used with the model400, invalid_request or an empty stringAn 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 request400, upstream_errorThe model service rejected the request, check the parameters and try againCheck the values and the URLs of images and other files
Wrong task ID, or a task of another account400 (404 when downloading the file), task_not_foundTask not foundCheck the ID
The file was requested before the task completed400, task_not_readyThe video is not ready yetDownload after status becomes completed
The file of a failed task was requested400, task_failedThe video generation failedSubmit again
The provider no longer keeps the file410, artifact_goneArtifact content is no longer availableThe 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

RetryDo not retry
429, 500, 502, 503 (except for a wrong model ID), 504, 529400, 401, 403, 404, 410
  • Retry with a limit on the number of attempts, waiting a little longer each time
  • If there is a Retry-After header, wait at least that many seconds. 429s caused by your account's rate limit and by the upstream API's rate limit carry Retry-After: 60, 429s caused by the per-IP limit carry the number of seconds to wait, and 503s carry Retry-After: 5 (a 503 caused by a problem with Echo's account at the upstream API can carry Retry-After: 60)
  • A wrong model ID is also returned as 503. In the OpenAI format error.code is model_not_found. In the Anthropic format message contains does 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: [ ]).

FormatWhen the upstream API returns an error partwayWhen the connection is cut partwayHow to check the whole answer arrived
Anthropic formatNo error arrives; the answer ends partwayThe answer ends partwaymessage_stop arrives and stop_reason in message_delta has a value
OpenAI format (Chat Completions)Data containing error arrivesIt ends with data: [DONE] without any data in which finish_reason has a valueData in which finish_reason has a value has arrived
OpenAI format (Responses API)Not checkedNot checkedresponse.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 useWhere to find the request ID
curlRun 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

WhatSourceChecked
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 retriesMeasured 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 API2026-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 keysMeasured in Echo's test environment (same relay settings as production)2026-09-28
The per-IP rate limitEcho relay server settings (as of 2026-09-28)2026-09-28
Automatic retries and _request_id in the OpenAI SDKhttps://github.com/openai/openai-python2026-09-27
_request_id in the Anthropic SDK (read from the request-id header)https://github.com/anthropics/anthropic-sdk-python2026-09-27
Error types in the Anthropic formathttps://platform.claude.com/docs/en/api/errors2026-09-27
Error bodies and HTTP statuses of video generationMeasured 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