Skip to content
API Reference

OpenAI Responses ​

The modern OpenAI Responses API (POST /v1/responses) supports structured item streams, reasoning effort controls, Codex CLI workflows, context compaction (POST /v1/responses/compact), and WebSocket mode (GET /v1/responses).

POSThttps://api.vanix.io/v1/responses
Interactive Try ItPOST /v1/responses

Key Parameters ​

modelstringrequired
Model ID supporting the Responses API (e.g., gpt-5, gpt-5-mini, gpt-4o, o3).
inputstring | array<object>required
Plain text string or structured array of input items (messages, images, tool outputs).
instructionsstringoptional
High-priority system/developer instructions prepended to the turn.
reasoningobjectoptional
Configure reasoning effort and summary mode, e.g., {"effort": "medium"}.
max_output_tokensintegeroptional
Hard upper bound on generated output and reasoning tokens.
streambooleanoptionaldefault: false
Stream typed Responses SSE events (response.output_text.delta, response.completed).

Code Examples ​

bash
curl https://api.vanix.io/v1/responses \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $VANIX_API_KEY" \
  -d '{
    "model": "gpt-5-mini",
    "instructions": "Respond as a concise cloud engineer.",
    "input": "List 3 advantages of ARM64 Graviton containers."
  }'
python
import os
from openai import OpenAI

client = OpenAI(api_key=os.environ["VANIX_API_KEY"], base_url="https://api.vanix.io/v1")
resp = client.responses.create(
    model="gpt-5-mini",
    instructions="Respond as a concise cloud engineer.",
    input="List 3 advantages of ARM64 Graviton containers.",
)
print(resp.output_text)
ts
import OpenAI from 'openai'

const client = new OpenAI({ apiKey: process.env.VANIX_API_KEY, baseURL: 'https://api.vanix.io/v1' })
const resp = await client.responses.create({
  model: 'gpt-5-mini',
  instructions: 'Respond as a concise cloud engineer.',
  input: 'List 3 advantages of ARM64 Graviton containers.',
})
console.log(resp.output_text)
  • POST /v1/responses/compact — Compact long conversation histories for coding agents.
  • WS /v1/realtime?model=gpt-4o-realtime-preview — Bidirectional audio and text Realtime WebSocket (OpenAI-Beta: realtime=v1).

Vanix AI Unified Model Gateway · https://api.vanix.io