Honoured where supported_parameters lists them. On a model with a non-empty list, an unlisted temperature, top_p, top_k, seed, logprobs, frequency_penalty, or presence_penalty is a 400 capability_violation, and param names it.
method, method_params, precision, document_* (including document_mode), image_resolution, and video_*. Send them at the top level, or in extra_body on the OpenAI Python SDK.
A model can have a fallback deployment. When the model is not deployed, or fails with 500, 502, or 503 before the reply starts, the request runs once on the fallback. The reply keeps the model you asked for and bills at its rates, and backend names the engine that ran.
No retry: on a 504, on any 4xx, or once a stream has sent its first chunk.
Scope:POST /openai/chat/completions only. A realtime session runs on the model you named.
One hop: a failure on the fallback is the reply.
Streaming
Set stream: true in text mode. The streamed text is byte-identical to the non-streaming reply, and a document request emits <document>, one <page> per page, then </document>.
Streams deltas: chat VLMs, and single-image OCR methods that return the model’s text unchanged.
Buffered: every other reply is built in full, then re-chunked as chat.completion.chunk SSE. That includes rewritten text, paddleocr/pp-ocrv6, structured envelopes, and JSON modes. There is no time-to-first-token benefit.
Usage: the last chunk carries aggregated usage, including usage.cost. It arrives whether or not you pass stream_options.include_usage.
from openai import OpenAIclient = OpenAI( base_url="https://gateway.vlm.run/openai", api_key="<VLMRUN_API_KEY>",)stream = client.chat.completions.create( model="qwen/qwen3.5-0.8b", stream=True, stream_options={"include_usage": True}, messages=[ { "role": "user", "content": [ {"type": "text", "text": "What is happening in this image?"}, { "type": "image_url", "image_url": { "url": "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg" }, }, ], } ],)for chunk in stream: delta = chunk.choices[0].delta.content if delta: print(delta, end="")
import OpenAI from "openai";const client = new OpenAI({ baseURL: "https://gateway.vlm.run/openai", apiKey: process.env.VLMRUN_API_KEY,});const stream = await client.chat.completions.create({ model: "qwen/qwen3.5-0.8b", stream: true, stream_options: { include_usage: true }, messages: [ { role: "user", content: [ { type: "text", text: "What is happening in this image?" }, { type: "image_url", image_url: { url: "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg", }, }, ], }, ],});for await (const chunk of stream) { const delta = chunk.choices[0]?.delta?.content; if (delta) process.stdout.write(delta);}
vlmrun gw chat https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg \ -p "What is happening in this image?" \ -m qwen/qwen3.5-0.8b
Every response includes an x-request-id header. A sanitized 5xx body repeats it as error.request_id. See Error Codes and Rate Limits.
Related
List models
Query the live model catalog and capabilities.
Response Formats
Text, JSON, and JSON schema modes.
Supported Inputs
Content part types, document limits, and format tradeoffs.
Document OCR
Request knobs, page blocks, and streaming for PDFs.
Authorizations
Authorization
string
header
required
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
OpenAI-compatible chat completion request.
model
string
required
messages
ChatMessage · object[]
required
Hide child attributes
messages.role
enum<string>
required
Available options:
system,
user,
assistant,
tool
messages.content
stringContentPart · object[]
messages.tool_calls
Tool Calls · object[] | null
messages.tool_call_id
string | null
messages.name
string | null
temperature
number | null
max_tokens
integer | null
top_p
number
default:1
frequency_penalty
number
default:0
presence_penalty
number
default:0
stop
stringstring[]
stream
boolean
default:false
n
integer
default:1
reasoning_effort
enum<string> | null
default:medium
Available options:
none,
minimal,
low,
medium,
high,
xhigh
chat_template_kwargs
Chat Template Kwargs · object | null
llm
string | null
method
string | null
document_method
string | null
method_params
Method Params · object | null
video_max_frames
integer | null
video_fps
number | null
video_encoder
string | null
Allowed value: "native"
video_encoder_params
Video Encoder Params · object | null
image_resolution
enum<string> | null
Available options:
224x224,
336x336,
384x384,
448x448,
512x512,
768x768
video_resolution
enum<string> | null
Available options:
256x192,
320x240,
448x336,
512x384,
640x480
document_dpi
integer
default:96
Required range: x >= 1
document_max_pages
integer | null
document_pages
(integer | object)[] | null
integer
object
document_mode
enum<string> | null
Available options:
page,
document
response_format
ResponseFormat · object | null
Requested serialization of the assistant reply.
Mirrors the OpenAI response_format object so existing client code
keeps working:
{"type": "text"} (the default) returns the reply verbatim.
{"type": "json_object"} returns the reply as a single valid JSON
object string: structured results (detections, OCR regions, document
pages) are emitted as parseable JSON under a top-level data key.
{"type": "json_schema"}constrains generation to the supplied
schema, on the models that declare
:attr:ModelCapabilities.supports_json_schema — the chat VLMs served by
vLLM and the routed provider models. Anything else (the OCR and
detection models, whose reply is an envelope this gateway builds rather
than text the model is free to shape) rejects it with a 400 capability
violation instead of accepting it and ignoring it.
Hide child attributes
response_format.type
enum<string>
default:text
Available options:
text,
json_object,
json_schema
response_format.json_schema
Json Schema · object | null
precision
integer
default:4
Required range: 1 <= x <= 8
Response
Successful Response
OpenAI-compatible chat completion response.
Beyond the OpenAI shape we surface three extra fields so clients can
audit which model actually produced the output:
served_model_id — the canonical id of the deployment that
ran the request (e.g. "rednote-hilab/dots.mocr"), even when the
caller used a short alias. Mirrors the "id" echoed in
GET /openai/models.
backend — static label naming the inference runtime that
served the request ("vllm" / "transformers" /
"paddleocr" / ...). Lets clients see the runtime
without opening a separate /models RPC.
provider — who ran the hardware. Absent for models served on
VLM Run's own GPUs; otherwise the upstream that served the request
("google-vertex", "huggingface", ...). Reported per
response rather than read from the catalog because a request can be
routed to a different upstream than the last one — the same model id
may be served by more than one, and they do not always agree on
capabilities or price.
The OpenAI-standard model field still echoes the canonical
id (matching OpenAI's own behaviour where a generic alias like
gpt-4 resolves to the dated snapshot gpt-4-0613 in the
response).
model
string
required
choices
Choice · object[]
required
Hide child attributes
choices.message
ChoiceMessage · object
required
Hide child attributes
choices.message.content
string
required
choices.message.role
string
default:assistant
Allowed value: "assistant"
choices.message.reasoning
string | null
choices.index
integer
default:0
choices.finish_reason
enum<string>
default:stop
Available options:
stop,
length
id
string
object
string
default:chat.completion
Allowed value: "chat.completion"
created
integer
served_model_id
string | null
backend
string | null
provider
string | null
usage
Usage · object
Hide child attributes
usage.prompt_tokens
integer
default:0
usage.completion_tokens
integer
default:0
usage.total_tokens
integer
default:0
usage.prompt_tokens_details
PromptTokensDetails · object | null
OpenAI-compatible breakdown of prompt token categories.
Hide child attributes
usage.prompt_tokens_details.cached_tokens
integer
default:0
usage.completion_tokens_details
CompletionTokensDetails · object | null
OpenAI-compatible breakdown of completion token categories.
Hide child attributes
usage.completion_tokens_details.reasoning_tokens
integer
default:0
usage.cost
number | null
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"VLM Run","description":"One API key for every visual model. Send a document or an image, get JSON back.","colors":{"primary":"#1F5ACA","light":"#4D8BFF","dark":"#102A56"},"logo":{"light":"https://mintcdn.com/autonomiai/0Yrk6nqaa_NlkPay/assets/logo/vlm-run-icon.svg?fit=max\u0026auto=format\u0026n=0Yrk6nqaa_NlkPay\u0026q=85\u0026s=fbea8392452b746e14273d7670a4f535","dark":"https://mintcdn.com/autonomiai/0Yrk6nqaa_NlkPay/assets/logo/vlm-run-icon-white.svg?fit=max\u0026auto=format\u0026n=0Yrk6nqaa_NlkPay\u0026q=85\u0026s=e58c8973ce1978adf1ce6359665a916a"},"favicon":"https://mintcdn.com/autonomiai/0Yrk6nqaa_NlkPay/assets/logo/vlm-run-icon.svg?fit=max\u0026auto=format\u0026n=0Yrk6nqaa_NlkPay\u0026q=85\u0026s=fbea8392452b746e14273d7670a4f535","api":{"openapi":["https://api.vlm.run/openapi.json","https://gateway.vlm.run/openapi.json"],"params":{"expanded":"all"},"playground":{"display":"simple"},"examples":{"languages":["python","javascript","ruby","curl"]}},"appearance":{"default":"light","strict":true},"background":{"color":{"light":"#FAFCFE","dark":"#010917"}},"navbar":{"links":[{"icon":"discord","href":"https://discord.gg/AMApC2UzVY","label":"Discord"},{"href":"mailto:support@vlm.run","label":"Contact"},{"href":"https://github.com/vlm-run/vlmrun-hub","label":"Hub"},{"href":"https://github.com/vlm-run/vlmrun-cookbook","label":"Cookbooks"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.vlm.run"}},"footer":{"socials":{"x":"https://x.com/vlmrun","discord":"https://discord.gg/AMApC2UzVY","github":"https://github.com/vlm-run/vlm-cookbook","linkedin":"https://www.linkedin.com/company/vlm-run"}},"seo":{"metatags":{"og:type":"website","og:site_name":"VLM Run","twitter:card":"summary_large_image","twitter:site":"@vlmrun"}},"fonts":{"heading":{"family":"Aeonik Pro","weight":400,"source":"fonts/AeonikPro-Regular.woff2","format":"woff2"},"body":{"family":"Aeonik Pro","weight":400,"source":"fonts/AeonikPro-Regular.woff2","format":"woff2"}},"styling":{"codeblocks":{"theme":{"light":"github-light","dark":"dark-plus"}},"latex":true},"integrations":{"ga4":{"measurementId":"G-DKFNLZ8F83"}},"thumbnails":{"appearance":"dark","background":"https://mintcdn.com/autonomiai/0lq3Q9EPRCLt1zej/images/og-background.png?fit=max\u0026auto=format\u0026n=0lq3Q9EPRCLt1zej\u0026q=85\u0026s=010b9a1e01253f5f9d02474d89f85294"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"autonomiai","hasAudioNarration":false,"actualSubdomain":"autonomiai","customDomains":["docs.vlm.run"],"gitSource":{"type":"github","owner":"vlm-run","repo":"docs","deployBranch":"release","contentDirectory":"public","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6b04b69af51990c9e4fcb9f9","clientVersion":"0.0.4304","searchFilterCounts":[{"language":"default","tag":"Orion","count":42},{"language":"default","tag":"Developers","count":35},{"language":"default","tag":"Gateway","count":33},{"language":"default","tag":"API reference","count":27},{"language":"default","tag":"SDKs","count":24},{"language":"default","tag":"Guides","count":19},{"language":"default","tag":"Orion API","count":15},{"language":"default","tag":"Skills","count":14},{"language":"default","tag":"Gateway API","count":12},{"language":"default","tag":"Python","count":12}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"/* cyrillic-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrodmgPn.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrMdmgPn.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* symbols2 */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFg08vz7ehw.woff2) format('woff2');\n unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrgdmgPn.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrkdmgPn.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrcdmg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrodmgPn.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrMdmgPn.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* symbols2 */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFg08vz7ehw.woff2) format('woff2');\n unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrgdmgPn.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrkdmgPn.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrcdmg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrodmgPn.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrMdmgPn.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* symbols2 */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFg08vz7ehw.woff2) format('woff2');\n unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrgdmgPn.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrkdmgPn.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrcdmg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n:root{--vlm-primary: #1F5ACA;--vlm-primary-hover: #1848A2;--vlm-primary-vivid: #1265FF;--vlm-primary-mid: #1F5ACA;--vlm-primary-dark: #1848A2;--vlm-primary-light: #4D8BFF;--vlm-primary-border: #234D9F;--vlm-primary-tint: #E0EAFA;--vlm-primary-badge: #EEF2F9;--vlm-navy: #102A56;--vlm-navy-dark: #010917;--vlm-navy-mid: #102255;--vlm-muted: #576782;--vlm-surface: #FAFCFE;--vlm-border: #E1ECFA;--vlm-dark-border: #182231;--vlm-toc-active: #274275;--vlm-cap-blue: rgb(100, 151, 246);--vlm-cap-green: rgb(185, 246, 100);--vlm-cap-purple: rgb(177, 118, 255);--vlm-shadow-btn:\n rgba(0, 0, 0, 0.20) 0px -2px 0px 0px inset,\n rgba(0, 0, 0, 0.20) 0px 1px 2px 0px}:root{--vlm-docs-version: \"Docs updated 2026-08-15\"}body{color:var(--vlm-navy);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}h1,h2,h3,h4,h5,h6{color:var(--vlm-navy);letter-spacing:0}#content>h2{margin-top:3rem;margin-bottom:1.5rem}#content>h3{margin-top:2.25rem;margin-bottom:1rem}#content>h4{margin-top:1.75rem;margin-bottom:0.75rem}#content>:is(h2,h3,h4):first-child{margin-top:0}#content>:is(h2,h3,h4)+table{margin-top:0}#content [data-table-wrapper=\"true\"]{margin-top:0;padding-top:0}#content [data-table-wrapper=\"true\"] table{margin-top:0}#content input.fold-rows{position:absolute;width:1px;height:1px;margin:0;opacity:0;pointer-events:none}#content input.fold-rows:not(:checked)+[data-table-wrapper=\"true\"] tbody tr:nth-child(n+7){display:none}#content input.fold-rows:not(:checked)+[data-table-wrapper=\"true\"]{position:relative}#content input.fold-rows:not(:checked)+[data-table-wrapper=\"true\"]::after{content:\"\";position:absolute;left:0;right:0;bottom:0;height:2.75rem;background:linear-gradient(to bottom, transparent, #fff);pointer-events:none}#content label.fold-rows-label{display:flex;justify-content:center;margin-top:0.25rem;margin-bottom:1.5rem;font-size:0.75rem;font-weight:500;color:var(--vlm-muted);cursor:pointer}#content input.fold-rows:checked+[data-table-wrapper=\"true\"]+label.fold-rows-label .when-closed,#content input.fold-rows:not(:checked)+[data-table-wrapper=\"true\"]+label.fold-rows-label .when-open{display:none}#content [data-component-part=\"tabs-list\"]{margin-top:1.75rem!important;gap:1.75rem!important}#content [data-component-part=\"tab-button\"]{padding-top:0.85rem!important;padding-bottom:0.7rem!important;border-bottom-width:2px!important;color:var(--vlm-muted)!important;font-size:1rem!important;font-weight:500!important;line-height:1.5rem!important}#content [data-component-part=\"tab-button\"]:hover{color:var(--vlm-navy)!important}#content [data-component-part=\"tab-button\"][data-active=\"true\"]{color:var(--vlm-navy)!important;border-bottom-color:var(--vlm-navy)!important}p,li{color:var(--vlm-muted);letter-spacing:-0.01em}#navigation-items .sidebar-group-header,#navigation-items .sidebar-group-header .sidebar-title{font-family:'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;font-size:11px;font-weight:500;letter-spacing:0.12em;text-transform:uppercase;color:var(--vlm-muted)}a{color:var(--vlm-primary);transition:color 200ms ease-out, opacity 200ms ease-out}a:hover{color:var(--vlm-primary-hover)}.prose a,article a{text-decoration-color:color-mix(in srgb, var(--vlm-primary) 35%, transparent);text-underline-offset:3px;transition:text-decoration-color 200ms ease-out, color 200ms ease-out}.prose a:hover,article a:hover{text-decoration-color:var(--vlm-primary)}#navbar a[href=\"https://app.vlm.run\"],.navbar a[href=\"https://app.vlm.run\"],header a[href=\"https://app.vlm.run\"]{border-radius:20px!important;border:1px solid var(--vlm-primary-border)!important;background-color:var(--vlm-primary-mid)!important;color:#fff!important;box-shadow:var(--vlm-shadow-btn);transition:transform 300ms ease-out,\n box-shadow 300ms ease-out,\n background-color 300ms ease-out,\n opacity 300ms ease-out}#navbar a[href=\"https://app.vlm.run\"]:hover,.navbar a[href=\"https://app.vlm.run\"]:hover,header a[href=\"https://app.vlm.run\"]:hover{transform:translateY(-1px);background-color:var(--vlm-primary-dark)!important;opacity:0.95}#navigation-items a,#sidebar a,nav[aria-label=\"Sidebar\"] a{color:var(--vlm-navy)}#navigation-items a:hover,#sidebar a:hover,nav[aria-label=\"Sidebar\"] a:hover{color:var(--vlm-primary)}#navigation-items a[aria-current=\"page\"],#navigation-items a[data-active=\"true\"],#sidebar a[aria-current=\"page\"],#sidebar a[data-active=\"true\"],nav[aria-label=\"Sidebar\"] a[aria-current=\"page\"]{color:var(--vlm-primary)!important;font-weight:500}#navigation-items li li>a,#navigation-items li li>div>a,#navigation-items li li>button,#navigation-items li li>div>button{padding-left:2.5rem!important}#navigation-items li li li>a,#navigation-items li li li>div>a,#navigation-items li li li>button,#navigation-items li li li>div>button{padding-left:3.5rem!important}#content-side-layout:has(#table-of-contents){width:max-content!important;max-width:13rem!important;margin-left:0!important;margin-right:0.75rem!important;padding-right:0!important;align-items:flex-end!important;flex:0 0 auto!important;box-sizing:border-box!important}@media (min-width: 1280px){#content-area{width:auto!important;max-width:none!important;flex:1 1 auto!important;margin-left:0!important;margin-right:0!important;padding-left:2rem!important;padding-right:2rem!important}#content-area:has(#content)>header,#content{width:100%;max-width:48rem;margin-left:auto!important;margin-right:auto!important}}#table-of-contents-layout{width:max-content!important;max-width:13rem!important;margin-left:auto!important;padding-left:0!important;padding-right:0!important}#table-of-contents{width:max-content!important;max-width:13rem!important}#content-side-layout:has(#table-of-contents) h2{font-family:'Aeonik Pro', ui-sans-serif, system-ui, sans-serif!important;font-size:0.8125rem!important;line-height:1.25rem!important;font-weight:500!important;letter-spacing:0.01em!important;color:var(--vlm-muted)!important}#table-of-contents-content a,#table-of-contents a{font-size:0.8125rem!important;line-height:1.25rem!important;color:var(--vlm-muted)!important}#content-area{width:auto!important;max-width:none!important}#content{max-width:48rem}#content li{text-wrap:pretty}#toc a[aria-current=\"true\"],#toc a[aria-current=\"location\"],#toc a[data-active=\"true\"],nav[aria-label=\"On this page\"] a[aria-current=\"true\"],nav[aria-label=\"On this page\"] a[aria-current=\"location\"],nav[aria-label=\"On this page\"] a[data-active=\"true\"],#table-of-contents a[aria-current=\"true\"],#table-of-contents a[aria-current=\"location\"],#table-of-contents a[data-active=\"true\"]{color:var(--vlm-toc-active)!important;font-weight:500;box-shadow:none!important;border:none!important;padding-left:0!important}.card,[class*=\"card\"][role=\"link\"],a.card{background-color:#ffffff;border:1px solid var(--vlm-border);border-radius:12px;transition:transform 300ms ease-out,\n border-color 300ms ease-out,\n box-shadow 300ms ease-out}.card:hover,[class*=\"card\"][role=\"link\"]:hover,a.card:hover{transform:translateY(-1px);border-color:var(--vlm-primary);box-shadow:0 4px 12px -4px color-mix(in srgb, var(--vlm-primary) 20%, transparent)}.card-demo{color:var(--vlm-primary-mid);background-color:var(--vlm-primary-tint);border-color:var(--vlm-primary-tint)}.callout-info,[role=\"note\"][data-type=\"info\"],[role=\"note\"][data-type=\"note\"]{background-color:var(--vlm-primary-badge);border-color:var(--vlm-border);color:var(--vlm-navy)}.callout-tip,[role=\"note\"][data-type=\"tip\"]{background-color:color-mix(in srgb, var(--vlm-cap-green) 18%, white);border-color:color-mix(in srgb, var(--vlm-cap-green) 45%, white);color:var(--vlm-navy)}pre,[class*=\"code-block\"] pre{border:0;border-radius:0;background:transparent}:not(pre)>code{background-color:#F0F2F5;color:var(--vlm-navy);padding:0.05rem 0.15rem;border-radius:4px;font-size:0.875em}#content a code,#header a code{color:inherit}#header .eyebrow{display:none}#content>:is(h2,h3,h4)+[data-table-wrapper]{margin-top:0!important;padding-top:0!important}#content>:is(h2,h3,h4)+[data-table-wrapper] table{margin-top:0}table{width:100%;margin:1.5rem 0;border:1px solid var(--vlm-border)!important;border-radius:6px;border-collapse:separate!important;border-spacing:0!important;background-color:#ffffff;font-size:0.875rem;color:var(--vlm-navy)}thead th{background-color:var(--vlm-surface);border:0!important;border-bottom:1px solid var(--vlm-border)!important;padding:0.7rem 1rem!important;font-family:'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;font-size:11px;font-weight:500;letter-spacing:0.12em;text-transform:uppercase;color:var(--vlm-navy);vertical-align:middle}thead th .unit-help{display:inline-flex;align-items:center;justify-content:center;width:0.875rem;height:0.875rem;margin-left:0.35rem;border:1px solid var(--vlm-border);border-radius:999px;background:#fff;color:var(--vlm-muted);font-family:'Aeonik Pro', ui-sans-serif, system-ui, sans-serif;font-size:0.625rem;font-weight:600;letter-spacing:0;text-transform:none;line-height:1;text-decoration:none;vertical-align:1px;cursor:help}thead th button:has(.unit-help){display:inline-flex;align-items:center;margin:0;padding:0;border:0;background:transparent;color:inherit;font:inherit;letter-spacing:0;text-transform:none;vertical-align:middle;cursor:help}thead tr:first-child th:first-child{border-top-left-radius:6px}thead tr:first-child th:last-child{border-top-right-radius:6px}tbody tr:last-child td:first-child{border-bottom-left-radius:6px}tbody tr:last-child td:last-child{border-bottom-right-radius:6px}thead tr+tr th{border-bottom:1px solid var(--vlm-border)!important;padding-top:0.5rem!important;padding-bottom:0.75rem!important;font-size:10.5px}thead th[align=\"left\"]{text-align:left}thead th[align=\"center\"]{text-align:center}thead th[align=\"right\"]{text-align:right}thead th code{background:transparent!important;color:var(--vlm-navy)!important;padding:0!important;font-size:inherit!important;letter-spacing:0.12em!important;text-transform:uppercase!important}tbody tr{background-color:#ffffff}tbody td{border:0!important;border-bottom:1px solid var(--vlm-border)!important;padding:0.7rem 1rem!important;vertical-align:middle;color:var(--vlm-navy);line-height:1.55}tbody td:has(br),tbody td:has(ul),tbody td:has(p){vertical-align:top}tbody td ul{margin:0;padding-left:1.25rem}tbody td li+li{margin-top:0.35em}tbody td li kbd{font-family:'Geist Mono', ui-monospace, monospace;font-weight:600;font-size:0.8125rem;line-height:1.3;letter-spacing:-0.01em;color:var(--vlm-navy);background:transparent;border:1px solid var(--vlm-border);padding:0.05rem 0.3rem;margin:0;border-radius:3px;white-space:nowrap;box-shadow:none!important;text-shadow:none;filter:none;-webkit-box-shadow:none!important}table code{white-space:nowrap}tbody tr:last-child td{border-bottom:0!important}thead th:first-child,tbody td:first-child{padding-left:1.125rem!important}thead th:last-child,tbody td:last-child{padding-right:1.125rem!important}.rotated-row-headers thead th:first-child,.rotated-row-headers tbody td:first-child{padding-left:0.5rem!important;padding-right:0.5rem!important}.rotated-row-headers tbody td:first-child{border-right:1px solid var(--vlm-border)!important}tbody td:first-child,tbody td[rowspan]+td{font-weight:500;color:var(--vlm-navy)}tbody td[align=\"center\"],tbody td[align=\"right\"]{font-weight:500;color:var(--vlm-navy)}table code{font-family:'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;font-size:13px;font-weight:500}td[align=\"left\"]{text-align:left}td[align=\"center\"]{text-align:center}td[align=\"right\"]{text-align:right}tbody td code{background:transparent!important;color:inherit!important;padding:0!important;font-size:inherit!important;border-radius:0!important;font-weight:inherit!important}.accordion table,[data-accordion-content] table{margin:0.75rem 0;font-size:0.8125rem}.accordion tbody td,[data-accordion-content] tbody td,.accordion thead th,[data-accordion-content] thead th{padding:0.75rem 1rem!important}.accordion thead th:first-child,[data-accordion-content] thead th:first-child,.accordion tbody td:first-child,[data-accordion-content] tbody td:first-child{padding-left:1.25rem!important}.accordion thead th:last-child,[data-accordion-content] thead th:last-child,.accordion tbody td:last-child,[data-accordion-content] tbody td:last-child{padding-right:1.25rem!important}.gateway-models-catalog table{table-layout:fixed;width:100%;font-size:0.8125rem}.gateway-models-catalog thead th{padding:0.5rem 0.625rem!important;font-size:10px;letter-spacing:0.08em;line-height:1.35;white-space:normal;vertical-align:bottom}.gateway-models-catalog tbody td{padding:0.5rem 0.625rem!important;font-size:0.8125rem;line-height:1.45;vertical-align:top}.gateway-models-catalog thead th:first-child,.gateway-models-catalog tbody td:first-child{width:26%;padding-left:0.75rem!important;white-space:normal;word-break:break-word}.gateway-models-catalog thead th:nth-child(2),.gateway-models-catalog tbody td:nth-child(2){width:4.75rem;max-width:4.75rem;white-space:normal;word-break:break-word;hyphens:auto;text-align:center;font-size:0.75rem;line-height:1.35}.gateway-models-catalog table code{white-space:normal;word-break:break-word;font-size:0.75rem}.gateway-models-catalog tbody td:first-child a{word-break:break-word}.gateway-models-catalog thead th:last-child,.gateway-models-catalog tbody td:last-child{padding-right:0.75rem!important}html.dark table{background-color:transparent;border-color:var(--vlm-dark-border)!important}html.dark thead tr,html.dark thead tr th,html.dark tbody tr{background-color:transparent}html.dark thead th,html.dark tbody td{color:inherit;border-color:var(--vlm-dark-border)!important}.integration-hero{width:100%;aspect-ratio:1024 / 500;background-image:url('/assets/blog-backdrop.png');background-size:cover;background-position:center;border:1px solid var(--vlm-border);border-radius:8px;display:flex;align-items:center;justify-content:center;gap:4%;margin:1.5rem 0 2rem;overflow:hidden}.integration-hero-tile{width:17.6%;aspect-ratio:1 / 1;background-color:rgba(255, 255, 255, 0.96);border:1px solid var(--vlm-border);border-radius:12px;box-shadow:0 1px 2px rgba(16, 42, 86, 0.04),\n 0 4px 12px rgba(31, 90, 202, 0.05);overflow:hidden}.integration-hero-tile{display:flex;align-items:center;justify-content:center}.integration-hero-tile img,.integration-hero-tile svg{display:block;width:60%;height:60%;max-width:60%;margin:0!important;object-fit:contain;object-position:center}.integration-hero-tile:has(img[alt=\"n8n\"]) img{width:90%;height:90%;max-width:90%}.integration-hero-tile:has(img[alt=\"Zapier\"]) img{width:56%;height:56%;max-width:56%}.integration-hero-tile:has(img[alt=\"MongoDB\"]) img{width:88%;height:88%;max-width:88%}.integration-hero-tile:has(img[alt=\"Voxel51 FiftyOne\"]) img{width:68%;height:68%;max-width:68%}.platform-figure{position:relative;border:1px solid var(--vlm-border);border-radius:8px;padding:3.5% 3% 56px;margin:1.5rem 0 2rem;overflow:hidden;background-color:#ffffff}.platform-figure::before{content:\"\";position:absolute;inset:0;background-image:url('/images/platform-background.png');background-size:cover;background-position:center;background-repeat:no-repeat;opacity:0.6;pointer-events:none;z-index:0}.platform-figure>*,.platform-figure img{position:relative;z-index:1}.platform-figure img{display:block;width:100%;height:auto;border-radius:16px;border:1px solid var(--vlm-border);box-shadow:0 1px 2px rgba(16, 42, 86, 0.10),\n 0 12px 32px rgba(31, 90, 202, 0.14)}.platform-card-grid .card img,.platform-card-grid [class*=\"card\"][role=\"link\"] img{background-color:#ffffff;background-image:url('/images/platform-background.png');background-size:cover;background-position:center;background-repeat:no-repeat;padding:14px;box-sizing:border-box;border-radius:10px 10px 0 0;border:1px solid var(--vlm-border);border-bottom:0;box-shadow:0 1px 2px rgba(16, 42, 86, 0.05)}.domain-column{width:240px;display:inline-block}.function-column{width:240px;display:inline-block}.allowed-inputs-column{width:160px;display:inline-block}.description-column{width:100%;display:inline-block}.tag{padding:2px 8px;border-radius:12px;font-size:0.9em;font-weight:500;display:inline-block;margin-right:8px;margin-bottom:4px}.tag-document{background:color-mix(in srgb, var(--vlm-cap-green) 22%, white);color:#2F6B14}.tag-image{background:color-mix(in srgb, var(--vlm-cap-blue) 22%, white);color:var(--vlm-primary-dark)}.tag-video{background:color-mix(in srgb, var(--vlm-cap-purple) 22%, white);color:#5A2BB8}.tag-audio{background:var(--vlm-primary-badge);color:var(--vlm-primary-dark)}.tag-url{background:var(--vlm-primary-badge);color:var(--vlm-primary-dark)}.tag-ref{background:color-mix(in srgb, var(--vlm-cap-purple) 14%, white);color:#5A2BB8}.no-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.no-scrollbar::-webkit-scrollbar{display:none}.glass{background:rgba(255, 255, 255, 0.05);border:1px solid rgba(255, 255, 255, 0.1)}.shadow-btn{box-shadow:var(--vlm-shadow-btn)}#footer{flex-wrap:wrap;row-gap:1.25rem}#footer::after{content:var(--vlm-docs-version, \"\");flex-basis:100%;order:99;font-family:'Geist Mono', ui-monospace, monospace;font-size:12px;letter-spacing:0.02em;color:var(--vlm-muted)}.hero-video{display:block;width:100%;height:auto;border-radius:6px;background:var(--vlm-navy-dark)}p:has(>.changelog-tag:first-child),span:has(>.changelog-tag:first-child){padding-left:88px;text-indent:-88px}.changelog-tag{display:inline-block;box-sizing:border-box;width:76px;margin-right:8px;padding:1px 0;text-align:center;text-indent:0;border:1px solid var(--vlm-border);border-radius:4px;background:var(--vlm-primary-badge);color:var(--vlm-muted);font-family:'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;font-size:11px;font-weight:500;letter-spacing:0.08em;line-height:1.5;text-transform:uppercase;vertical-align:1px}.support-dot{color:var(--vlm-primary-light)}html:not([data-legacy=\"1\"]) #navigation-items>div:has(a[href=\"/api-reference/structured-extraction\"]){display:none}"}]}
{"page":{"pagePath":"gateway/api-reference/post-chat-completions","slug":"/gateway/api-reference/post-chat-completions","pageMetadata":{"title":"Chat Completions","description":"OpenAI-compatible OCR, VQA, and document inference","icon":"comments","openapi":"https://gateway.vlm.run/openapi.json POST /openai/chat/completions","href":"/gateway/api-reference/post-chat-completions"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"OpenAI-compatible OCR, VQA, and document inference\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Card,CardGroup,CodeBlock,CodeGroup,Heading,Table}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Authentication is optional. See `,_jsx(_components.a,{href:`/gateway/authentication`,children:`Authentication`}),` for tiers and `,_jsx(_components.a,{href:`/gateway/rate-limits`,children:`Rate Limits`}),` for per-tier quotas.`]}),`\n`,_jsx(Heading,{level:`2`,id:`request`,children:`Request`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Part`}),_jsx(_components.th,{children:`Behavior`}),_jsx(_components.th,{children:`See`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`model`})}),_jsx(_components.td,{children:`A full id, a short form, or a Hugging Face id.`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/gateway/models#addressing-models`,children:`Addressing Models`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Sampling fields`}),_jsxs(_components.td,{children:[`Honoured where `,_jsx(_components.code,{children:`supported_parameters`}),` lists them. On a model with a non-empty list, an unlisted `,_jsx(_components.code,{children:`temperature`}),`, `,_jsx(_components.code,{children:`top_p`}),`, `,_jsx(_components.code,{children:`top_k`}),`, `,_jsx(_components.code,{children:`seed`}),`, `,_jsx(_components.code,{children:`logprobs`}),`, `,_jsx(_components.code,{children:`frequency_penalty`}),`, or `,_jsx(_components.code,{children:`presence_penalty`}),` is a `,_jsx(_components.code,{children:`400 capability_violation`}),`, and `,_jsx(_components.code,{children:`param`}),` names it.`]}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/gateway/openai-compatibility#supported-parameters`,children:`Supported parameters`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Content parts`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`text`}),`, `,_jsx(_components.code,{children:`image_url`}),`, `,_jsx(_components.code,{children:`document_url`}),`, `,_jsx(_components.code,{children:`file_url`}),`, `,_jsx(_components.code,{children:`file`}),`, `,_jsx(_components.code,{children:`video_url`}),`.`]}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/gateway/multimodal-inputs`,children:`Supported Inputs`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`response_format`})}),_jsxs(_components.td,{children:[`Omit for text mode. `,_jsx(_components.code,{children:`json_object`}),` for JSON mode. `,_jsx(_components.code,{children:`json_schema`}),` on chat and provider models.`]}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/gateway/response-formats`,children:`Response Formats`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Gateway fields`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`method`}),`, `,_jsx(_components.code,{children:`method_params`}),`, `,_jsx(_components.code,{children:`precision`}),`, `,_jsx(_components.code,{children:`document_*`}),` (including `,_jsx(_components.code,{children:`document_mode`}),`), `,_jsx(_components.code,{children:`image_resolution`}),`, and `,_jsx(_components.code,{children:`video_*`}),`. Send them at the top level, or in `,_jsx(_components.code,{children:`extra_body`}),` on the OpenAI Python SDK.`]}),_jsx(_components.td,{children:_jsx(_components.a,{href:`/gateway/extra-kwargs`,children:`Extra Kwargs`})})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[`An OpenAI chat completion, plus the fields below. The `,_jsx(_components.code,{children:`content`}),` depends on `,_jsx(_components.code,{children:`response_format`}),`. See `,_jsx(_components.a,{href:`/gateway/response-formats`,children:`Response Formats`}),` and `,_jsx(_components.a,{href:`/gateway/response-types`,children:`Response Types`}),`.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`model`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`The canonical id of the model you asked for, also when you sent an alias.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`served_model_id`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsx(_components.td,{children:`The canonical model id.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`backend`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`string`})}),_jsxs(_components.td,{children:[`The engine that ran the request: an engine kind such as `,_jsx(_components.code,{children:`vllm`}),`, or the model’s own name such as `,_jsx(_components.code,{children:`pp-ocrv6`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`provider`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`string`}),` | `,_jsx(_components.code,{children:`null`})]}),_jsxs(_components.td,{children:[`The partner that ran a provider model. `,_jsx(_components.code,{children:`null`}),` on VLM Run’s own GPUs.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`usage.cost`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`number`})}),_jsxs(_components.td,{children:[`The charge in USD. See `,_jsx(_components.a,{href:`/gateway/pricing`,children:`Pricing`}),`.`]})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`model-fallback`,children:`Model fallback`}),`\n`,_jsxs(_components.p,{children:[`A model can have a fallback deployment. When the model is not deployed, or fails with `,_jsx(_components.code,{children:`500`}),`, `,_jsx(_components.code,{children:`502`}),`, or `,_jsx(_components.code,{children:`503`}),` before the reply starts, the request runs once on the fallback. The reply keeps the `,_jsx(_components.code,{children:`model`}),` you asked for and bills at its rates, and `,_jsx(_components.code,{children:`backend`}),` names the engine that ran.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`No retry:`}),` on a `,_jsx(_components.code,{children:`504`}),`, on any `,_jsx(_components.code,{children:`4xx`}),`, or once a stream has sent its first chunk.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Scope:`}),` `,_jsx(_components.code,{children:`POST /openai/chat/completions`}),` only. A `,_jsx(_components.a,{href:`/gateway/realtime`,children:`realtime session`}),` runs on the model you named.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`One hop:`}),` a failure on the fallback is the reply.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`streaming`,children:`Streaming`}),`\n`,_jsxs(_components.p,{children:[`Set `,_jsx(_components.code,{children:`stream: true`}),` in text mode. The streamed text is byte-identical to the non-streaming reply, and a document request emits `,_jsx(_components.code,{children:`\u003cdocument>`}),`, one `,_jsx(_components.code,{children:`\u003cpage>`}),` per page, then `,_jsx(_components.code,{children:`\u003c/document>`}),`.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Streams deltas:`}),` chat VLMs, and single-image OCR methods that return the model’s text unchanged.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Buffered:`}),` every other reply is built in full, then re-chunked as `,_jsx(_components.code,{children:`chat.completion.chunk`}),` SSE. That includes rewritten text, `,_jsx(_components.code,{children:`paddleocr/pp-ocrv6`}),`, structured envelopes, and JSON modes. There is no time-to-first-token benefit.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Usage:`}),` the last chunk carries aggregated `,_jsx(_components.code,{children:`usage`}),`, including `,_jsx(_components.code,{children:`usage.cost`}),`. It arrives whether or not you pass `,_jsx(_components.code,{children:`stream_options.include_usage`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/gateway/guides/document-ocr#3-streaming-vs-non-streaming`,children:`Document OCR`}),` for page-by-page streaming.`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,expandable:`true`,numberOfLines:`31`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light dark-plus`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#24292e`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`31`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` openai `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAI`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAI(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#9CDCFE`},children:` base_url`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"https://gateway.vlm.run/openai\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#9CDCFE`},children:` api_key`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"\u003cVLMRUN_API_KEY>\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`stream `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` client.chat.completions.create(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#9CDCFE`},children:` model`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"qwen/qwen3.5-0.8b\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#9CDCFE`},children:` stream`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#9CDCFE`},children:` stream_options`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"include_usage\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#9CDCFE`},children:` messages`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`[`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"What is happening in this image?\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"image_url\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"image_url\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"url\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` chunk `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` stream:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` delta `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` chunk.choices[`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`].delta.content`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` delta:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`(delta, `}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#9CDCFE`},children:`end`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Node.js`,expandable:`true`,numberOfLines:`31`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light dark-plus`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#24292e`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`31`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` OpenAI`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"openai\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4FC1FF`},children:` client`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:` OpenAI`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` baseURL:`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"https://gateway.vlm.run/openai\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` apiKey:`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4FC1FF`},children:`VLMRUN_API_KEY`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4FC1FF`},children:` stream`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`chat`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`completions`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` model:`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"qwen/qwen3.5-0.8b\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` stream:`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` stream_options:`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`include_usage:`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` messages:`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` role:`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"user\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` content:`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`type:`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`text:`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"What is happening in this image?\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` type:`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"image_url\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` image_url:`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` url:`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4FC1FF`},children:` chunk`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:` of`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` stream`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4FC1FF`},children:` delta`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` chunk`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`choices`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`]?.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`delta`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`delta`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`process`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`stdout`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:`write`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`delta`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`CLI`,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light dark-plus`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#24292e`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:`vlmrun`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` gw`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` chat`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#569CD6`},children:` -p`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"What is happening in this image?\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#569CD6`},children:` -m`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` qwen/qwen3.5-0.8b`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL`,expandable:`true`,numberOfLines:`23`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light dark-plus`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#24292e`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`23`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` https://gateway.vlm.run/openai/chat/completions`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`$VLMRUN_API_KEY`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"qwen/qwen3.5-0.8b\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"stream\": true,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"stream_options\": { \"include_usage\": true },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"messages\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"role\": \"user\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"content\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` { \"type\": \"text\", \"text\": \"What is happening in this image?\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"type\": \"image_url\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"image_url\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"url\": \"https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})]}),`\n`,`\n`,`\n`,_jsx(Heading,{level:`2`,id:`errors-and-limits`,children:`Errors and limits`}),`\n`,_jsxs(_components.p,{children:[`Every response includes an `,_jsx(_components.code,{children:`x-request-id`}),` header. A sanitized `,_jsx(_components.code,{children:`5xx`}),` body repeats it as `,_jsx(_components.code,{children:`error.request_id`}),`. See `,_jsx(_components.a,{href:`/gateway/error-codes`,children:`Error Codes`}),` and `,_jsx(_components.a,{href:`/gateway/rate-limits`,children:`Rate Limits`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`related`,children:`Related`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`List models`,icon:`table-list`,href:`/gateway/api-reference/get-models`,children:_jsx(_components.p,{children:`Query the live model catalog and capabilities.`})}),_jsx(Card,{title:`Response Formats`,icon:`brackets-curly`,href:`/gateway/response-formats`,children:_jsx(_components.p,{children:`Text, JSON, and JSON schema modes.`})}),_jsx(Card,{title:`Supported Inputs`,icon:`images`,href:`/gateway/multimodal-inputs`,children:_jsx(_components.p,{children:`Content part types, document limits, and format tradeoffs.`})}),_jsx(Card,{title:`Document OCR`,icon:`file-lines`,href:`/gateway/guides/document-ocr`,children:_jsx(_components.p,{children:`Request knobs, page blocks, and streaming for PDFs.`})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":{"light":"github-light","dark":"dark-plus"}},"config":{},"pageMetadata":{"title":"Chat Completions","description":"OpenAI-compatible OCR, VQA, and document inference","icon":"comments","openapi":"https://gateway.vlm.run/openapi.json POST /openai/chat/completions","href":"/gateway/api-reference/post-chat-completions"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[400,409,"RequestExample,ResponseExample,Table}=_c"],[674,686,"RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!Table)_missi"],[38781,40541,"_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`16`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light dark-plus`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#24292e`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` openai `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAI`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAI(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#9CDCFE`},children:` base_url`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"https://gateway.vlm.run/openai\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#9CDCFE`},children:` api_key`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"\u003cVLMRUN_API_KEY>\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`response `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` client.chat.completions.create(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#9CDCFE`},children:` model`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"qwen/qwen3.5-0.8b\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#9CDCFE`},children:` max_tokens`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:`60`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#9CDCFE`},children:` messages`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`[{`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"role\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"content\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"What is happening in this image?\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"image_url\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"image_url\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"url\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`}},`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` ]}],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`(response.choices[`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`].message.content)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Node.js`,numberOfLines:`16`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light dark-plus`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#24292e`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` OpenAI`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"openai\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4FC1FF`},children:` client`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:` OpenAI`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` baseURL:`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"https://gateway.vlm.run/openai\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` apiKey:`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4FC1FF`},children:`VLMRUN_API_KEY`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`chat`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`completions`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` model:`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"qwen/qwen3.5-0.8b\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` max_tokens:`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:` 60`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:` messages:`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` [{ `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`role:`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"user\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`content:`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`type:`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`text:`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"What is happening in this image?\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`type:`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"image_url\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`image_url:`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`url:`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` } },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` ] }],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`choices`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`message`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`11`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light dark-plus`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#24292e`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` https://gateway.vlm.run/openai/chat/completions`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#9CDCFE`},children:`$VLMRUN_API_KEY`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"qwen/qwen3.5-0.8b\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"max_tokens\": 60,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"messages\": [{\"role\": \"user\", \"content\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` {\"type\": \"text\", \"text\": \"What is happening in this image?\"},`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` {\"type\": \"image_url\", \"image_url\": {\"url\": \"https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg\"}}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` ]}]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`CLI`,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light dark-plus`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#24292e`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#DCDCAA`},children:`vlmrun`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` gw`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` chat`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#569CD6`},children:` -m`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` qwen/qwen3.5-0.8b`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#569CD6`},children:` -p`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` \"What is happening in this image?\"`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#569CD6`},children:` -e`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:` max_tokens=`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:`60`})]}),`\n`]})})})]}),`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`200`,numberOfLines:`27`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light dark-plus`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#24292e`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`27`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"chatcmpl-b9a2e346f74e479290c4a6208d9\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#9CDCFE`},children:` \"object\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"chat.completion\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#9CDCFE`},children:` \"created\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:`1792567573`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#9CDCFE`},children:` \"model\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"qwen/qwen3.5-0.8b\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#9CDCFE`},children:` \"served_model_id\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"qwen/qwen3.5-0.8b\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#9CDCFE`},children:` \"backend\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"vllm\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#9CDCFE`},children:` \"choices\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#9CDCFE`},children:` \"index\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"assistant\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#9CDCFE`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"This image depicts a classic, vintage car (practically a **1950s Volkswagen Beetle**) parked on a paved street in front of a weathered, yellow-washed building with wooden doors.`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n\\\\n`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`### What’s happening here?`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n\\\\n`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`- **The Car**: It’s an iconic **\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#9CDCFE`},children:` \"finish_reason\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"length\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#9CDCFE`},children:` \"usage\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#9CDCFE`},children:` \"prompt_tokens\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:`321`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#9CDCFE`},children:` \"completion_tokens\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:`60`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#9CDCFE`},children:` \"total_tokens\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:`381`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#9CDCFE`},children:` \"prompt_tokens_details\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#9CDCFE`},children:` \"cached_tokens\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:`0`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#9CDCFE`},children:` \"cost\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#B5CEA8`},children:`0.000035`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`400`,numberOfLines:`10`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light dark-plus`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#24292e`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#9CDCFE`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"messages: Field required\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"invalid_request_error\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"invalid_request\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#9CDCFE`},children:` \"param\"`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#CE9178`},children:`\"messages\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`errors-and-limits`,children:`Errors and limits`}),`\n`,_jsxs(_components.p,{children:[`Every response includes an `,_jsx(_components.code,{children:`x-request-id`}),` header. A sanitized `,_jsx(_components.code,{children:`5xx`}),` body repeats it as `,_jsx(_components.code,{children:`error.request_id`}),`. See `,_jsx(_components.a,{href:`/gateway/error-codes`,children:`Error Codes`}),` and `,_jsx(_components.a,{href:`/gateway/rate-limits`,children:`Rate Limits`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`related`,children:`Related`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`List models`,icon:`table-list`,href:`/gateway/api-reference/get-models`,children:_jsx(_components.p,{children:`Query the live model catalog and capabilities.`})}),_jsx(Card,{title:`Response Formats`,icon:`brackets-curly`,href:`/gateway/response-formats`,children:_jsx(_components.p,{children:`Text, JSON, and JSON schema modes.`})}),_jsx(Card,{title:`Supported Inputs`,icon:`images`,href:`/gateway/multimodal-inputs`,children:_jsx(_components.p,{children:`Content part types, document limits, and format tradeoffs.`})}),_jsx(Card,{title:`Document OCR`,icon:`file-lines`,href:`/gateway/guides/document-ocr`,children:_jsx(_components.p,{children:`Request knobs, page blocks, and streaming for PDFs.`})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}"]]},"mdxExtracts":{"tableOfContents":[{"title":"Request","slug":"request","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[{"title":"Model fallback","slug":"model-fallback","depth":3,"children":[]}]},{"title":"Streaming","slug":"streaming","depth":2,"children":[]},{"title":"Errors and limits","slug":"errors-and-limits","depth":2,"children":[]},{"title":"Related","slug":"related","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"Python","html":"\u003cpre class=\"shiki shiki-themes github-light dark-plus\" style=\"background-color:#fff;--shiki-dark-bg:#0B0C0E;color:#24292e;--shiki-dark:#D4D4D4\" language=\"python\">\u003ccode language=\"python\" numberOfLines=\"16\">\u003cspan class=\"line\">\u003cspan style=\"color:#D73A49;--shiki-dark:#C586C0\">from\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\"> openai \u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\"> OpenAI\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">client \u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\"> OpenAI(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#E36209;--shiki-dark:#9CDCFE\"> base_url\u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\">\"https://gateway.vlm.run/openai\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#E36209;--shiki-dark:#9CDCFE\"> api_key\u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\">\"\u0026#x3C;VLMRUN_API_KEY>\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">response \u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\"> client.chat.completions.create(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#E36209;--shiki-dark:#9CDCFE\"> model\u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\">\"qwen/qwen3.5-0.8b\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#E36209;--shiki-dark:#9CDCFE\"> max_tokens\u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#B5CEA8\">60\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#E36209;--shiki-dark:#9CDCFE\"> messages\u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">[{\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\">\"role\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\">\"user\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\">\"content\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\">\"type\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\">\"text\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\">\"text\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\">\"What is happening in this image?\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">},\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\">\"type\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\">\"image_url\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\">\"image_url\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\">\"url\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\">\"https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">}},\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\"> ]}],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#DCDCAA\">print\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">(response.choices[\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#B5CEA8\">0\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">].message.content)\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Node.js","html":"\u003cpre class=\"shiki shiki-themes github-light dark-plus\" style=\"background-color:#fff;--shiki-dark-bg:#0B0C0E;color:#24292e;--shiki-dark:#D4D4D4\" language=\"typescript\">\u003ccode language=\"typescript\" numberOfLines=\"16\">\u003cspan class=\"line\">\u003cspan style=\"color:#D73A49;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#9CDCFE\"> OpenAI\u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#C586C0\"> from\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\"> \"openai\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">;\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D73A49;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#4FC1FF\"> client\u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#569CD6\"> new\u003c/span>\u003cspan style=\"color:#6F42C1;--shiki-dark:#DCDCAA\"> OpenAI\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">({\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#9CDCFE\"> baseURL:\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\"> \"https://gateway.vlm.run/openai\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#9CDCFE\"> apiKey:\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#9CDCFE\"> process\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#9CDCFE\">env\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#4FC1FF\">VLMRUN_API_KEY\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">});\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#D73A49;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#4FC1FF\"> response\u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#D73A49;--shiki-dark:#C586C0\"> await\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#9CDCFE\"> client\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#9CDCFE\">chat\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#9CDCFE\">completions\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#6F42C1;--shiki-dark:#DCDCAA\">create\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">({\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#9CDCFE\"> model:\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\"> \"qwen/qwen3.5-0.8b\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#9CDCFE\"> max_tokens:\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#B5CEA8\"> 60\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#9CDCFE\"> messages:\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\"> [{ \u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#9CDCFE\">role:\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\"> \"user\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#9CDCFE\">content:\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\"> [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#9CDCFE\">type:\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\"> \"text\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#9CDCFE\">text:\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\"> \"What is happening in this image?\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#9CDCFE\">type:\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\"> \"image_url\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#9CDCFE\">image_url:\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#9CDCFE\">url:\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\"> \"https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\"> } },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\"> ] }],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">});\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#9CDCFE\">console\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#6F42C1;--shiki-dark:#DCDCAA\">log\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#9CDCFE\">response\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#9CDCFE\">choices\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">[\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#B5CEA8\">0\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">].\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#9CDCFE\">message\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#9CDCFE\">content\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">);\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light dark-plus\" style=\"background-color:#fff;--shiki-dark-bg:#0B0C0E;color:#24292e;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"11\">\u003cspan class=\"line\">\u003cspan style=\"color:#6F42C1;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\"> https://gateway.vlm.run/openai/chat/completions\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\"> \"Authorization: Bearer \u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#9CDCFE\">$VLMRUN_API_KEY\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\"> \"model\": \"qwen/qwen3.5-0.8b\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\"> \"max_tokens\": 60,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\"> \"messages\": [{\"role\": \"user\", \"content\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\"> {\"type\": \"text\", \"text\": \"What is happening in this image?\"},\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\"> {\"type\": \"image_url\", \"image_url\": {\"url\": \"https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg\"}}\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\"> ]}]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"CLI","html":"\u003cpre class=\"shiki shiki-themes github-light dark-plus\" style=\"background-color:#fff;--shiki-dark-bg:#0B0C0E;color:#24292e;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"3\">\u003cspan class=\"line\">\u003cspan style=\"color:#6F42C1;--shiki-dark:#DCDCAA\">vlmrun\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\"> gw\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\"> chat\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\"> https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#569CD6\"> -m\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\"> qwen/qwen3.5-0.8b\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#569CD6\"> -p\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\"> \"What is happening in this image?\"\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#569CD6\"> -e\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\"> max_tokens=\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#B5CEA8\">60\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"200","html":"\u003cpre class=\"shiki shiki-themes github-light dark-plus\" style=\"background-color:#fff;--shiki-dark-bg:#0B0C0E;color:#24292e;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"27\">\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#9CDCFE\"> \"id\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\">\"chatcmpl-b9a2e346f74e479290c4a6208d9\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#9CDCFE\"> \"object\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\">\"chat.completion\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#9CDCFE\"> \"created\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#B5CEA8\">1792567573\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#9CDCFE\"> \"model\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\">\"qwen/qwen3.5-0.8b\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#9CDCFE\"> \"served_model_id\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\">\"qwen/qwen3.5-0.8b\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#9CDCFE\"> \"backend\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\">\"vllm\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#9CDCFE\"> \"choices\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#9CDCFE\"> \"index\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#B5CEA8\">0\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#9CDCFE\"> \"role\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\">\"assistant\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#9CDCFE\"> \"content\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\">\"This image depicts a classic, vintage car (practically a **1950s Volkswagen Beetle**) parked on a paved street in front of a weathered, yellow-washed building with wooden doors.\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#D7BA7D\">\\n\\n\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\">### What’s happening here?\u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#D7BA7D\">\\n\\n\u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\">- **The Car**: It’s an iconic **\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#9CDCFE\"> \"finish_reason\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\">\"length\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\"> ],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#9CDCFE\"> \"usage\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#9CDCFE\"> \"prompt_tokens\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#B5CEA8\">321\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#9CDCFE\"> \"completion_tokens\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#B5CEA8\">60\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#9CDCFE\"> \"total_tokens\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#B5CEA8\">381\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#9CDCFE\"> \"prompt_tokens_details\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#9CDCFE\"> \"cached_tokens\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#B5CEA8\">0\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#9CDCFE\"> \"cost\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#005CC5;--shiki-dark:#B5CEA8\">0.000035\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"400","html":"\u003cpre class=\"shiki shiki-themes github-light dark-plus\" style=\"background-color:#fff;--shiki-dark-bg:#0B0C0E;color:#24292e;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"10\">\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#9CDCFE\"> \"detail\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\">\"messages: Field required\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#9CDCFE\"> \"type\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\">\"invalid_request_error\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#9CDCFE\"> \"code\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\">\"invalid_request\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#005CC5;--shiki-dark:#9CDCFE\"> \"param\"\u003c/span>\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#032F62;--shiki-dark:#CE9178\">\"messages\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#24292E;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}}},"jsLinks":["/_mintlify/custom/autonomiai/a2d609d7d372c9af/unifygtm.js","/_mintlify/custom/autonomiai/12b17cdd767d0ac7/legacy.js"],"openApiReferenceData":{"operation":{"summary":"Chat Completions","operationId":"chat_completions_openai_chat_completions_post","requestBody":"fb034fc2-6f21-44c0-9212-a479a5ed89c8","responses":{"200":"f25bce12-b0a3-4c3a-8ea0-73647cc130b1","422":"b3e3a01c-1e0e-48f8-9140-ea4846a08a84"},"security":["ce97fdd3-3c15-465b-a9d9-812344bfa33b"],"method":"post","type":"path","servers":["2dc77063-3530-4c92-8acf-1a3bf465bec9","59b4e78a-c2f8-4a3f-aea7-8802bace2150"],"path":"/openai/chat/completions","baseUrlOptions":["https://gateway.vlm.run","http://localhost:8001"],"title":"Chat Completions","description":"OpenAI-compatible OCR, VQA, and document inference","codeSamples":[],"requestExampleLanguages":["python","javascript","ruby","bash"],"requiredOnlyExamples":false,"requestExamples":[{"dropdown":false,"language":"python","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light dark-plus","style":{"backgroundColor":"#fff","--shiki-dark-bg":"#0B0C0E","color":"#24292e","--shiki-dark":"#D4D4D4"},"language":"python","children":{"type":"code","key":null,"ref":null,"props":{"language":"python","numberOfLines":"16","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#D73A49","--shiki-dark":"#C586C0"},"children":"from"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":" openai "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#D73A49","--shiki-dark":"#C586C0"},"children":"import"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":" OpenAI"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":"client "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D73A49","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":" OpenAI("}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#E36209","--shiki-dark":"#9CDCFE"},"children":" base_url"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D73A49","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":"\"https://gateway.vlm.run/openai\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#E36209","--shiki-dark":"#9CDCFE"},"children":" api_key"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D73A49","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":"\"\u003cVLMRUN_API_KEY>\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":")"}}}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":"response "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D73A49","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":" client.chat.completions.create("}}]}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#E36209","--shiki-dark":"#9CDCFE"},"children":" model"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D73A49","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":"\"qwen/qwen3.5-0.8b\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"18","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#E36209","--shiki-dark":"#9CDCFE"},"children":" max_tokens"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D73A49","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#B5CEA8"},"children":"60"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"20","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#E36209","--shiki-dark":"#9CDCFE"},"children":" messages"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#D73A49","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":"[{"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":"\"role\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":"\"user\""}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":"\"content\""}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": ["}}]}},"\n",{"type":"span","key":"22","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":" {"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":"\"type\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":"\"text\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":"\"text\""}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":"\"What is happening in this image?\""}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":"},"}}]}},"\n",{"type":"span","key":"24","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":" {"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":"\"type\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":"\"image_url\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":"\"image_url\""}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": {"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":"\"url\""}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":"\"https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg\""}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":"}},"}}]}},"\n",{"type":"span","key":"26","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":" ]}],"}}}},"\n",{"type":"span","key":"28","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":")"}}}},"\n",{"type":"span","key":"30","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#DCDCAA"},"children":"print"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":"(response.choices["}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#B5CEA8"},"children":"0"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":"].message.content)"}}]}},"\n"]}}}},"filename":"Python"},{"dropdown":false,"language":"typescript","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light dark-plus","style":{"backgroundColor":"#fff","--shiki-dark-bg":"#0B0C0E","color":"#24292e","--shiki-dark":"#D4D4D4"},"language":"typescript","children":{"type":"code","key":null,"ref":null,"props":{"language":"typescript","numberOfLines":"16","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#D73A49","--shiki-dark":"#C586C0"},"children":"import"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#9CDCFE"},"children":" OpenAI"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#D73A49","--shiki-dark":"#C586C0"},"children":" from"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":" \"openai\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":";"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#D73A49","--shiki-dark":"#569CD6"},"children":"const"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#4FC1FF"},"children":" client"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#D73A49","--shiki-dark":"#D4D4D4"},"children":" ="}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D73A49","--shiki-dark":"#569CD6"},"children":" new"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#6F42C1","--shiki-dark":"#DCDCAA"},"children":" OpenAI"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":"({"}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#9CDCFE"},"children":" baseURL:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":" \"https://gateway.vlm.run/openai\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#9CDCFE"},"children":" apiKey:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#9CDCFE"},"children":" process"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#9CDCFE"},"children":"env"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#4FC1FF"},"children":"VLMRUN_API_KEY"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":"});"}}}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#D73A49","--shiki-dark":"#569CD6"},"children":"const"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#4FC1FF"},"children":" response"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#D73A49","--shiki-dark":"#D4D4D4"},"children":" ="}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#D73A49","--shiki-dark":"#C586C0"},"children":" await"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#9CDCFE"},"children":" client"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#9CDCFE"},"children":"chat"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#9CDCFE"},"children":"completions"}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#6F42C1","--shiki-dark":"#DCDCAA"},"children":"create"}},{"type":"span","key":"11","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":"({"}}]}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#9CDCFE"},"children":" model:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":" \"qwen/qwen3.5-0.8b\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"18","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#9CDCFE"},"children":" max_tokens:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#B5CEA8"},"children":" 60"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"20","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#9CDCFE"},"children":" messages:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":" [{ "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#9CDCFE"},"children":"role:"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":" \"user\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#9CDCFE"},"children":"content:"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":" ["}}]}},"\n",{"type":"span","key":"22","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":" { "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#9CDCFE"},"children":"type:"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":" \"text\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#9CDCFE"},"children":"text:"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":" \"What is happening in this image?\""}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":" },"}}]}},"\n",{"type":"span","key":"24","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":" { "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#9CDCFE"},"children":"type:"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":" \"image_url\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#9CDCFE"},"children":"image_url:"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":" { "}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#9CDCFE"},"children":"url:"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":" \"https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg\""}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":" } },"}}]}},"\n",{"type":"span","key":"26","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":" ] }],"}}}},"\n",{"type":"span","key":"28","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":"});"}}}},"\n",{"type":"span","key":"30","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#9CDCFE"},"children":"console"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#6F42C1","--shiki-dark":"#DCDCAA"},"children":"log"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":"("}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#9CDCFE"},"children":"response"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#9CDCFE"},"children":"choices"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":"["}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#B5CEA8"},"children":"0"}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":"]."}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#9CDCFE"},"children":"message"}},{"type":"span","key":"11","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"12","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#9CDCFE"},"children":"content"}},{"type":"span","key":"13","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":");"}}]}},"\n"]}}}},"filename":"Node.js"},{"dropdown":false,"language":"shellscript","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light dark-plus","style":{"backgroundColor":"#fff","--shiki-dark-bg":"#0B0C0E","color":"#24292e","--shiki-dark":"#D4D4D4"},"language":"shellscript","children":{"type":"code","key":null,"ref":null,"props":{"language":"shellscript","numberOfLines":"11","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#6F42C1","--shiki-dark":"#DCDCAA"},"children":"curl"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":" https://gateway.vlm.run/openai/chat/completions"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#569CD6"},"children":" -H"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":" \"Authorization: Bearer "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#9CDCFE"},"children":"$VLMRUN_API_KEY"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":"\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#569CD6"},"children":" -H"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":" \"Content-Type: application/json\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#569CD6"},"children":" -d"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":" '{"}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":" \"model\": \"qwen/qwen3.5-0.8b\","}}}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":" \"max_tokens\": 60,"}}}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":" \"messages\": [{\"role\": \"user\", \"content\": ["}}}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":" {\"type\": \"text\", \"text\": \"What is happening in this image?\"},"}}}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":" {\"type\": \"image_url\", \"image_url\": {\"url\": \"https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg\"}}"}}}},"\n",{"type":"span","key":"18","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":" ]}]"}}}},"\n",{"type":"span","key":"20","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":" }'"}}}},"\n"]}}}},"filename":"cURL"},{"dropdown":false,"language":"shellscript","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light dark-plus","style":{"backgroundColor":"#fff","--shiki-dark-bg":"#0B0C0E","color":"#24292e","--shiki-dark":"#D4D4D4"},"language":"shellscript","children":{"type":"code","key":null,"ref":null,"props":{"language":"shellscript","numberOfLines":"3","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#6F42C1","--shiki-dark":"#DCDCAA"},"children":"vlmrun"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":" gw"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":" chat"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":" https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#569CD6"},"children":" -m"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":" qwen/qwen3.5-0.8b"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#569CD6"},"children":" -p"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":" \"What is happening in this image?\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#569CD6"},"children":" -e"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":" max_tokens="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#B5CEA8"},"children":"60"}}]}},"\n"]}}}},"filename":"CLI"}],"requestExampleType":"mdx","responseExamples":[{"dropdown":false,"language":"json","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light dark-plus","style":{"backgroundColor":"#fff","--shiki-dark-bg":"#0B0C0E","color":"#24292e","--shiki-dark":"#D4D4D4"},"language":"json","children":{"type":"code","key":null,"ref":null,"props":{"language":"json","numberOfLines":"27","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":"{"}}}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#9CDCFE"},"children":" \"id\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":"\"chatcmpl-b9a2e346f74e479290c4a6208d9\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#9CDCFE"},"children":" \"object\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":"\"chat.completion\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#9CDCFE"},"children":" \"created\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#B5CEA8"},"children":"1792567573"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#9CDCFE"},"children":" \"model\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":"\"qwen/qwen3.5-0.8b\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#9CDCFE"},"children":" \"served_model_id\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":"\"qwen/qwen3.5-0.8b\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#9CDCFE"},"children":" \"backend\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":"\"vllm\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#9CDCFE"},"children":" \"choices\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": ["}}]}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":" {"}}}},"\n",{"type":"span","key":"18","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#9CDCFE"},"children":" \"index\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#B5CEA8"},"children":"0"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"20","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#9CDCFE"},"children":" \"message\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": {"}}]}},"\n",{"type":"span","key":"22","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#9CDCFE"},"children":" \"role\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":"\"assistant\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"24","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#9CDCFE"},"children":" \"content\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":"\"This image depicts a classic, vintage car (practically a **1950s Volkswagen Beetle**) parked on a paved street in front of a weathered, yellow-washed building with wooden doors."}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#D7BA7D"},"children":"\\n\\n"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":"### What’s happening here?"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#D7BA7D"},"children":"\\n\\n"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":"- **The Car**: It’s an iconic **\""}}]}},"\n",{"type":"span","key":"26","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":" },"}}}},"\n",{"type":"span","key":"28","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#9CDCFE"},"children":" \"finish_reason\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":"\"length\""}}]}},"\n",{"type":"span","key":"30","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":" }"}}}},"\n",{"type":"span","key":"32","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":" ],"}}}},"\n",{"type":"span","key":"34","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#9CDCFE"},"children":" \"usage\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": {"}}]}},"\n",{"type":"span","key":"36","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#9CDCFE"},"children":" \"prompt_tokens\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#B5CEA8"},"children":"321"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"38","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#9CDCFE"},"children":" \"completion_tokens\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#B5CEA8"},"children":"60"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"40","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#9CDCFE"},"children":" \"total_tokens\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#B5CEA8"},"children":"381"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"42","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#9CDCFE"},"children":" \"prompt_tokens_details\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": {"}}]}},"\n",{"type":"span","key":"44","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#9CDCFE"},"children":" \"cached_tokens\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#B5CEA8"},"children":"0"}}]}},"\n",{"type":"span","key":"46","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":" },"}}}},"\n",{"type":"span","key":"48","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#9CDCFE"},"children":" \"cost\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#B5CEA8"},"children":"0.000035"}}]}},"\n",{"type":"span","key":"50","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":" }"}}}},"\n",{"type":"span","key":"52","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":"}"}}}},"\n"]}}}},"filename":"200"},{"dropdown":false,"language":"json","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light dark-plus","style":{"backgroundColor":"#fff","--shiki-dark-bg":"#0B0C0E","color":"#24292e","--shiki-dark":"#D4D4D4"},"language":"json","children":{"type":"code","key":null,"ref":null,"props":{"language":"json","numberOfLines":"10","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":"{"}}}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#9CDCFE"},"children":" \"detail\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": {"}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#9CDCFE"},"children":" \"error\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": {"}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#9CDCFE"},"children":" \"message\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":"\"messages: Field required\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#9CDCFE"},"children":" \"type\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":"\"invalid_request_error\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#9CDCFE"},"children":" \"code\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":"\"invalid_request\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#005CC5","--shiki-dark":"#9CDCFE"},"children":" \"param\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#032F62","--shiki-dark":"#CE9178"},"children":"\"messages\""}}]}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":" }"}}}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":" }"}}}},"\n",{"type":"span","key":"18","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#24292E","--shiki-dark":"#D4D4D4"},"children":"}"}}}},"\n"]}}}},"filename":"400"}],"responseExampleType":"mdx"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"properties":{"model":{"type":"string","title":"Model","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"messages":{"items":{"properties":{"role":{"type":"string","enum":["system","user","assistant","tool"],"title":"Role","isRequired":true,"uniqueKey":"messages.items.[INDEX].role","typeLabel":"enum\u003cstring>"},"content":{"oneOf":[{"type":"string","title":"Content","uniqueKey":"messages.items.[INDEX].content.oneOf.0","typeLabel":"string"},{"type":"array","items":{"properties":{"type":{"type":"string","enum":["text","image_url","video_url","document_url","file_url","file"],"title":"Type","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"text":{"oneOf":[{"type":"string","title":"Text","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].text.oneOf.0","typeLabel":"string"},{"type":"null","title":"Text","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].text.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].text","typeLabel":"string | null"},"image_url":{"oneOf":[{"type":"object","title":"ImageUrl","required":["url"],"properties":{"url":{"type":"string","title":"Url","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].image_url.oneOf.0.url","typeLabel":"string"},"detail":{"type":"string","enum":["auto","low","high"],"title":"Detail","default":"auto","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].image_url.oneOf.0.detail","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].image_url.oneOf.0","typeLabel":"ImageUrl · object"},{"type":"null","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].image_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].image_url","typeLabel":"ImageUrl · object | null"},"video_url":{"oneOf":[{"type":"object","title":"VideoUrl","required":["url"],"properties":{"url":{"type":"string","title":"Url","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].video_url.oneOf.0.url","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].video_url.oneOf.0","typeLabel":"VideoUrl · object"},{"type":"null","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].video_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].video_url","typeLabel":"VideoUrl · object | null"},"document_url":{"oneOf":[{"type":"object","title":"DocumentUrl","description":"PDF document referenced by URL or base64 data URI.","required":["url"],"properties":{"url":{"type":"string","title":"Url","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].document_url.oneOf.0.url","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].document_url.oneOf.0","typeLabel":"DocumentUrl · object"},{"type":"null","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].document_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].document_url","typeLabel":"DocumentUrl · object | null"},"file_url":{"oneOf":[{"type":"object","title":"FileUrl","description":"Alias for :class:`DocumentUrl` — accepted for PDF document inputs.","required":["url"],"properties":{"url":{"type":"string","title":"Url","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].file_url.oneOf.0.url","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].file_url.oneOf.0","typeLabel":"FileUrl · object"},{"type":"null","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].file_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].file_url","typeLabel":"FileUrl · object | null"},"file":{"oneOf":[{"type":"object","title":"FileContent","description":"OpenAI-compatible file attachment (Pydantic AI ``DocumentUrl`` maps here).","required":["file_data"],"properties":{"file_data":{"type":"string","title":"File Data","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].file.oneOf.0.file_data","typeLabel":"string"},"filename":{"oneOf":[{"type":"string","title":"Filename","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].file.oneOf.0.filename.oneOf.0","typeLabel":"string"},{"type":"null","title":"Filename","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].file.oneOf.0.filename.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].file.oneOf.0.filename","typeLabel":"string | null"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].file.oneOf.0","typeLabel":"FileContent · object"},{"type":"null","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].file.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].file","typeLabel":"FileContent · object | null"}},"type":"object","required":["type"],"title":"ContentPart","description":"A single content part in a multi-modal message.","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX]","typeLabel":"ContentPart · object"},"title":"Content","uniqueKey":"messages.items.[INDEX].content.oneOf.1","typeLabel":"ContentPart · object[]"},{"type":"null","title":"Content","uniqueKey":"messages.items.[INDEX].content.oneOf.2","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content","typeLabel":"string | ContentPart · object[] | null"},"tool_calls":{"oneOf":[{"type":"array","items":{"additionalProperties":true,"type":"object","uniqueKey":"messages.items.[INDEX].tool_calls.oneOf.0.items.[INDEX]","typeLabel":"object"},"title":"Tool Calls","uniqueKey":"messages.items.[INDEX].tool_calls.oneOf.0","typeLabel":"Tool Calls · object[]"},{"type":"null","title":"Tool Calls","uniqueKey":"messages.items.[INDEX].tool_calls.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].tool_calls","typeLabel":"Tool Calls · object[] | null"},"tool_call_id":{"oneOf":[{"type":"string","title":"Tool Call Id","uniqueKey":"messages.items.[INDEX].tool_call_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Tool Call Id","uniqueKey":"messages.items.[INDEX].tool_call_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].tool_call_id","typeLabel":"string | null"},"name":{"oneOf":[{"type":"string","title":"Name","uniqueKey":"messages.items.[INDEX].name.oneOf.0","typeLabel":"string"},{"type":"null","title":"Name","uniqueKey":"messages.items.[INDEX].name.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].name","typeLabel":"string | null"}},"type":"object","required":["role"],"title":"ChatMessage","description":"A single message in the conversation.","uniqueKey":"messages.items.[INDEX]","typeLabel":"ChatMessage · object"},"type":"array","title":"Messages","isRequired":true,"uniqueKey":"messages","typeLabel":"ChatMessage · object[]"},"temperature":{"oneOf":[{"type":"number","title":"Temperature","uniqueKey":"temperature.oneOf.0","typeLabel":"number"},{"type":"null","title":"Temperature","uniqueKey":"temperature.oneOf.1","typeLabel":"null"}],"uniqueKey":"temperature","typeLabel":"number | null"},"max_tokens":{"oneOf":[{"type":"integer","title":"Max Tokens","uniqueKey":"max_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Max Tokens","uniqueKey":"max_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"max_tokens","typeLabel":"integer | null"},"top_p":{"type":"number","title":"Top P","default":1,"uniqueKey":"top_p","typeLabel":"number"},"frequency_penalty":{"type":"number","title":"Frequency Penalty","default":0,"uniqueKey":"frequency_penalty","typeLabel":"number"},"presence_penalty":{"type":"number","title":"Presence Penalty","default":0,"uniqueKey":"presence_penalty","typeLabel":"number"},"stop":{"oneOf":[{"type":"string","title":"Stop","uniqueKey":"stop.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"string","uniqueKey":"stop.oneOf.1.items.[INDEX]","typeLabel":"string"},"title":"Stop","uniqueKey":"stop.oneOf.1","typeLabel":"string[]"},{"type":"null","title":"Stop","uniqueKey":"stop.oneOf.2","typeLabel":"null"}],"uniqueKey":"stop","typeLabel":"string | string[] | null"},"stream":{"type":"boolean","title":"Stream","default":false,"uniqueKey":"stream","typeLabel":"boolean"},"n":{"type":"integer","title":"N","default":1,"uniqueKey":"n","typeLabel":"integer"},"reasoning_effort":{"oneOf":[{"type":"string","title":"Reasoning Effort","default":"medium","enum":["none","minimal","low","medium","high","xhigh"],"uniqueKey":"reasoning_effort.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","title":"Reasoning Effort","default":"medium","uniqueKey":"reasoning_effort.oneOf.1","typeLabel":"null"}],"uniqueKey":"reasoning_effort","typeLabel":"enum\u003cstring> | null"},"chat_template_kwargs":{"oneOf":[{"type":"object","title":"Chat Template Kwargs","additionalProperties":true,"uniqueKey":"chat_template_kwargs.oneOf.0","typeLabel":"Chat Template Kwargs · object"},{"type":"null","title":"Chat Template Kwargs","uniqueKey":"chat_template_kwargs.oneOf.1","typeLabel":"null"}],"uniqueKey":"chat_template_kwargs","typeLabel":"Chat Template Kwargs · object | null"},"llm":{"oneOf":[{"type":"string","title":"Llm","uniqueKey":"llm.oneOf.0","typeLabel":"string"},{"type":"null","title":"Llm","uniqueKey":"llm.oneOf.1","typeLabel":"null"}],"uniqueKey":"llm","typeLabel":"string | null"},"method":{"oneOf":[{"type":"string","title":"Method","uniqueKey":"method.oneOf.0","typeLabel":"string"},{"type":"null","title":"Method","uniqueKey":"method.oneOf.1","typeLabel":"null"}],"uniqueKey":"method","typeLabel":"string | null"},"document_method":{"oneOf":[{"type":"string","title":"Document Method","uniqueKey":"document_method.oneOf.0","typeLabel":"string"},{"type":"null","title":"Document Method","uniqueKey":"document_method.oneOf.1","typeLabel":"null"}],"uniqueKey":"document_method","typeLabel":"string | null"},"method_params":{"oneOf":[{"type":"object","title":"Method Params","additionalProperties":true,"uniqueKey":"method_params.oneOf.0","typeLabel":"Method Params · object"},{"type":"null","title":"Method Params","uniqueKey":"method_params.oneOf.1","typeLabel":"null"}],"uniqueKey":"method_params","typeLabel":"Method Params · object | null"},"video_max_frames":{"oneOf":[{"type":"integer","title":"Video Max Frames","uniqueKey":"video_max_frames.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Video Max Frames","uniqueKey":"video_max_frames.oneOf.1","typeLabel":"null"}],"uniqueKey":"video_max_frames","typeLabel":"integer | null"},"video_fps":{"oneOf":[{"type":"number","title":"Video Fps","uniqueKey":"video_fps.oneOf.0","typeLabel":"number"},{"type":"null","title":"Video Fps","uniqueKey":"video_fps.oneOf.1","typeLabel":"null"}],"uniqueKey":"video_fps","typeLabel":"number | null"},"video_encoder":{"oneOf":[{"type":"string","title":"Video Encoder","const":"native","uniqueKey":"video_encoder.oneOf.0","typeLabel":"string"},{"type":"null","title":"Video Encoder","uniqueKey":"video_encoder.oneOf.1","typeLabel":"null"}],"uniqueKey":"video_encoder","typeLabel":"string | null"},"video_encoder_params":{"oneOf":[{"type":"object","title":"Video Encoder Params","additionalProperties":true,"uniqueKey":"video_encoder_params.oneOf.0","typeLabel":"Video Encoder Params · object"},{"type":"null","title":"Video Encoder Params","uniqueKey":"video_encoder_params.oneOf.1","typeLabel":"null"}],"uniqueKey":"video_encoder_params","typeLabel":"Video Encoder Params · object | null"},"image_resolution":{"oneOf":[{"type":"string","title":"Image Resolution","enum":["224x224","336x336","384x384","448x448","512x512","768x768"],"uniqueKey":"image_resolution.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","title":"Image Resolution","uniqueKey":"image_resolution.oneOf.1","typeLabel":"null"}],"uniqueKey":"image_resolution","typeLabel":"enum\u003cstring> | null"},"video_resolution":{"oneOf":[{"type":"string","title":"Video Resolution","enum":["256x192","320x240","448x336","512x384","640x480"],"uniqueKey":"video_resolution.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","title":"Video Resolution","uniqueKey":"video_resolution.oneOf.1","typeLabel":"null"}],"uniqueKey":"video_resolution","typeLabel":"enum\u003cstring> | null"},"document_dpi":{"type":"integer","minimum":1,"title":"Document Dpi","default":96,"uniqueKey":"document_dpi","typeLabel":"integer"},"document_max_pages":{"oneOf":[{"type":"integer","title":"Document Max Pages","uniqueKey":"document_max_pages.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Document Max Pages","uniqueKey":"document_max_pages.oneOf.1","typeLabel":"null"}],"uniqueKey":"document_max_pages","typeLabel":"integer | null"},"document_pages":{"oneOf":[{"type":"array","items":{"oneOf":[{"type":"integer","uniqueKey":"document_pages.oneOf.0.items.[INDEX].oneOf.0","typeLabel":"integer"},{"type":"object","properties":{"[0]":{"type":"integer","uniqueKey":"document_pages.oneOf.0.items.[INDEX].oneOf.1.[0]","typeLabel":"integer"},"[1]":{"type":"integer","uniqueKey":"document_pages.oneOf.0.items.[INDEX].oneOf.1.[1]","typeLabel":"integer"}},"uniqueKey":"document_pages.oneOf.0.items.[INDEX].oneOf.1","typeLabel":"object"}],"uniqueKey":"document_pages.oneOf.0.items.[INDEX]","typeLabel":"integer | object"},"title":"Document Pages","uniqueKey":"document_pages.oneOf.0","typeLabel":"(integer | object)[]"},{"type":"null","title":"Document Pages","uniqueKey":"document_pages.oneOf.1","typeLabel":"null"}],"uniqueKey":"document_pages","typeLabel":"(integer | object)[] | null"},"document_mode":{"oneOf":[{"type":"string","title":"Document Mode","enum":["page","document"],"uniqueKey":"document_mode.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","title":"Document Mode","uniqueKey":"document_mode.oneOf.1","typeLabel":"null"}],"uniqueKey":"document_mode","typeLabel":"enum\u003cstring> | null"},"response_format":{"oneOf":[{"type":"object","title":"ResponseFormat","description":"Requested serialization of the assistant reply.\n\nMirrors the OpenAI ``response_format`` object so existing client code\nkeeps working:\n\n- ``{\"type\": \"text\"}`` (the default) returns the reply verbatim.\n- ``{\"type\": \"json_object\"}`` returns the reply as a single valid JSON\n object string: structured results (detections, OCR regions, document\n pages) are emitted as parseable JSON under a top-level ``data`` key.\n- ``{\"type\": \"json_schema\"}`` **constrains generation** to the supplied\n schema, on the models that declare\n :attr:`ModelCapabilities.supports_json_schema` — the chat VLMs served by\n vLLM and the routed provider models. Anything else (the OCR and\n detection models, whose reply is an envelope this gateway builds rather\n than text the model is free to shape) rejects it with a 400 capability\n violation instead of accepting it and ignoring it.","properties":{"type":{"type":"string","enum":["text","json_object","json_schema"],"title":"Type","default":"text","uniqueKey":"response_format.oneOf.0.type","typeLabel":"enum\u003cstring>"},"json_schema":{"oneOf":[{"type":"object","title":"Json Schema","additionalProperties":true,"uniqueKey":"response_format.oneOf.0.json_schema.oneOf.0","typeLabel":"Json Schema · object"},{"type":"null","title":"Json Schema","uniqueKey":"response_format.oneOf.0.json_schema.oneOf.1","typeLabel":"null"}],"uniqueKey":"response_format.oneOf.0.json_schema","typeLabel":"Json Schema · object | null"}},"uniqueKey":"response_format.oneOf.0","typeLabel":"ResponseFormat · object"},{"type":"null","uniqueKey":"response_format.oneOf.1","typeLabel":"null"}],"uniqueKey":"response_format","typeLabel":"ResponseFormat · object | null"},"precision":{"type":"integer","maximum":8,"minimum":1,"title":"Precision","default":4,"uniqueKey":"precision","typeLabel":"integer"}},"type":"object","required":["model","messages"],"title":"ChatCompletionRequest","description":"OpenAI-compatible chat completion request.","uniqueKey":"","typeLabel":"ChatCompletionRequest · object"},"example":{},"examples":{"Example":{"title":"Example","value":{}}},"exampleType":"examples"}},"required":true,"exampleType":"examples"},"responses":{"f25bce12-b0a3-4c3a-8ea0-73647cc130b1":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"model":{"type":"string","title":"Model","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"choices":{"items":{"properties":{"message":{"properties":{"content":{"type":"string","title":"Content","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.content","typeLabel":"string"},"role":{"type":"string","const":"assistant","title":"Role","default":"assistant","uniqueKey":"choices.items.[INDEX].message.role","typeLabel":"string"},"reasoning":{"oneOf":[{"type":"string","title":"Reasoning","uniqueKey":"choices.items.[INDEX].message.reasoning.oneOf.0","typeLabel":"string"},{"type":"null","title":"Reasoning","uniqueKey":"choices.items.[INDEX].message.reasoning.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].message.reasoning","typeLabel":"string | null"}},"type":"object","required":["content"],"title":"ChoiceMessage","isRequired":true,"uniqueKey":"choices.items.[INDEX].message","typeLabel":"ChoiceMessage · object"},"index":{"type":"integer","title":"Index","default":0,"uniqueKey":"choices.items.[INDEX].index","typeLabel":"integer"},"finish_reason":{"type":"string","enum":["stop","length"],"title":"Finish Reason","default":"stop","uniqueKey":"choices.items.[INDEX].finish_reason","typeLabel":"enum\u003cstring>"}},"type":"object","required":["message"],"title":"Choice","uniqueKey":"choices.items.[INDEX]","typeLabel":"Choice · object"},"type":"array","title":"Choices","isRequired":true,"uniqueKey":"choices","typeLabel":"Choice · object[]"},"id":{"type":"string","title":"Id","uniqueKey":"id","typeLabel":"string"},"object":{"type":"string","const":"chat.completion","title":"Object","default":"chat.completion","uniqueKey":"object","typeLabel":"string"},"created":{"type":"integer","title":"Created","uniqueKey":"created","typeLabel":"integer"},"served_model_id":{"oneOf":[{"type":"string","title":"Served Model Id","uniqueKey":"served_model_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Served Model Id","uniqueKey":"served_model_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"served_model_id","typeLabel":"string | null"},"backend":{"oneOf":[{"type":"string","title":"Backend","uniqueKey":"backend.oneOf.0","typeLabel":"string"},{"type":"null","title":"Backend","uniqueKey":"backend.oneOf.1","typeLabel":"null"}],"uniqueKey":"backend","typeLabel":"string | null"},"provider":{"oneOf":[{"type":"string","title":"Provider","uniqueKey":"provider.oneOf.0","typeLabel":"string"},{"type":"null","title":"Provider","uniqueKey":"provider.oneOf.1","typeLabel":"null"}],"uniqueKey":"provider","typeLabel":"string | null"},"usage":{"properties":{"prompt_tokens":{"type":"integer","title":"Prompt Tokens","default":0,"uniqueKey":"usage.prompt_tokens","typeLabel":"integer"},"completion_tokens":{"type":"integer","title":"Completion Tokens","default":0,"uniqueKey":"usage.completion_tokens","typeLabel":"integer"},"total_tokens":{"type":"integer","title":"Total Tokens","default":0,"uniqueKey":"usage.total_tokens","typeLabel":"integer"},"prompt_tokens_details":{"oneOf":[{"type":"object","title":"PromptTokensDetails","description":"OpenAI-compatible breakdown of prompt token categories.","properties":{"cached_tokens":{"type":"integer","title":"Cached Tokens","default":0,"uniqueKey":"usage.prompt_tokens_details.oneOf.0.cached_tokens","typeLabel":"integer"}},"uniqueKey":"usage.prompt_tokens_details.oneOf.0","typeLabel":"PromptTokensDetails · object"},{"type":"null","uniqueKey":"usage.prompt_tokens_details.oneOf.1","typeLabel":"null"}],"uniqueKey":"usage.prompt_tokens_details","typeLabel":"PromptTokensDetails · object | null"},"completion_tokens_details":{"oneOf":[{"type":"object","title":"CompletionTokensDetails","description":"OpenAI-compatible breakdown of completion token categories.","properties":{"reasoning_tokens":{"type":"integer","title":"Reasoning Tokens","default":0,"uniqueKey":"usage.completion_tokens_details.oneOf.0.reasoning_tokens","typeLabel":"integer"}},"uniqueKey":"usage.completion_tokens_details.oneOf.0","typeLabel":"CompletionTokensDetails · object"},{"type":"null","uniqueKey":"usage.completion_tokens_details.oneOf.1","typeLabel":"null"}],"uniqueKey":"usage.completion_tokens_details","typeLabel":"CompletionTokensDetails · object | null"},"cost":{"oneOf":[{"type":"number","title":"Cost","uniqueKey":"usage.cost.oneOf.0","typeLabel":"number"},{"type":"null","title":"Cost","uniqueKey":"usage.cost.oneOf.1","typeLabel":"null"}],"uniqueKey":"usage.cost","typeLabel":"number | null"}},"type":"object","title":"Usage","default":{"prompt_tokens":0,"completion_tokens":0,"total_tokens":0},"uniqueKey":"usage","typeLabel":"Usage · object"}},"type":"object","required":["model","choices"],"title":"ChatCompletionResponse","description":"OpenAI-compatible chat completion response.\n\nBeyond the OpenAI shape we surface three extra fields so clients can\naudit which model actually produced the output:\n\n- ``served_model_id`` — the canonical id of the deployment that\n ran the request (e.g. ``\"rednote-hilab/dots.mocr\"``), even when the\n caller used a short alias. Mirrors the ``\"id\"`` echoed in\n ``GET /openai/models``.\n- ``backend`` — static label naming the inference runtime that\n served the request (``\"vllm\"`` / ``\"transformers\"`` /\n ``\"paddleocr\"`` / ...). Lets clients see the runtime\n without opening a separate /models RPC.\n- ``provider`` — who ran the hardware. Absent for models served on\n VLM Run's own GPUs; otherwise the upstream that served the request\n (``\"google-vertex\"``, ``\"huggingface\"``, ...). Reported per\n response rather than read from the catalog because a request can be\n routed to a different upstream than the last one — the same model id\n may be served by more than one, and they do not always agree on\n capabilities or price.\n\nThe OpenAI-standard ``model`` field still echoes the *canonical*\nid (matching OpenAI's own behaviour where a generic alias like\n``gpt-4`` resolves to the dated snapshot ``gpt-4-0613`` in the\nresponse).","uniqueKey":"","typeLabel":"ChatCompletionResponse · object"},"examples":{"Example":{"title":"Example","value":{"model":"\u003cstring>","choices":[{"message":{"content":"\u003cstring>","role":"assistant","reasoning":"\u003cstring>"},"index":0,"finish_reason":"stop"}],"id":"\u003cstring>","object":"chat.completion","created":123,"served_model_id":"\u003cstring>","backend":"\u003cstring>","provider":"\u003cstring>","usage":{"prompt_tokens":0,"completion_tokens":0,"total_tokens":0}}}},"exampleType":"generated"}},"exampleType":"generated"},"b3e3a01c-1e0e-48f8-9140-ea4846a08a84":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"oneOf":[{"type":"string","uniqueKey":"detail.items.[INDEX].loc.items.[INDEX].oneOf.0","typeLabel":"string"},{"type":"integer","uniqueKey":"detail.items.[INDEX].loc.items.[INDEX].oneOf.1","typeLabel":"integer"}],"uniqueKey":"detail.items.[INDEX].loc.items.[INDEX]","typeLabel":"string | integer"},"type":"array","title":"Location","isRequired":true,"uniqueKey":"detail.items.[INDEX].loc","typeLabel":"(string | integer)[]"},"msg":{"type":"string","title":"Message","isRequired":true,"uniqueKey":"detail.items.[INDEX].msg","typeLabel":"string"},"type":{"type":"string","title":"Error Type","isRequired":true,"uniqueKey":"detail.items.[INDEX].type","typeLabel":"string"},"input":{"oneOf":[{"title":"Input"}],"uniqueKey":"detail.items.[INDEX].input","typeLabel":"any"},"ctx":{"type":"object","title":"Context","uniqueKey":"detail.items.[INDEX].ctx","typeLabel":"Context · object"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError","uniqueKey":"detail.items.[INDEX]","typeLabel":"ValidationError · object"},"type":"array","title":"Detail","uniqueKey":"detail","typeLabel":"ValidationError · object[]"}},"type":"object","title":"HTTPValidationError","uniqueKey":"","typeLabel":"HTTPValidationError · object"},"examples":{"Example":{"title":"Example","value":{"detail":[{"loc":["\u003cstring>"],"msg":"\u003cstring>","type":"\u003cstring>","input":"\u003cunknown>","ctx":{}}]}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"ce97fdd3-3c15-465b-a9d9-812344bfa33b":{"_PermissiveHTTPBearer":{"type":"http","scheme":"bearer","scopes":[],"schemeName":"_PermissiveHTTPBearer"}}},"servers":{"2dc77063-3530-4c92-8acf-1a3bf465bec9":{"url":"https://gateway.vlm.run","description":"Production"},"59b4e78a-c2f8-4a3f-aea7-8802bace2150":{"url":"http://localhost:8001","description":"Local development"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","scopes":[],"schemeName":"_PermissiveHTTPBearer"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"_PermissiveHTTPBearer","name":"Authorization"}],"title":"_PermissiveHTTPBearer"}]},"originalFileLocation":"https://gateway.vlm.run/openapi.json"},"subdomain":"autonomiai","siteName":"VLM Run","title":"Chat Completions - VLM Run","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-23T21:56:49.575Z","originalFileLocation":"gateway/api-reference/post-chat-completions.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"light\";if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"OpenAI-compatible OCR, VQA, and document inference\">\u003cmeta data-mint-head name=\"application-name\" content=\"VLM Run\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/autonomiai/pD_ZZ-IBiToGpeSG/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/autonomiai/pD_ZZ-IBiToGpeSG/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/autonomiai/pD_ZZ-IBiToGpeSG/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/autonomiai/pD_ZZ-IBiToGpeSG/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/autonomiai/pD_ZZ-IBiToGpeSG/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/autonomiai/pD_ZZ-IBiToGpeSG/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/autonomiai/pD_ZZ-IBiToGpeSG/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/autonomiai/pD_ZZ-IBiToGpeSG/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/autonomiai/pD_ZZ-IBiToGpeSG/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Chat Completions - VLM Run\">\u003cmeta data-mint-head property=\"og:description\" content=\"OpenAI-compatible OCR, VQA, and document inference\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"VLM Run\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.vlm.run/gateway/api-reference/post-chat-completions\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://autonomiai.mintlify.site/_mintlify/api/og/v2?division=OpenAI+Compatible+API\u0026amp;title=Chat+Completions\u0026amp;description=OpenAI-compatible+OCR%2C+VQA%2C+and+document+inference\u0026amp;theme=9e78e25362d3b3059041160c\u0026amp;signature=b2de04104b80f76200a51a2d0e075b86e44dc6b8d5f4fa893e208c8a805ea24f\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Chat Completions - VLM Run\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"OpenAI-compatible OCR, VQA, and document inference\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://autonomiai.mintlify.site/_mintlify/api/og/v2?division=OpenAI+Compatible+API\u0026amp;title=Chat+Completions\u0026amp;description=OpenAI-compatible+OCR%2C+VQA%2C+and+document+inference\u0026amp;theme=9e78e25362d3b3059041160c\u0026amp;signature=b2de04104b80f76200a51a2d0e075b86e44dc6b8d5f4fa893e208c8a805ea24f\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/autonomiai/pD_ZZ-IBiToGpeSG/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"VLM Run\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1F5ACA\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.vlm.run/gateway/api-reference/post-chat-completions\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/gateway/api-reference/post-chat-completions.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.vlm.run/#organization\",\"name\":\"VLM Run\",\"url\":\"https://docs.vlm.run\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/autonomiai/0Yrk6nqaa_NlkPay/assets/logo/vlm-run-icon.svg?fit=max\u0026auto=format\u0026n=0Yrk6nqaa_NlkPay\u0026q=85\u0026s=fbea8392452b746e14273d7670a4f535\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.vlm.run#website\",\"name\":\"VLM Run\",\"url\":\"https://docs.vlm.run\",\"publisher\":{\"@id\":\"https://docs.vlm.run/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.vlm.run/gateway/api-reference/post-chat-completions#webpage\",\"url\":\"https://docs.vlm.run/gateway/api-reference/post-chat-completions\",\"name\":\"Chat Completions\",\"description\":\"OpenAI-compatible OCR, VQA, and document inference\",\"dateModified\":\"2026-11-23T21:56:49.575Z\",\"isPartOf\":{\"@id\":\"https://docs.vlm.run#website\"},\"breadcrumb\":{\"@id\":\"https://docs.vlm.run/gateway/api-reference/post-chat-completions#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.vlm.run/gateway/api-reference/post-chat-completions#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"OpenAI Compatible API\",\"item\":\"https://docs.vlm.run/gateway/api-reference/get-health\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Chat Completions\",\"item\":\"https://docs.vlm.run/gateway/api-reference/post-chat-completions\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.vlm.run/gateway/api-reference/post-chat-completions#apireference\",\"headline\":\"Chat Completions\",\"name\":\"Chat Completions\",\"description\":\"OpenAI-compatible OCR, VQA, and document inference\",\"url\":\"https://docs.vlm.run/gateway/api-reference/post-chat-completions\",\"mainEntityOfPage\":{\"@id\":\"https://docs.vlm.run/gateway/api-reference/post-chat-completions#webpage\"},\"dateModified\":\"2026-11-23T21:56:49.575Z\",\"publisher\":{\"@id\":\"https://docs.vlm.run/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.vlm.run#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"VLM Run\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"VLM Run\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/gateway/api-reference/post-chat-completions.md","siteName":"VLM Run","nav":{"global":null,"tabs":[{"tab":"Gateway","icon":"network-wired","pages":[{"title":"Gateway","href":"/gateway/introduction"}]},{"tab":"Orion","icon":"robot","pages":[{"title":"Orion","href":"/agents/introduction"}]},{"tab":"Guides","icon":"book-open","pages":[{"title":"Guides","href":"/gateway/guides/document-ocr"}]},{"tab":"API reference","icon":"server","anchors":[{"anchor":"Gateway API","icon":"network-wired","groups":[{"group":"OpenAI Compatible API","pages":[{"title":"Health","description":"Gateway liveness and the build it runs","icon":"heartbeat","api":"GET https://gateway.vlm.run/health","href":"/gateway/api-reference/get-health"},{"title":"Chat Completions","icon":"comments","openapi":"https://gateway.vlm.run/openapi.json POST /openai/chat/completions","href":"/gateway/api-reference/post-chat-completions"},{"title":"List Models","description":"Available Gateway models and their capabilities","icon":"table-list","openapi":"https://gateway.vlm.run/openapi.json GET /openai/models","href":"/gateway/api-reference/get-models"},{"title":"Get Model","icon":"cube","openapi":"https://gateway.vlm.run/openapi.json GET /openai/models/{model_id}","href":"/gateway/api-reference/get-model-by-id"},{"title":"Get Completion","icon":"receipt","openapi":"https://gateway.vlm.run/openapi.json GET /openai/completions/{completion_id}","href":"/gateway/api-reference/get-completion"},{"title":"Embeddings","icon":"vector-square","openapi":"https://gateway.vlm.run/openapi.json POST /openai/embeddings","href":"/gateway/api-reference/post-embeddings"},{"title":"Audio Transcriptions","icon":"microphone","openapi":"https://gateway.vlm.run/openapi.json POST /openai/audio/transcriptions","href":"/gateway/api-reference/post-audio-transcriptions"}]},{"group":"TypeSafe Compatible API","pages":[{"title":"System One","openapi":"https://gateway.vlm.run/openapi.json POST /typesafe/v1/systemone","icon":"scale-balanced","href":"/gateway/api-reference/post-systemone"},{"title":"List Models","openapi":"https://gateway.vlm.run/openapi.json GET /typesafe/v1/models","icon":"table-list","href":"/gateway/api-reference/get-typesafe-models"}]},{"group":"Realtime API","pages":[{"title":"Realtime Frames","icon":"video","href":"/gateway/api-reference/ws-realtime"},{"title":"Client Secrets","icon":"key","href":"/gateway/api-reference/post-ws-client-secrets"},{"title":"Realtime System One","icon":"bolt","href":"/gateway/api-reference/ws-systemone"}]}]},{"anchor":"Orion API","icon":"robot","pages":[{"title":"Orion API","href":"/api-reference"}]}]},{"tab":"Developers","icon":"code","pages":[{"title":"Developers","href":"/sdk-reference/getting-started"}]}]},"basePath":"","title":"Chat Completions - VLM Run","deploymentId":"dpl_57NA6NKtrcUBhuxv6Tm2hAi21TK4","buildId":"dpl_57NA6NKtrcUBhuxv6Tm2hAi21TK4","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CalkZbx8.js","snippetPresets-DtvvunBK.js","utils-Bn5byECU.js","style-to-object-BY3JEAdk.js","utils-DOTAoFcT.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-CDauU9aU.js","conditional-requirements-CFM0id0Q.js","cloneDeep-k2aHAqp5.js","_Uint8Array-CQuRedKT.js","isObject-FP1Yky1u.js","ApiExamples-CSBS2nDe.js","usePlaygroundInputsStore-BkN7uKke.js","shallow-6IMgYiEa.js","isEqual-DicuCknl.js","CodeSnippets-C268fsRY.js","CodeSnippet-BBA8eWiP.js","getApiPlaygroundDisplay-DMK5GRGS.js","Page-Dz3zehSO.js","api-description-markdown-DwoksVHI.js","DynamicMarkdown-XsrWkK-b.js","SectionHeading-AR_EzDYe.js","MethodPill-CvOL8UTX.js","getPastedJson-BazkMjRw.js","Check2Icon-BL_xILK9.js","axios-CsQoIw0U.js","Markdown-CX8Sr5UZ.js","AssistantPageLink-B3VcLrB0.js","dist-WDJo6xkj.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}