> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orbitrage.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Responses

> POST /v1/responses — the OpenAI Responses API, adapted for routing and tracing.

<Note>
  Base URL: `https://api.orbitrage.ai/v1` · Auth: `Authorization: Bearer orb_…`
</Note>

```
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

<ParamField body="model" type="string" required>
  `auto` to route, or a pinned model id.
</ParamField>

<ParamField body="input" type="string | array" required>
  The input — a string, or an array of input items (messages, function calls,
  tool results). Mapped to `messages` internally.
</ParamField>

<ParamField body="instructions" type="string">
  System instructions, mapped to a system message.
</ParamField>

<ParamField body="tools" type="array">
  Tool definitions. Function-call items in the input are coalesced into a single
  assistant message with `tool_calls`.
</ParamField>

<ParamField body="max_output_tokens" type="number">
  Maps to `max_tokens`.
</ParamField>

## Example

```bash theme={null}
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 `401`s from its tracer. Disable the SDK's own tracing to avoid
duplicate work — Orbitrage already traces every call:

```python theme={null}
from agents import set_tracing_disabled
set_tracing_disabled(True)
```

<Tip>
  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.
</Tip>

## Response

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