Skip to main content
POST
/
v1
/
openai
/
chat
/
completions
Chat Completions
import requests

url = "https://api.example.com/v1/openai/chat/completions"

payload = {
    "messages": [
        {
            "role": "user",
            "content": "<string>",
            "name": "<string>",
            "tool_call_id": "<string>",
            "tool_calls": [
                {
                    "id": "<string>",
                    "function": {
                        "arguments": "<string>",
                        "name": "<string>"
                    },
                    "type": "<string>"
                }
            ]
        }
    ],
    "id": "<string>",
    "model": "vlmrun-orion-1:auto",
    "max_tokens": 32768,
    "n": 1,
    "temperature": 0,
    "top_p": 1,
    "top_k": 123,
    "logprobs": 123,
    "stream": False,
    "preview": True,
    "response_format": {
        "schema": {},
        "type": "json_schema"
    },
    "session_id": "<string>",
    "metadata": {}
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}
Our VLM Agents are fully compatible with the OpenAI API. Notably, our API also supports a whole range of features with multi-modal data types that OpenAI currently does not support. Our OpenAI-Compatible endpoint is available at https://agent.vlm.run/v1/openai.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

user-agent
string | null

Body

application/json

Request payload for the OpenAI chat completions API for vlm-agent-1

messages
Message · object[]
required

Messages to complete

id
string

ID of the completion

model
default:vlmrun-orion-1:auto

VLM Run Agent model to use for completion

Available options:
vlmrun-orion-1,
vlmrun-orion-1:auto,
vlmrun-orion-1:fast,
vlmrun-orion-1:pro
max_tokens
integer
default:32768

Maximum number of tokens to generate

n
integer | null
default:1

Number of completions to generate

temperature
number
default:0

Temperature of the sampling distribution

top_p
number
default:1

Cumulative probability of parameter highest probability vocabulary tokens to keep for nucleus sampling

top_k
integer | null

Number of highest probability vocabulary tokens to keep for top-k-filtering

logprobs
integer | null

Include the log probabilities on the logprobs most likely tokens, as well the chosen tokens

stream
boolean
default:false

Whether to stream the response or not

preview
boolean | null

Whether to generate previews for the response or not

response_format
JSONSchemaResponseFormat · object

Response format for JSON schema mode as per Fireworks AI specification.

session_id
string

Session UUID for persisting the chat history

metadata
Metadata · object

Additional metadata for the request (e.g., dataset_name, experiment_id, etc.)

Response

Successful Response