Skip to main content
POST
/
v1
/
openai
/
chat
/
completions
!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

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
temperature
number
default:0.7
max_tokens
integer | null
top_p
number
default:1
frequency_penalty
number
default:0
presence_penalty
number
default:0
stop
stream
boolean
default:false
n
integer
default:1
llm
string | null
method
string | null
method_params
Method Params · object | null
video_max_frames
integer | null
video_fps
number | 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 | null
document_max_pages
integer | null

Response

Successful Response