# Create response (/docs/reference/openai-responses/createResponse)

> For AI agents, the [documentation index](https://bitrouter-docs-staging.up.railway.app/llms.txt) lists all pages. Append .md to a documentation URL to read its Markdown.

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

## Authentication

header parameter `x-api-key` or `Authorization: Bearer <token>`.

Base URL: `https://api.bitrouter.ai`

## Request body

OpenAI Responses API request.

Media types: `application/json`.

* `input` (required)
* `instructions`: string | null
* `max_output_tokens`: integer | null
* `model`: string
* `parallel_tool_calls`: boolean | null
* `reasoning`
* `store`: boolean | null
* `stream`: boolean
* `temperature`: number | null
* `text`
* `tools`: array
* `top_p`: number | null

### Example JSON request

```json
{
  "model": "anthropic/claude-haiku-4.5",
  "input": "Hello!"
}
```

## Responses

* `200` Response object (non-streaming). Streamed Responses output — Server-Sent Events with the full output-item lifecycle (`response.created`, `response.output_item.added`, `response.completed`, …). (application/json, text/event-stream)
* `400` Bad request — invalid model or malformed request body. (application/json)
* `402` Payment required — insufficient balance or missing payment proof. (application/json)
* `404` No route found for the requested model. (application/json)
* `429` Rate limited by BitRouter or by every usable upstream route. Inspect error.code to distinguish rate\_limit\_exceeded from upstream\_rate\_limited; Retry-After is included when known. (application/json)
* `500` BitRouter internal error. (application/json)
* `502` Upstream returned an invalid response. (application/json)
* `503` The usable upstream route set is temporarily unavailable. (application/json)
* `504` Every usable upstream route timed out. (application/json)

[Full OpenAPI schema](https://bitrouter-docs-staging.up.railway.app/openapi.json)