Skip to main content
Install the CLI, point any OpenAI SDK at https://gateway.vlm.run/v1/openai, or add the vlmrun-gw agent skill. This page covers the three most common request shapes: visual Q&A, video Q&A, and document OCR. See Introduction for the rationale behind the VLM Run Gateway.

Prerequisites

Base URL: https://gateway.vlm.run/v1/openai. Use Authorization: Bearer <VLMRUN_API_KEY>, or api_key="vlmrun" for anonymous access. See Authentication and Rate Limits.

Coding agents

Skills-aware coding agents can drive the Gateway through the vlmrun-gw skill: model catalog, vlmrun gw commands, request knobs, response shapes, and errors. The canonical skill file lives at vlm.run/gateway/SKILL.md. Install it with the skills CLI:
Use -g to install under your user skills directory instead of the current repo. To limit the install to one agent, pass -a with its id (for example -a claude-code for Claude Code). To try the skill once without installing, send the following to your agent:
After the skill is installed, a natural-language ask is enough. The agent picks vlmrun gw chat, the OpenAI SDK, or VLMRun().gateway as the skill describes:
For MCP read tools inside an agent framework, see MCP Server.

Visual Q&A

Send a question with an optional image. See Models for the rest of the catalog.
Chat models return their reply verbatim, with no envelope around it.

Video Q&A

Send a question with a hosted video URL. Tune frame sampling with video_fps and video_max_frames. See Video Inputs for all knobs.

Document and Image OCR

Pass a PDF as a document_url content part, or an image as image_url. Start with paddlepaddle/paddleocr-vl-1.6 for general-purpose OCR, and set method to pick the page read (ocr for plain text, markdown for Markdown).
The reply is one <document> block wrapping one <page> block per page. Each page declares its payload kind in format:
Set response_format={"type": "json_object"} (CLI: --json-mode) to get one JSON object instead. See Methods & Response Format for the contract and Document OCR for the rest of the pipeline.

Next steps

The same models are available from the Python SDK via client.gateway. See vlmrun gw for gw models, gw embed, and gw transcribe.

Document OCR

Request knobs, page blocks, and streaming for PDFs.

Models

Catalog, capabilities, and model selection.

Chat Completions API

Full request parameters and response schema.

MCP Server

Give any MCP-aware agent read tools for documents, audio, and video.