Skip to main content
Watch: I Built an AI App Without Leaving Databricks

OpenRouter

OpenRouter errors and fixes

32 OpenRouter errors from the official error docs, grouped by HTTP status, each with what it means, why it happens, the documented fix and whether to retry. Verified .

Error response body

The shape OpenRouter errors come back in, as the official docs show it. Read the status and error type from here before matching an entry below.

Snippet
type ErrorResponse = {
  error: {
    code: number;
    message: string;
    metadata?: Record<string, unknown>;
  };
};

HTTP 400 Bad Request

HTTP 401 Unauthorized

HTTP 402 Payment Required

HTTP 403 Forbidden

HTTP 404 Not Found

HTTP 408 Request Timeout

HTTP 412 Precondition Failed

HTTP 413 Content Too Large

HTTP 422 Unprocessable Content

HTTP 429 Too Many Requests

HTTP 500 Internal Server Error

HTTP 502 Bad Gateway

HTTP 503 Service Unavailable

HTTP 504 Gateway Timeout

Newsletter

Know when the APIs change

One email per week. New model releases, API changes, what broke, and how developers are working around it.