Skip to main content
Begin with this minimal check to separate account or network problems from bugs in your application code.
If it returns a model list, your base URL, network connection, and key are working.

Quick diagnosis

401: unauthorized

Use exactly this header shape:
Check that:
  • There is one space after Bearer.
  • The key was copied completely with no quotes or trailing whitespace.
  • The key has not been revoked.
  • Your environment variable is available to the running process.
Confirm only that a value exists without printing the secret:
If needed, revoke the old key and create a new one in the dashboard.

400: bad request

A minimal valid body is:
Common mistakes:
  • Single quotes or missing commas in JSON
  • messages sent as an object instead of an array
  • Missing role or content
  • Unsupported model value
  • Sending a JSON string inside another JSON object
  • Forgetting Content-Type: application/json
Compare your request with the API reference.

404: not found

Use:
With an SDK, the base URL ends at /v1:
With direct HTTP, add the endpoint:
Do not add /v1 twice.

429: rate limited

Wait before retrying. Repeated immediate retries make the problem worse.
  • Respect Retry-After when present.
  • Use exponential backoff and a small random delay.
  • Limit concurrency in loops and background jobs.
  • Stop after a small number of failed attempts.
See Limits and pricing for an example.

Timeout or connection failure

  1. Confirm the URL begins with https://.
  2. Run the model-list cURL check from the same machine.
  3. Check whether a proxy, VPN, firewall, or hosting provider blocks outbound HTTPS.
  4. Set a reasonable client timeout such as 30 seconds.
  5. Retry temporary failures a limited number of times.
A connection error means no valid HTTP response was received. A 500 or 503 means the API did respond but could not complete the request.

SDK uses the wrong service

The most common configuration error is forgetting the custom base URL.
Note the naming difference: Python uses base_url; JavaScript uses baseURL.

Streaming shows nothing

Confirm all three conditions:
  1. The request includes stream: true.
  2. Your code iterates over chunks instead of waiting for a normal completion object.
  3. Your terminal or web server flushes output instead of buffering it.
Begin with an SDK streaming example from Code examples before implementing raw SSE parsing.

Before contacting support

Collect:
  • Approximate time of the failed request and your timezone
  • HTTP status code
  • Error type, code, and message
  • Endpoint and SDK name/version
  • A minimal request with private data removed
Never send your full API key. Redact it as sk_kiwi_...last4.

Contact support

Email support@llm.kiwi with the safe diagnostic details above.

Error reference

Look up status-specific behavior.
Last modified on July 28, 2026