Skip to main content
Base URL: https://api.orbitrage.ai/v1 · Auth: Authorization: Bearer orb_…
POST /v1/responses
The gateway implements the OpenAI Responses API (used by the OpenAI Agents SDK) by adapting it to Chat Completions internally — so it’s routed, credit-gated, and traced exactly like any other call.

Request

model
string
required
auto to route, or a pinned model id.
input
string | array
required
The input — a string, or an array of input items (messages, function calls, tool results). Mapped to messages internally.
instructions
string
System instructions, mapped to a system message.
tools
array
Tool definitions. Function-call items in the input are coalesced into a single assistant message with tool_calls.
max_output_tokens
number
Maps to max_tokens.

Example

curl https://api.orbitrage.ai/v1/responses \
  -H "Authorization: Bearer $ORBITRAGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "auto",
    "instructions": "You are a helpful assistant.",
    "input": "Summarize the benefits of model routing in one sentence."
  }'

Using the OpenAI Agents SDK

Point the Agents SDK’s client at https://api.orbitrage.ai/v1. The gateway also absorbs the SDK’s built-in tracing calls (returning a harmless no-op), so you won’t see 401s from its tracer. Disable the SDK’s own tracing to avoid duplicate work — Orbitrage already traces every call:
from agents import set_tracing_disabled
set_tracing_disabled(True)
For xAI Grok models that use native tools (e.g. web search), the gateway can forward to xAI’s native Responses endpoint while still authenticating, gating credits, and recording billing.

Response

A Responses-API-shaped object. As with Chat Completions, the routing decision, cost, tokens, and latency are recorded to your telemetry.