Skip to documentation
DEVELOPER DOCS / HASHBIDXMODEL ACCESS. ONE INTEGRATION.

THE INTEGRATION GUIDE

Error Codes

HTTP status codes give the error category, and the body carries a code for programmatic handling: OpenAI-style endpoints put it in error.code; /v1/messages returns the Anthropic shape, where error.type reflects the status category (e.g. rate_limit_error); the Gemini relay uses error.status. Failures after a stream has started arrive as SSE error events.

HTTP status codes

HTTPCauseWhat to do
200SuccessRequest completed successfully.
400Bad requestCheck the JSON body, required fields, and parameter types.
401Authentication failedCheck the Authorization: Bearer header and confirm the API key is valid, unexpired, and not revoked.
402Insufficient balanceTop up on the Credit page, then retry.
403Access deniedThe key is not team-scoped or lacks inference permission, or the model is outside what the key and your organization's policy allow.
404Resource not foundThe model ID does not exist or is not enabled for your account, or the requested path / resource (such as a video task ID) was not found.
413Request too largeShrink the request body, for example by trimming message history or inline images.
429Rate limitedA request-rate, concurrency, or budget limit was hit, or the upstream is rate limiting. Slow down and retry with exponential backoff.
500Server errorRetry with exponential backoff; include the X-Request-Id when contacting support.
502/503Upstream error or service unavailableThe upstream returned an error or is temporarily unavailable; retry after a short delay.
504Upstream timeoutThe upstream did not respond in time. Retry later, or reduce max_tokens and the input size.

Business error codes

These codes appear in the `error.code` field of OpenAI-style responses.

CodeDescription
invalid_requestMalformed body, missing required field, or parameter out of range.
context_length_exceededThe input exceeds the model's context length.
content_policy_violationThe upstream rejected the request under its content policy.
invalid_api_keyThe API key is invalid or has been revoked.
insufficient_balanceAccount balance is too low; top up to continue.
permission_deniedThe key is not team-scoped and cannot call inference endpoints.
model_not_entitledYour API key or organization policy does not allow this model.
model_not_foundThe requested model is not available or the name is incorrect.
rate_limit_exceededToo many requests; slow down and retry with backoff.
concurrency_limit_exceededToo many requests in flight; wait for some to finish.
budget_exceededA budget limit has been reached.
upstream_rate_limitedThe upstream is rate limiting; back off and retry.
upstream_errorThe upstream returned an error.
upstream_unavailableThe upstream is temporarily unavailable.
upstream_timeoutThe upstream timed out.
stream_errorThe stream failed midway (appears only in SSE events).

Always include the X-Request-Id response header value when reporting issues.

BUILD WITH HASHBIDX

Find your model. Make your first call.

Models & pricing