!pip install vlmrun
from vlmrun.client import VLMRun
# Initialize the VLM Run client
client = VLMRun(api_key="<VLMRUN_API_KEY>")
# Create a chat completion
response = client.agent.completions.create(
model="vlmrun-orion-1:auto",
messages=[{"role": "user", "content": "Who are you and what can you do?"}],
temperature=0.7,
)
import openai
# Initialize the OpenAI client
client = openai.OpenAI(
base_url="https://api.vlm.run/v1/openai",
api_key="<VLMRUN_API_KEY>"
)
# Create a chat completion
response = client.chat.completions.create(
model="vlmrun-orion-1:auto",
messages=[{"role": "user", "content": "Who are you and what can you do?"}],
temperature=0.7,
)
import { VlmRun } from "vlmrun";
// Initialize the VLM Run client
const client = new VlmRun({
baseURL: "https://api.vlm.run/v1",
apiKey: "<VLMRUN_API_KEY>"
});
// Create a chat completion
const response = await client.agent.completions.create({
model: "vlmrun-orion-1:auto",
messages: [{ role: "user", content: "Who are you and what can you do?" }],
temperature: 0.7,
});
console.log(response);
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Chat Completions
Handle chat completion requests.
Supports both authenticated and public (unauthenticated) requests. Guest users are limited to the playground UI path at $0.50/day per IP and browser fingerprint. Authenticated free users are not subject to a daily chat cap after they sign in.
!pip install vlmrun
from vlmrun.client import VLMRun
# Initialize the VLM Run client
client = VLMRun(api_key="<VLMRUN_API_KEY>")
# Create a chat completion
response = client.agent.completions.create(
model="vlmrun-orion-1:auto",
messages=[{"role": "user", "content": "Who are you and what can you do?"}],
temperature=0.7,
)
import openai
# Initialize the OpenAI client
client = openai.OpenAI(
base_url="https://api.vlm.run/v1/openai",
api_key="<VLMRUN_API_KEY>"
)
# Create a chat completion
response = client.chat.completions.create(
model="vlmrun-orion-1:auto",
messages=[{"role": "user", "content": "Who are you and what can you do?"}],
temperature=0.7,
)
import { VlmRun } from "vlmrun";
// Initialize the VLM Run client
const client = new VlmRun({
baseURL: "https://api.vlm.run/v1",
apiKey: "<VLMRUN_API_KEY>"
});
// Create a chat completion
const response = await client.agent.completions.create({
model: "vlmrun-orion-1:auto",
messages: [{ role: "user", content: "Who are you and what can you do?" }],
temperature: 0.7,
});
console.log(response);
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}!pip install vlmrun
from vlmrun.client import VLMRun
# Initialize the VLM Run client
client = VLMRun(api_key="<VLMRUN_API_KEY>")
# Create a chat completion
response = client.agent.completions.create(
model="vlmrun-orion-1:auto",
messages=[{"role": "user", "content": "Who are you and what can you do?"}],
temperature=0.7,
)
import openai
# Initialize the OpenAI client
client = openai.OpenAI(
base_url="https://api.vlm.run/v1/openai",
api_key="<VLMRUN_API_KEY>"
)
# Create a chat completion
response = client.chat.completions.create(
model="vlmrun-orion-1:auto",
messages=[{"role": "user", "content": "Who are you and what can you do?"}],
temperature=0.7,
)
import { VlmRun } from "vlmrun";
// Initialize the VLM Run client
const client = new VlmRun({
baseURL: "https://api.vlm.run/v1",
apiKey: "<VLMRUN_API_KEY>"
});
// Create a chat completion
const response = await client.agent.completions.create({
model: "vlmrun-orion-1:auto",
messages: [{ role: "user", content: "Who are you and what can you do?" }],
temperature: 0.7,
});
console.log(response);
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Body
Request payload for the OpenAI chat completions API for VLM Run agents.
Messages to complete
Hide child attributes
Hide child attributes
user, assistant, system, developer, tool Hide child attributes
Hide child attributes
"function"ID of the completion
VLM Run Agent model to use for completion. When omitted, the skill's vlmrun.yaml model is used; otherwise the agent default.
vlmrun-orion-1, vlmrun-orion-1:auto, vlmrun-orion-1:fast, vlmrun-orion-1:pro, vlmrun-orion-2, vlmrun-orion-2:auto Maximum number of tokens to generate
Number of completions to generate
Temperature of the sampling distribution
Cumulative probability of parameter highest probability vocabulary tokens to keep for nucleus sampling
Number of highest probability vocabulary tokens to keep for top-k-filtering
Include the log probabilities on the logprobs most likely tokens, as well the chosen tokens
Whether to stream the response or not
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.
OpenAI-compatible tool_choice (none / auto / required / specific function). Only used when tools is set.
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.
client, hybrid Server-owned tool names to inject and execute when tool_execution=hybrid. Defaults to ["execute_code"]. Unknown names are rejected.
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.
Response format for JSON schema mode as per Fireworks AI specification.
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.
auto, default, standard, flex, priority Session UUID for persisting the chat history
Client-minted session token for IDOR protection (base64url, >=256-bit)
Additional metadata for the request (e.g., dataset_name, experiment_id, etc.)
List of agent skills to enable for this request.
Hide child attributes
Hide child attributes
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.
The unique identifier of the skill — a UUID or a name string (e.g., 'pillow', 'batch-processing').
Human-readable skill name for lookup (e.g., 'invoice-extraction'). Alternative to skill_id. Deprecated in favour of skill_id.
The version of the skill — an integer (e.g. 2) or 'latest'.
DEPRECATED: Use 'skill_version' instead. The version of the skill.
Human-readable name for the inline skill (used for discovery and logging).
Short description of what the inline skill does.
Source payload for inline skills. Contains the base64-encoded zip bundle with type, media_type, and data fields.
Hide child attributes
Hide child attributes
Base64-encoded zip bundle containing the skill files.
Encoding type for the inline skill data. Currently only 'base64' is supported.
"base64"MIME type of the skill bundle. Must be 'application/zip'.
DEPRECATED: Use 'source.data' instead. Base64-encoded zip bundle containing the skill files (inline skills only).
Response
Successful Response