Error Codes
HTTP status codes and error responses
SilentAPI returns HTTP status codes. Error responses follow the format of the request endpoint.
HTTP Status Codes
| Code | Meaning | What to Do |
|---|---|---|
| 200 | Success | Process the response |
| 400 | Bad request | Check the request body, model name, and parameters |
| 401 | Missing API key | Send your API key in an accepted header |
| 402 | Insufficient credits | Add credits or increase the API key budget |
| 403 | Forbidden | API access may be disabled for your account |
| 404 | Service not found | The model ID does not exist |
| 413 | Input too large | Reduce the request size or image dimensions |
| 415 | Unsupported media type | Use application/json or multipart/form-data |
| 422 | Input rejected | Check the file, encryption, and request parameters |
| 429 | Rate limited | Wait and retry, or reduce request frequency |
| 500 | Internal error | Retry the request, contact support if it persists |
| 502 | Service error | The model returned an error, fallback may apply |
| 503 | Service unavailable | The service is temporarily disabled or overloaded |
Error Response Formats
Every JSON error response uses the format of the API style you call, with the same message in each. OpenAI style errors have message, type, param, and code in the same order as OpenAI, and param is null unless the error names a request field.
OpenAI Style
{
"error": {
"message": "Your balance is too low, add credits and try again.",
"type": "insufficient_balance",
"param": null,
"code": "insufficient_balance"
}
}
Anthropic Style
{
"type": "error",
"error": {
"type": "billing_error",
"message": "Your balance is too low, add credits and try again."
}
}
Gemini Style
{
"error": {
"code": 402,
"message": "Your balance is too low, add credits and try again.",
"status": "FAILED_PRECONDITION"
}
}
| Status | type | code |
|---|---|---|
| 400 | invalid_request_error | invalid_request |
| 401 | authentication_error | api_key_required |
| 402 | insufficient_balance | insufficient_balance |
| 403 | permission_error | forbidden |
| 404 | not_found_error | not_found |
| 409 | conflict_error | conflict |
| 413 | request_too_large | request_too_large |
| 415 | unsupported_media_type | unsupported_media_type |
| 422 | unprocessable_entity | unprocessable_entity |
| 429 | rate_limit_error | rate_limit_exceeded |
| 500 | api_error | internal_error |
| 502, 503, 504 | upstream_error | bad_gateway, service_unavailable, gateway_timeout |
| 504 | upstream_error | time_limit |
Anthropic responses map the status to the Anthropic types, such as billing_error for 402 and rate_limit_error for 429. Gemini responses map it to the Google status strings, such as FAILED_PRECONDITION and RESOURCE_EXHAUSTED. Web, lookup, and crypto errors also carry cost: 0 after the error object.
Common Error Messages
| Message | Cause |
|---|---|
| Your balance is too low, add credits and try again. | The balance cannot cover the request or is zero. |
| This model doesn't exist. | The model ID is unknown and has no compatible match. |
| Prompt is required. | The request prompt is missing. |
| This account has reached its safety limit, contact contact@silentapi.com if you need this raised. | The account API minute limit was reached. |
| This API key has reached its monthly budget. | The key budget was reached. Change it on the Keys page. |
| This service is temporarily disabled. | Select another service. |
| The service is busy, try again shortly. | The service or a shared quota is busy. A 429 response can include Retry-After. |
| The service could not complete the request, try again shortly. | The service failed during the request. |
| The request reached its dynamic time limit and was stopped, it was not charged. | The request ran longer than its time limit, see [ Streaming ]. |
| The request was not accepted, check the parameters and try again. | The request has invalid parameters. |
| The request is too large. | The request is larger than the endpoint allows. |
| The request was blocked by a content filter. | The request was blocked by a content filter. |
| The input is longer than the model context. | The input is longer than the model context. |
| Too many requests, wait a few seconds and try again. | An account action limit was reached. The Retry-After header gives the wait in seconds. |
| An API key is required, send it as a Bearer token or in the x-api-key header. | No accepted API key was sent. |
| Invalid API key, check the key on the API keys page. | The API key is not valid. |
| This API key has expired, create a new key on the API keys page. | The key has passed its expiry date. |
| This API key is disabled, enable it on the API keys page. | The key is disabled. |
| API access is disabled for this account. | API access is disabled. |
This request can cost up to X credits and your available balance is Y credits, add credits or set max_tokens to N or less. | The balance cannot cover the most this request can cost. For text models, N is the largest output the balance covers. |
| This request needs a balance of at least X credits, add credits and try again. | The balance cannot cover the smallest Web Extract or Web Map read. |
| This page needs more bandwidth than your balance covers, add credits and try again. | The page is larger than the bandwidth the balance covers. |
| This model is not available right now. | The model has no active price. |
| Service is not configured. | The service cannot accept requests. |
| Request body is not valid JSON. | Correct the JSON body. |
| Request body is too large. | Reduce the encoded request body. |
| Request body is not valid form data. | Correct the multipart form. |
| A file is required. | Send a file, data URL, or supported HTTPS URL. |
| Image format is required. | Set format for image conversion. |
| Input is required. | Send nonempty moderation input. |
| This model does not support OCR. | Select an OCR model. |
| This model does not support moderation. | Select a moderation model. |
| This model does not create music. | Select a music model. |
| The lookup service is unavailable. | Retry after the wait time in Retry-After. |
| Enter a valid IP address. | The lookup IP address is invalid. |
| Enter a valid email address. | The email lookup input is missing. |
| Too many requests, try again in one minute. | The status endpoint limit was reached. Wait 60 seconds. |
| Case | Status | Notes |
|---|---|---|
| The service is busy | 429 | Includes Retry-After: 5 |
| A shared service quota is reached | 429 | Retry-After gives the wait time of that quota |
| An account limit is reached | 429 | Retry-After can be absent |
| The service rejects the input | 400 or 422 | Check the request parameters |
| The input is too large | 413 | Reduce the request size |
| Content filter or context error | Mapped from the failed request | The message names the cause |
SilentAPI does not return error details from the service.
Old Model IDs
An old model ID runs its configured replacement or the closest model in the same family. An unknown ID with no match returns 404. The response always names the model that served the request.
The response tells you when this happens:
"silentapi": {
"cost": 0.0412,
"fallback": null,
"model": "gpt-image-2.6-flare",
"model_name": "GPT Image 2.6 Flare",
"requested_model": "stable-image-ultra",
"substituted": true,
"notice": "stable-image-ultra is no longer offered. SilentAPI served this request with GPT Image 2.6 Flare, the closest current model."
}
These headers carry the same facts:
| Header | Meaning |
|---|---|
| X-SilentAPI-Model | ID of the model that served the request |
| X-SilentAPI-Substituted-For | Requested model ID. Only present when another model served the request. |
Audio responses have no JSON body, so read the headers there. See Fallbacks for each field of the silentapi object. A 404 means the ID has no close match, and the Services page shows the current list.
Media Error Messages
Media endpoints can return these fixed messages:
| Message | Meaning |
|---|---|
| Forbidden. | The media service did not accept the request. |
| The input is not valid. | The request body or method is not valid. |
| The media options are not valid. | An option has the wrong type or value. |
| The file is too large. | The file or image dimensions exceed the limit. |
| This input format is not supported. | The file type is not supported. |
| The file could not be processed. | The media parser could not read the file. |
| Encrypted files are not supported. | The file is encrypted. |
| Lossless output is not available for this format. | The selected output format cannot be lossless. |
| Only English is available for this OCR model. | OCR accepts English OCR data only. |
| The page selection is not valid. | The page list or range is invalid. |
| A maximum of 50 pages is allowed. | The selected OCR pages exceed the limit. |
| The media service could not complete the request. | The media service reported a failure. |