messages[].content, following the same
shape OpenAI’s SDKs already use. Each part is one of:
The VLM Run Gateway validates content parts against each model’s capabilities before
inference. Mismatches return
400 with
capability_violation. Check
a model’s accepted input types on Models or
GET /v1/openai/models.
Image Inputs
Most OCR and vision models accept a singleimage_url part per request. VQA
models such as qwen/qwen3.5-0.8b accept multiple images in the same
message, for side-by-side comparison or multi-image context.
image_url.detail (auto / low / high) is accepted for OpenAI SDK
compatibility. The Gateway’s own documented cost/quality knob for images is
image_resolution, below; prefer it when you want a specific resize
behavior.
Use image_resolution to resize an image before inference when a model’s
default resolution costs more than the task needs. See
Gateway extensions
for the full parameter reference.
Video Inputs
qwen/qwen3.5-0.8b accepts one video_url part per request alongside an
optional text prompt. The Gateway samples frames from the video before
inference. Control how many frames reach the model with these top-level
fields (or via extra_body in the OpenAI Python SDK):
Document Inputs
Document (PDF) requests are decoded and rasterized at the ingress before per-page inference.Limits
Requests over either limit return
400 with error.code = "invalid_document".
See Error Codes.
URL vs. base64
document_dpi and other method-specific knobs, see
Method Parameters.
Scanned vs. native PDFs
The VLM Run Gateway rasterizes every page and runs OCR regardless of whether the source PDF has a text layer. Scanned (image-only) and native (text-layer) PDFs are handled the same way, both go through the OCR model rather than a text-extraction shortcut. If you already have a reliable text layer and don’t need OCR, extracting it client-side before calling the Gateway will be faster and cheaper.VQA on PDFs
qwen/qwen3.5-0.8b also accepts document_url PDFs, but unlike OCR models it
does not run a dedicated OCR pipeline. The Gateway rasterizes each page and
fans out a separate chat request per page, then concatenates the responses.
Use this when you want free-form questions or summaries per page rather than
structured markdown extraction. For OCR output, use a document model from
Models instead.
Related
Flexible Document OCR
End-to-end recipe from model selection to response parsing.
Streaming
Receive pages as they finish instead of waiting for the whole document.
Models
Which input types each model accepts.
Chat Completions
Full request and response schema.