AI Router V3
The V3 router exposes the same chat completions endpoint you already use, now at/v3/router/chat/completions. It supports all existing functionality (chat completions, embeddings, image generation, transcription, translation) with the addition of extended parameters like identity and thread.
The router stays fully compatible with the OpenAI SDK.
Chat Completions
cURL
Key Parameters
| Parameter | Description |
|---|---|
model | Provider and model in provider/model format (e.g., openai/gpt-4o-mini) |
messages | Standard chat completion messages array |
identity | Associate the request with a user identity for tracking and analytics |
thread | Group requests into a conversation thread with optional tags |
stream | Set to true for streaming responses |
Responses V1
The/v1/responses endpoint follows the OpenResponses specification. It provides a stateful, interaction-based way to work with models and agents. You can use it in two ways:
- With a model and tools - invoke any model directly with tools, variables, and extended parameters.
- With an agent - invoke an agent you created via the Agents API or Agent Studio.
Invoking a Model with Tools
Use themodel field with a provider/model format to invoke a model directly. You can attach tools, variables, identity, and thread parameters.
cURL
Invoking an Agent
To invoke an agent, set themodel field to agent/your_agent_name. The agent must first be created via the Agents API or the Agent Studio.
cURL
Key Parameters
| Parameter | Description |
|---|---|
model | Either provider/model for direct model invocation or agent/agent_name for agent invocation |
input | The user input. Supports {{variable}} template syntax |
tools | Array of tools the model or agent can use (e.g., orq:current_date) |
variables | Key-value pairs for template variables. Each variable has a value and an optional secret flag (set to true for sensitive values like API keys to mark them as encrypted) |
identity | Associate the request with a user identity |
thread | Group requests into a conversation thread with optional tags |
stream | Set to true for streaming responses |