Skip to main content
Install the CLI, or point any OpenAI SDK at https://gateway.vlm.run/v1/openai. 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.

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 paddleocr/pp-ocrv6 for general-purpose OCR (ocr is the default method).
The reply is one <document> block wrapping one <page> block per page. Each page’s body is document.page.blocks:
Set response_format={"type": "json_object"} (CLI: --json-mode) to get one JSON object instead. See Methods & Response Format for the contract and Flexible 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.

Flexible 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.