Skip to main content
Each API response has an HTTP status number. Use it to find the next step.

401 Unauthorized

The chat API key is missing, invalid, or no longer active. GET /models does not require a key.
  1. Confirm that the API request sends your Pareto key to Pareto. For a router connection, check the provider key saved in the router.
  2. Remove spaces before or after the key.
  3. Check your account and key in the dashboard.
With a router, your app uses the router’s key and the router uses your Pareto key. A direct API connection uses your Pareto key. If you lost that key, create a replacement and update each connection that used it.

400 Bad Request

The request has an unsupported parameter or an invalid value.
  1. Compare the request with the request parameters.
  2. Remove parameters that are not in the table.
  3. Send only one of max_tokens and max_completion_tokens.
Read error.message, error.code, and error.param for validation details. For example, unsupported_storage means the request sent store: true. Use store: false. streaming_only means the request did not set stream: true: Pareto serves streamed requests only. model_coming_soon means the model is announced but does not accept requests yet. Use a model ID from GET /models. context_length_exceeded means the prompt is too long for the model to start from. Shorten or compact the conversation, then retry. This request is not charged.

429 Too Many Requests

The account has no credits for the request, too many requests were sent at the same time, or the model is at capacity. Read error.code. Avoid immediate repeated retries. If your router has a fallback rule, it can send a request to another provider. See How Pareto works.

502 Bad Gateway

The model request failed, or the model returned a response that Pareto cannot deliver. Retry the request. Read error.code. Before you retry a tool request, check whether the tool already ran.

503 Service Unavailable

The service is temporarily unavailable. Read error.code. Avoid immediate repeated retries. If the error continues, send the request time and X-Request-ID response header to your Pareto contact.

A stream stops before completion

Check for an error event. A successful stream ends with data: [DONE]. Do not treat an incomplete stream as a complete response. If you retry a tool request, first check whether the tool already ran.

The app has no custom base URL field

Use a router integration guide or an app that accepts a custom base URL.

The app requires a different API format

Pareto accepts OpenAI Chat Completions requests. A router may translate another format into Chat Completions. Check the router’s supported formats and test the connection. A direct API connection must use the Pareto format.

Other errors

Send the HTTP status number, request time, and X-Request-ID response header to your Pareto contact. Do not send your API key.