Skip to main content
When a llm.sg request fails, record the actual HTTP status and error message. Check the request URL, API key, model ID, account state, and parameters.

Common HTTP statuses

These are general diagnostic directions, not a complete llm.sg error specification. Follow the actual error message first.

Missing token

Send your key in the authorization header:
Ensure the environment variable is visible to the process running your application. Browser sign-in does not replace this header. An unauthenticated GET https://api.llm.sg/v1/models check on November 5, 2026 returned 401 and a missing-token message. This verifies the authentication requirement for that endpoint only.

Endpoint and model errors

The API origin is https://api.llm.sg. This draft uses https://api.llm.sg/v1 for compatible SDKs and https://api.llm.sg/v1/chat/completions for direct chat calls; chat compatibility still needs validation. Check whether your client automatically appends /v1. Refresh the available model list and copy the full model ID rather than reusing another platform’s alias. When migrating, start by changing the Base URL, key, and model ID. Verify streaming and optional capabilities separately. Other platforms’ provider controls and special headers need independent confirmation.

Limits and timeouts

For temporary network errors, limits, or some server failures, use bounded exponential backoff with jitter. Follow Retry-After when provided. Correct authentication or parameter errors before retrying. Check the SDK’s automatic retry behavior to avoid multiplying attempts. A timed-out request may still have started processing and another attempt can create additional usage. If streaming appears buffered, check whether stream is enabled, whether your client reads chunks, and whether an intermediate proxy buffers the response.

Report an issue

Use the support channel actually provided by the platform. Include the timestamp and timezone, method and path, model ID, HTTP status, redacted error message, SDK version, and a minimal example. Include a request ID if present, such as the x-request-id header or the ID in the error message. Remove API keys, payment details, and sensitive user input from all shared logs.