Vanguard AI

Errors & conventions

Response envelope

Every response is JSON with a status field.

200 Success
{ "status": "success", "...": "endpoint-specific fields" }
402 Error
{ "status": "error", "code": "QUOTA_EXCEEDED", "message": "Out of credits" }

The code is a stable, machine‑readable string — branch on it rather than on the human‑readable message.

Error codes

HTTPcodeMeaning
400(varies)Bad input
401AUTH_MISSINGNo Bearer token
401AUTH_INVALIDBad, expired or revoked credential
402QUOTA_EXCEEDEDOut of credits — top up or upgrade
402BILLING_OVERDUEAn Enterprise (postpaid) invoice is unpaid past its pause date, so new billable calls are refused until it is paid. Reading data, reports and paying still work. Only that key is paused when the invoice is the key’s own — see Billing
409UNPAID_USAGE_INVOICECredits cannot be bought while a usage invoice is open: pay the invoice first
402KEY_CREDITS_EXHAUSTEDThis API key has used all the credits assigned to it (remaining says what is left). Ask the account owner to assign more — see Account & usage
403SCOPE_FORBIDDENKey lacks the scope for that service — see Scopes
403KEY_MANAGEMENT_REQUIRES_SESSIONAn API key tried to create, list or edit keys, or to revoke a key other than itself. Sign in to the dashboard
403VERIFICATION_REQUIREDYour organization has to complete identity verification before using this. No plan upgrade gets past it
404UNKNOWN_SERVICENo such service
413PAYLOAD_TOO_LARGEUpload over the size limit (15 MB default)
415UNSUPPORTED_MEDIA_TYPEFile type not allowed
429RATE_LIMITEDToo many requests this minute
429USAGE_LIMIT_REACHEDYour daily or monthly credit cap is reached. This is not an empty balance: topping up does not lift it

Some endpoints add codes of their own, such as INVALID_MODEL on Responses; the reference page for each of those endpoints lists them.

Your own model servers

On Enterprise, a conversation, agent or /v1/responses call that runs on your organization’s own model server (Your own model servers) can also answer with these. They describe your server, so they say what to fix there. Nothing is charged.

HTTPcodeMeaning
409PRIVATE_MODEL_UNAVAILABLEThe model was switched off or its server removed. The conversation does not move to another model by itself
502PRIVATE_MODEL_UNREACHABLEYour server could not be reached
504PRIVATE_MODEL_TIMEOUTYour server did not start answering in time (it may still be loading the model)
502PRIVATE_MODEL_AUTHYour server refused the key or headers stored for it
502PRIVATE_MODEL_BUSYAll of your server’s request slots stayed busy
502PRIVATE_MODEL_BAD_RESPONSEThe answer did not follow the /v1/chat/completions standard, or the model name is wrong
502PRIVATE_MODEL_CONTEXT_OVERFLOWThe conversation does not fit the model’s context window
403CLOUD_FEATURE_OFFYour organization keeps these conversations off Vanguard’s cloud AI, and the feature asked for would use it

Rate limiting

Rate‑limited responses (429) include headers so you can back off gracefully:

HeaderMeaning
X-RateLimit-LimitRequests allowed per minute
X-RateLimit-RemainingRequests left in the current window

When you hit 429, wait until the next minute before retrying. For batch workloads, spread requests evenly rather than bursting.