Errors
Every error is an OpenAI-shaped envelope with a stable code. The SDKs raise their usual exception classes by HTTP status; branch on code for anything finer.
Shape
json
{
"error": {
"message": "Your available balance is exhausted. Top up at https://gridport.ai/console/billing?topup=1 to resume.",
"type": "billing_error",
"code": "insufficient_balance",
"param": null,
"request_id": "req_01J…",
"doc_url": "https://gridport.ai/docs/errors#insufficient_balance",
"top_up_url": "https://gridport.ai/console/billing?topup=1"
}
}retryable means an automatic retry with backoff is reasonable. The SDKs retry 5xx and rate_limit_exceeded on their own, and stop when the response carries x-should-retry: false, as quota_exceeded, budget and balance refusals do.
Headers
x-should-retry: false marks a refusal that the same request cannot get past, however long you wait: a quota, budget or balance limit, an invalid key, or a malformed body. Fix the cause before sending again.
Retry-After gives the seconds to wait before a retry can succeed, on 429 rate limits and on retryable 5xx errors. Wait at least that long.
Codes
CodeHTTPTypeRetryWhat to do
invalid_api_keyHTTP 401authentication_errorRetrynoThe key is unknown, mistyped, was deleted or was revoked by GridPort support (the message says which; a support revoke also sets extra.revoked_by and its reason is in the organization audit log). Check the value your client sends, with no quotes or spaces, or create a new key in the console.
api_key_disabledHTTP 401authentication_errorRetrynoThe key is disabled, or its project or owner is no longer active; the message says which. Re-enable it under API keys.
api_key_expiredHTTP 401authentication_errorRetrynoThe key passed its expiry date, or its rotation grace period ended. Use the replacement or create a new key.
ip_not_allowedHTTP 403permission_errorRetrynoThe key has an IP allow-list and the request came from another address. Add the address or its CIDR block under API keys → Edit.
model_not_allowed_for_keyHTTP 403permission_errorRetrynoThe key has a model allow-list; the message lists the models it may call and extra.allowed_models has them as data. Add the model under API keys → Edit.
project_access_deniedHTTP 403permission_errorRetrynoYour account or access token cannot reach this organization or project: you are not a member, the token belongs to another organization, or a service token is not scoped to this project. Ask an owner to invite you, or use a token issued for this project.
organization_suspendedHTTP 403permission_errorRetrynoRequests from this organization are refused; the owner was told why. Contact support.
permission_deniedHTTP 403permission_errorRetrynoYour role does not allow this action, or the feature is not enabled for your organization (extra.feature names it). Ask an owner or admin for the permission, or contact us to enable the feature.
mfa_requiredHTTP 403permission_errorRetrynoThis organization requires two-step verification for members who sign in with a password. Turn it on under Settings → Password & sessions, then reload.
scope_insufficientHTTP 403permission_errorRetrynoThe key or access token lacks the scope this call needs (inference for model calls). Create one with that scope enabled.
reauth_requiredHTTP 403permission_errorRetrynoThis action needs a fresh confirmation that it is you. Confirm with the method in extra.reauth_method (password, sign-in provider or SSO), then repeat the action. Access tokens cannot perform it; use a signed-in session.
subscription_exhaustedHTTP 402billing_errorRetrynoYour applicable subscription quota is exhausted under the block policy. Wait for reset or purchase another eligible plan.
insufficient_balanceHTTP 402billing_errorRetrynoThe available balance is exhausted, or too low to cover this request’s reserved maximum (input plus max_tokens). Top up (the message and top_up_url link to it); blocked requests resume within seconds. Lowering max_tokens helps only when the message suggests it. Top up in the console →
request_cost_capHTTP 402billing_errorRetrynoThe request’s worst-case cost (input plus max_tokens) is above this key’s per-request cap; the message gives both amounts. Lower max_tokens or raise “Max per request” under API keys → Edit.
request_too_largeHTTP 413invalid_request_errorRetrynoReduce request size. JSON supports gzip, br and deflate; decoded JSON is limited to 32 MiB by default.
budget_exceededHTTP 402billing_errorRetrynoA blocking budget (key, project or organization; monthly or total) cannot cover the request. The message and extra give the limit, spent, held and remaining amounts. Lower max_tokens or raise the limit; retrying before the reset will not help.
rate_limit_exceededHTTP 429rate_limit_errorRetryyesRead error.dimension to distinguish key and organization limits. Honour retry-after and review the matching constraint.
quota_exceededHTTP 429rate_limit_errorRetrynoA fixed quota, not a per-minute rate, is used up, so retrying before it resets will not help. Check the limits in the console, or contact us to raise them.
concurrency_limit_exceededHTTP 429rate_limit_errorRetryyesToo many requests are in flight at once for this key or organization. Lower your client's parallelism, and retry with backoff once earlier requests finish.
request_not_foundHTTP 404not_found_errorRetrynoNo request with this ID is visible to you: it may be mistyped or belong to a project you cannot access. Copy the ID from the x-request-id header or the request log.
not_foundHTTP 404not_found_errorRetrynoThe resource in the path does not exist, was deleted, or is not visible to your account. Check the ID in the URL.
invalid_request_errorHTTP 400invalid_request_errorRetrynoThe request could not be accepted as sent. The message names the field (and param when there is one); fix the request and send it again. Retrying it unchanged will not help.
context_length_exceededHTTP 400invalid_request_errorRetrynoPrompt plus max_tokens exceeds the model's context. Shorten the input, lower max_tokens, or choose a model with a longer context.
unsupported_parameterHTTP 400invalid_request_errorRetrynoThe model does not support this parameter; param names it. Remove it, or choose a model whose page lists the capability.
unsupported_file_typeHTTP 415invalid_request_errorRetrynoThis endpoint does not accept the body's format or Content-Type. Send JSON with Content-Type: application/json, or the file format the endpoint documents (JSONL for Batch input).
file_too_largeHTTP 413invalid_request_errorRetrynoThe upload or request body is above this endpoint's size limit (Batch input files: 100 MB). Split the file or send less content.
invalid_image_urlHTTP 400invalid_request_errorRetrynoAn image in the request could not be fetched or read. Use a publicly reachable https URL or a base64 data URL, in a format the model accepts.
content_filterHTTP 400invalid_request_errorRetrynoA safety filter blocked the prompt. Rephrase the request; sending it again unchanged will be blocked again.
content_policy_violationHTTP 400invalid_request_errorRetrynoThe request was rejected under the content policy. Change the content; retrying it unchanged will not help. See the Acceptable Use Policy.
data_policy_unmetHTTP 403permission_errorRetrynoThe project's data policy (zero data retention, regions, private network) leaves no route for this model. Change the policy under Data governance or use a model it allows; retrying will not help.
idempotency_key_reusedHTTP 409invalid_request_errorRetrynoThis Idempotency-Key was already used for a different request. Send a new key with each new request; reuse a key only to retry the identical request.
idempotency_in_progressHTTP 409conflict_errorRetryyesA request with this Idempotency-Key is still being processed. Wait a moment, then retry with the same key to receive its result.
conflictHTTP 409conflict_errorRetrynoThe resource already exists or changed since you read it (a name already in use, a revision that moved on). Reload, then retry against the current state or choose another name.
unauthenticatedHTTP 401authentication_errorRetrynoNo valid session or access token was sent, or it expired or was revoked. Sign in again, or send a current access token in the Authorization header.
invalid_credentialsHTTP 401authentication_errorRetrynoThe email and password, verification code or sign-in link did not match, or an enterprise sign-in expired. Check them and try again, or start the sign-in again; repeated failures lock the account for a while.
account_lockedHTTP 423authentication_errorRetrynoToo many failed sign-in attempts or verification codes. Wait for the time in the message (extra.retry_after_seconds), or reset your password.
email_not_verifiedHTTP 403authentication_errorRetrynoThe account's email address is not verified yet. Open the link in the verification email, or ask for a new one on the sign-in page.
password_confirmation_requiredHTTP 403authentication_errorRetrynoThe verification link was opened in a different browser from the one used to sign up. Enter the password chosen at sign-up to finish verifying.
totp_requiredHTTP 401authentication_errorRetrynoThis sign-in needs a two-factor code. Enter the current code from your authenticator app, or a recovery code, and continue.
model_retiredHTTP 410model_errorRetrynoThis model was retired; the catalog names its replacement. Switch to it.
model_version_retiredHTTP 410model_errorRetrynoThe pinned version (model@version) was retired. Call the model without a version to get its current default, or pin a version the model page lists as active.
provider_authHTTP 503upstream_errorRetryyesA route could not authenticate upstream. Retry; contact support with the request ID if it persists.
model_not_supportedHTTP 400invalid_request_errorRetrynoThe route serving this model does not support the requested endpoint. Call the endpoint shown on the model page, or choose another model.
rate_limitedHTTP 429upstream_errorRetryyesThe upstream is rate limited; your own limits were not reached. Honour retry-after and retry with backoff.
upstream_timeoutHTTP 504upstream_errorRetryyesThe model did not answer within the deadline. Retry with backoff; very long inputs or outputs take longer, and streaming returns the first tokens sooner.
stream_interruptedHTTP 200upstream_errorRetrynoThe stream ended early; delivered tokens are billed, the rest is not. Treat a stream without a final chunk as incomplete and retry the request.
internal_errorHTTP 500server_errorRetryyesSomething failed on our side while handling the request. Retry with exponential backoff; if it keeps happening, contact support and quote the request ID.