HTTP errors
An apparently sufficient displayed balance can still produce
402 if concurrent requests have reserved credit or the requested output allowance is too large. The check reserves enough for the allowed request before generation starts.
Error bodies
Chat Completions and Responses normally use an OpenAI-style error object. For example:invalid_api_key, insufficient_credits, credit_pending, key_unavailable, too_many_concurrent, and input_too_large. Messages clients should also inspect the error type and message; the same code field is not always present.
Retry behavior
HonorRetry-After when supplied. For temporary 429, 502, 503, and 504 failures, use capped exponential backoff and avoid starting many retries at once. Repeating an inference request can generate a new answer and incur additional usage; inference requests do not expose an idempotency-key guarantee.
credit_pending usually means a new grant or credit update is still being activated. Wait a few seconds and retry. An exhausted balance needs additional credit; repeatedly signing in or creating keys does not refill it.
Streaming errors
Once streaming starts, the HTTP status can remain200 even if generation later fails:
- Chat Completions: an SSE
data:frame containserror, followed by[DONE]. - Responses: an error event or a failed/incomplete response can terminate the result.
- Messages: an
event: errorframe contains the error envelope.
ping events are not errors or output. Closing a stream cancels the upstream request, but work already performed may still be accounted for.
Report a problem
If present, record thex-request-id response header, endpoint, status, and approximate time. Contact hello@derestricted.ai with those details. Do not include an API key. Describe a reproducible request without including private prompt content when possible.