Skip to main content
When Hyperbolic can’t accept an inference request, it returns an HTTP error status. Use the status code to decide whether to retry.
  • Authentication, plan, and balance errors (401, 402, 403) return a JSON body with code and message at the top level, as shown below. The status says which kind of problem it is; use the code to decide what to fix.
  • Other errors can come from the API gateway, the model server, or an upstream model provider, and their body format varies. Handle them by HTTP status code. For example, an unknown model ID returns 404 with {"message": "Model not found", "type": "Not Found", "code": 404}.
The OpenAI SDKs raise an exception with the status code for every error.

Authentication, plan, and balance errors

Requests that fail an authentication, plan, or balance check return one of three statuses, each with a code and a readable message:
  • 401: the credential is missing, invalid, or expired.
  • 402: the account or Organization has no credits left.
  • 403: the account’s plan doesn’t include inference.
The message says what to do next and may change. The code doesn’t change, so branch on code in your client. The session_* and account_not_found codes apply to requests from the Model Playground, which uses your dashboard session instead of an API key.
After you upgrade your plan, retry after about 30 seconds. After you add credits, retry after a minute or two.

Other status codes

You aren’t charged for requests that return an error.

Retry with backoff

Retry 429 and 5xx responses, waiting longer after each attempt. Don’t retry 400, 401, 402, or 403 responses, because the same request fails again until you fix it: the request, the credential, the balance, or the plan.
The OpenAI SDKs retry 429 and 5xx responses automatically. Set max_retries (Python) or maxRetries (Node.js) on the client to change how many times.

Next steps

Account management

Create and revoke API keys.

Getting support

Contact the team about persistent errors.