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
403SCOPE_FORBIDDENKey lacks the scope for that service
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

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.