detail object when returned by FastAPI:
error object instead (see
Rate Limits).
HTTP status codes
Common errors
Capability violation (400)
Returned when the request content does not match the model’s declared
capabilities. For example, sending a document_url to a model that only
accepts images, or sending multiple images to a single-image OCR model.
GET /v1/openai/models or the
Models page before sending a request.
Invalid document (400)
Returned when a document_url points to a file that is not a
valid PDF, exceeds size limits, or cannot be decoded.
Invalid media (400)
Returned when an image_url or a video_url points to a file the Gateway
cannot decode: an unsupported container, a corrupt stream, a URL that does not
resolve to media, or malformed base64. The Gateway returns a 400 with
error.type = "invalid_request_error" and error.code = "invalid_media" rather
than a 500. error.param names the offending content part.
Credits exhausted (402)
Returned when an authenticated caller’s organization has no credit left.
Model not found (404)
Returned when the model field does not match any registered model or alias.
List available models with GET /v1/openai/models.
Rate limit exceeded (429)
Returned when a per-tier request quota is exhausted. Every public OpenAI route
shares one budget per caller. See Rate Limits for bucket
sizes and tier attribution.
X-VLMRun-Upgrade header.
Authenticated callers receive Rate limit exceeded: <window>. Every 429
carries Retry-After, holding the longest exhausted window, so one wait of that
length is enough. Retry after it elapses.
A full request queue answers 429 too, with Retry-After: 60. The queue holds
128 waiting requests. That is capacity rather than quota, so the same call
succeeds on retry.
Model unavailable (503)
Returned when the model’s deployment is not serving traffic, for example during
a cold start. Retry-After carries the suggested wait, 30 seconds by default.
This is distinct from the 504, which means the model
accepted the request and then ran past the dispatch window.
Internal server error (500)
Uncaught exceptions return a sanitized body with no stack traces or internal
paths. Every response includes an x-request-id header. On sanitized 500
errors, the same id is also returned as error.request_id in the JSON body.
Include either value when contacting support@vlm.run.
x-request-id request header to supply your own correlation
id; the Gateway echoes it on the response. When the header is omitted, the
Gateway mints a new id.
Inference timeout (504)
Returned when the model does not return a response inside the Gateway’s
dispatch window. The Gateway aborts the request after 270 seconds by default.
That window is configurable per deployment, is subject to change, and is not a
documented SLA.
- Retry after a short delay with exponential backoff.
- Keep your client-side timeout above the Gateway’s dispatch window. An OpenAI
SDK client with a low
timeout=value can fail earlier with its own error. - Chunk the workload so each request carries a smaller payload.
- Use
stream=trueso tokens arrive as the model produces them.
x-request-id response header and include it when contacting
support@vlm.run.
Getting help
When reporting an issue, include:- The
x-request-idresponse header (orerror.request_idon sanitized500responses) - The HTTP status code and response body
- The
modelvalue and content part types you sent