from openai import OpenAIclient = OpenAI( base_url="https://api.vlm.run/v1/openai", api_key="<VLMRUN_API_KEY>",)response = client.chat.completions.create( model="vlmrun-orion-2:auto", messages=[{"role": "user", "content": [ {"type": "text", "text": "Detect the car in this image. Return its bounding box and color."}, {"type": "image_url", "image_url": {"url": "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg"}}, ]}],)print(response.choices[0].message.content)
import OpenAI from "openai";const client = new OpenAI({ baseURL: "https://api.vlm.run/v1/openai", apiKey: process.env.VLMRUN_API_KEY,});const response = await client.chat.completions.create({ model: "vlmrun-orion-2:auto", messages: [{ role: "user", content: [ { type: "text", text: "Detect the car in this image. Return its bounding box and color." }, { type: "image_url", image_url: { url: "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg" } }, ] }],});console.log(response.choices[0].message.content);
vlmrun chat "Detect the car in this image. Return its bounding box and color." -i car.jpg -m vlmrun-orion-2:auto
curl https://api.vlm.run/v1/openai/chat/completions \ -H "Authorization: Bearer $VLMRUN_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "vlmrun-orion-2:auto", "messages": [{"role": "user", "content": [ {"type": "text", "text": "Detect the car in this image. Return its bounding box and color."}, {"type": "image_url", "image_url": {"url": "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg"}} ]}] }'
from vlmrun.client import VLMRunclient = VLMRun(api_key="<VLMRUN_API_KEY>")response = client.agent.completions.create( model="vlmrun-orion-2:auto", messages=[{"role": "user", "content": [ {"type": "text", "text": "Detect the car in this image. Return its bounding box and color."}, {"type": "image_url", "image_url": {"url": "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg"}}, ]}],)
import { VlmRun } from "vlmrun";const client = new VlmRun({ baseURL: "https://api.vlm.run/v1", apiKey: process.env.VLMRUN_API_KEY,});const response = await client.agent.completions.create({ model: "vlmrun-orion-2:auto", messages: [{ role: "user", content: [ { type: "text", text: "Detect the car in this image. Return its bounding box and color." }, { type: "image_url", image_url: { url: "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg" } }, ] }],});console.log(response.choices[0].message.content);
OpenAI-compatible chat completions for Orion agents.
POST
/
v1
/
openai
/
chat
/
completions
from openai import OpenAIclient = OpenAI( base_url="https://api.vlm.run/v1/openai", api_key="<VLMRUN_API_KEY>",)response = client.chat.completions.create( model="vlmrun-orion-2:auto", messages=[{"role": "user", "content": [ {"type": "text", "text": "Detect the car in this image. Return its bounding box and color."}, {"type": "image_url", "image_url": {"url": "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg"}}, ]}],)print(response.choices[0].message.content)
import OpenAI from "openai";const client = new OpenAI({ baseURL: "https://api.vlm.run/v1/openai", apiKey: process.env.VLMRUN_API_KEY,});const response = await client.chat.completions.create({ model: "vlmrun-orion-2:auto", messages: [{ role: "user", content: [ { type: "text", text: "Detect the car in this image. Return its bounding box and color." }, { type: "image_url", image_url: { url: "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg" } }, ] }],});console.log(response.choices[0].message.content);
vlmrun chat "Detect the car in this image. Return its bounding box and color." -i car.jpg -m vlmrun-orion-2:auto
curl https://api.vlm.run/v1/openai/chat/completions \ -H "Authorization: Bearer $VLMRUN_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "vlmrun-orion-2:auto", "messages": [{"role": "user", "content": [ {"type": "text", "text": "Detect the car in this image. Return its bounding box and color."}, {"type": "image_url", "image_url": {"url": "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg"}} ]}] }'
from vlmrun.client import VLMRunclient = VLMRun(api_key="<VLMRUN_API_KEY>")response = client.agent.completions.create( model="vlmrun-orion-2:auto", messages=[{"role": "user", "content": [ {"type": "text", "text": "Detect the car in this image. Return its bounding box and color."}, {"type": "image_url", "image_url": {"url": "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg"}}, ]}],)
import { VlmRun } from "vlmrun";const client = new VlmRun({ baseURL: "https://api.vlm.run/v1", apiKey: process.env.VLMRUN_API_KEY,});const response = await client.agent.completions.create({ model: "vlmrun-orion-2:auto", messages: [{ role: "user", content: [ { type: "text", text: "Detect the car in this image. Return its bounding box and color." }, { type: "image_url", image_url: { url: "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg" } }, ] }],});console.log(response.choices[0].message.content);
Send POST https://api.vlm.run/v1/openai/chat/completions with your API key as a bearer token: Authorization: Bearer <VLMRUN_API_KEY>.The endpoint is fully OpenAI compatible. Point the OpenAI SDK at https://api.vlm.run/v1/openai and set model to an Orion agent such as vlmrun-orion-2:auto. See Orion for the agents, inputs for images, video, and documents, and artifacts for generated files.
from openai import OpenAIclient = OpenAI( base_url="https://api.vlm.run/v1/openai", api_key="<VLMRUN_API_KEY>",)response = client.chat.completions.create( model="vlmrun-orion-2:auto", messages=[{"role": "user", "content": [ {"type": "text", "text": "Detect the car in this image. Return its bounding box and color."}, {"type": "image_url", "image_url": {"url": "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg"}}, ]}],)print(response.choices[0].message.content)
import OpenAI from "openai";const client = new OpenAI({ baseURL: "https://api.vlm.run/v1/openai", apiKey: process.env.VLMRUN_API_KEY,});const response = await client.chat.completions.create({ model: "vlmrun-orion-2:auto", messages: [{ role: "user", content: [ { type: "text", text: "Detect the car in this image. Return its bounding box and color." }, { type: "image_url", image_url: { url: "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg" } }, ] }],});console.log(response.choices[0].message.content);
vlmrun chat "Detect the car in this image. Return its bounding box and color." -i car.jpg -m vlmrun-orion-2:auto
curl https://api.vlm.run/v1/openai/chat/completions \ -H "Authorization: Bearer $VLMRUN_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "vlmrun-orion-2:auto", "messages": [{"role": "user", "content": [ {"type": "text", "text": "Detect the car in this image. Return its bounding box and color."}, {"type": "image_url", "image_url": {"url": "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg"}} ]}] }'
from vlmrun.client import VLMRunclient = VLMRun(api_key="<VLMRUN_API_KEY>")response = client.agent.completions.create( model="vlmrun-orion-2:auto", messages=[{"role": "user", "content": [ {"type": "text", "text": "Detect the car in this image. Return its bounding box and color."}, {"type": "image_url", "image_url": {"url": "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg"}}, ]}],)
import { VlmRun } from "vlmrun";const client = new VlmRun({ baseURL: "https://api.vlm.run/v1", apiKey: process.env.VLMRUN_API_KEY,});const response = await client.agent.completions.create({ model: "vlmrun-orion-2:auto", messages: [{ role: "user", content: [ { type: "text", text: "Detect the car in this image. Return its bounding box and color." }, { type: "image_url", image_url: { url: "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/image.caption/car.jpg" } }, ] }],});console.log(response.choices[0].message.content);
OpenAI-compatible client tool definitions. By default (tool_execution=client) the endpoint returns model tool_calls for the client to execute (OpenRouter / OpenAI / pydantic-ai protocol). Set tool_execution=hybrid to also enable server-side tools such as execute_code.
How tools are executed when tools is set. client (default): passthrough — all tool_calls returned to the caller. hybrid: server tools (see server_tools) run in-process; only client tool_calls are returned with finish_reason=tool_calls.
When True on the native (no client tools) path, stream OpenAI-compatible delta.tool_calls for server-side tool invocations. Default False keeps the opaque server harness loop (text / preview / think markers only). External agent harnesses that need visible tool_calls should prefer tool_execution=hybrid instead.
Preview card selection for the agent. Accepts: True to enable all known card types, a list[str] of card discriminator names (e.g. ["preview.image", "preview.grid"]) for a focused set, or False/None to disable structured preview output. When enabled, the agent streams <preview data='{...json...}'/> lines through vlmrun.log.print(...) for the chosen card types.
Delivery tier for the request. 'standard'/'default' uses baseline rates, 'flex' applies a 50% discount with higher latency, and 'priority' applies a 1.8x premium for highest reliability. When omitted (or 'auto'), the server default ('standard') applies — opt into 'flex'/'priority' explicitly.
The type of the skill. Use 'skill_reference' for DB-stored skills referenced by id/name. Use 'inline' to provide the skill as a base64-encoded zip bundle.