Create response
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.
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
curl -X POST "https://example.com/v1/responses" \ -H "Content-Type: application/json" \ -d '{ "input": true }'{}{ "error": { "code": "string", "message": "string" }}{ "error": { "code": "string", "message": "string" }}{ "error": { "code": "string", "message": "string" }}How is this guide?