Skip to content
Skip to Content
Batchwell Docs

Errors

Error shape and the codes Batchwell returns.

Errors use the OpenAI shape:

JSON
{ "error": { "message": "Unknown field: logit_bias", "type": "invalid_request_error", "code": "unsupported_parameter" } }
HTTPcodeMeaningWhat to do
400unsupported_parameterA field we do not accept, or n > 1, logprobs, top_logprobs.Remove the field.
400unsupported_contentA message part that is not text (image, audio, file).Send text only.
401—Missing, unknown or revoked key.Check the key; create a new one if revoked.
402insufficient_creditNot enough available credit, or the key's spend limit would be exceeded.Top up, raise the key's spend limit (API keys → Edit limit in the dashboard; owners and admins only) or lower max_tokens.
402org_spend_limit_reachedYour organization's monthly spend limit is reached. It resets at the start of the next calendar month (UTC); the error carries resets_at and limit_micro. The type is insufficient_quota.An owner or admin raises or clears the limit under Limits in the dashboard, or wait for the reset.
403—The organization is suspended or frozen.Contact support.
403content_blockedThe guard blocked the input. The error carries a class.See the Acceptable Use Policy.
429—Rate limit reached.Wait for Retry-After. See rate limits.
503no_eligible_endpointNo provider can serve this request right now.Retry later, add models fallbacks or relax provider.
503—Content screening is unavailable. Carries Retry-After. Nothing is charged.Retry after the delay.

In streams, failures after output starts arrive as an error event with code upstream_error or content_blocked. See streaming.

minors, sexual, weapons_violence, impersonation, cbrn. Security content (exploits, malware, offensive tooling for authorized work) is not a guard class and is not blocked.

Requests rejected before a model runs (400, 401, 402, 429) cost nothing. A request blocked at the input gate costs only the screening. A request blocked at the output gate costs the input and the screening, and never any output, even output you had already received. A provider failure after output has started costs the input, screening and the output delivered.