For AI agents, the documentation index lists all pages. Append .md to a documentation URL for Markdown, or request text/markdown.

Skip to Content
Endpoint ReferenceCreate response

Create response

1 min readEdit this page
POST
/v1/responses

Creates a response using the OpenAI Responses API format. Drop-in replacement for OpenAI's newer stateful-conversation surface.

When stream: true, the response is sent as Server-Sent Events (SSE) with the full output-item lifecycle (response.created, response.output_item.added, response.output_text.delta, response.completed, …). The cloud forwards the upstream provider's SSE stream unchanged.

Authorization

x-api-key<token>

Anthropic-style API key header.

In: header

Request Body

application/json

OpenAI Responses API request.

TypeScript Definitions

Use the request body type in TypeScript.

Responses request body (https://platform.openai.com/docs/api-reference/responses/create).

pub so downstream crates (notably bitrouter-cloud) can derive an OpenAPI schema from the canonical wire shape without redeclaring it.

input stays serde_json::Value on purpose — the Responses API accepts either a plain string or a heterogeneous item array (Codex multi-turn, #454-3), and the deeper walk happens in parse_input (private). Mirrors how Anthropic's system / content are typed.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/responses" \  -H "Content-Type: application/json" \  -d '{    "model": "anthropic/claude-haiku-4.5",    "input": "Hello!"  }'
{}

How is this guide?