BETA

Reference

Limits, headers and error codes shared by every product.

Error Handling

The API uses standard HTTP status codes to indicate success or failure of requests.

Error Response Format:

error.json
{
  "error": {
    "message": "Error description",
    "type": "invalid_request_error",
    "code": "invalid_api_key"
  }
}
400 Bad Request - Invalid request parameters
401 Unauthorized - Missing or invalid API key
403 Forbidden - API key lacks required permissions
404 Not Found - Resource doesn't exist
429 Too Many Requests - Rate limit exceeded
500 Internal Server Error - Server-side error
400 model_type_mismatch · A chat model was sent to embeddings, or an embedding model to chat.
400 tools_not_supported · The request has tools but the model does not support them.
404 model_not_found · The model name does not exist. The message suggests the closest name; see GET /v1/models.
410 model_retired · The model was retired and its name no longer works. The message names the replacement.
503 model_unavailable · The model is temporarily unavailable. Retry shortly.
402 insufficient_balance · Nothing left to pay for the call: your old balance is used up and you have no plan or wallet balance. "Your balance is used up. Subscribe to a plan or top up your wallet at /pricing."
402 usage_limit_exceeded · Your plan's monthly usage is used up and your wallet is empty. The message says when the usage resets, for example: "This month's usage is used up. It resets on 2026-11-13. Top up your wallet or upgrade your plan at /pricing to keep going."
429 concurrency_limit_exceeded · More requests at once than your plan allows: "Too many requests at once for your plan (limit N). Retry shortly." Retry after the Retry-After header.

Retired model names

When a model is retired, its old name keeps working until a sunset date and is served by its replacement. Those responses carry the headers below, so you can find and update the calls before the name answers 410 model_retired.

response headers
Deprecation: @1791277200
Sunset: Fri, 04 Dec 2026 21:00:00 GMT
Link: </models/qwen/qwen3.8-27b>; rel="successor-version"
X-Alapi-Warning: qwen/qwen3.6-27b is retired. Requests are served by qwen/qwen3.8-27b until 2026-12-05; update your model name.

Ready to Get Started?

Generate an API key from your dashboard and start building

Activate account?

Activate this account?