> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.singularityapi.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.singularityapi.dev/_mcp/server.

# Responses

`POST /v1/responses` speaks the OpenAI Responses API wire format. Authenticate with `Authorization: Bearer sapi_...`. For request and response fields not called out below, see [OpenAI Compatibility](/get-started/openai-compatibility).

## Model availability

Only models with the responses capability accept this endpoint. As of 2026-09-24, that's the six GPT models: `gpt-5.6-sol`, `gpt-5.6-terra`, `gpt-5.6-luna`, `gpt-6-astra`, `gpt-6-sol`, and `gpt-6-luna`. Every other model returns 400 `invalid_request`.

> **Note**
>
> `GET /v1/models` is authoritative for which models currently support this endpoint — check each model's `capabilities` list for `/v1/responses`. See [Models & Receipts](/api/models-receipts).

## Request notes

* **`model`** — required. One of the responses-capable models above, or `contract/{slug}` for a [contract](/platform/contracts) that targets one of them.
* **Output limit field** — `max_output_tokens`. Same rules as elsewhere: a positive integer, no larger than the model's max output. Omit it and the per-model default is injected server-side, visible in the receipt's `transformed_fields`.
* **`stream`** — boolean; see below.
* **`reasoning`** — `reasoning.effort` accepts `none`, `low`, `medium`, `high`, `xhigh`, and `max` on this endpoint, except that `gpt-6-astra` does not accept `none`; `minimal` is rejected on every GPT model. `tools` with any accepted effort works natively here. On [chat completions](/api/chat-completions), OpenAI's own chat surface only serves function tools with reasoning off; the platform routes tools-plus-reasoning chat requests through this tools-compatible path for you (see the note there). The full per-model table is on [Models & Pricing](/get-started/models-pricing#reasoning-effort-by-model).

## Example

**`cURL`**

```bash title="cURL"
curl https://api.singularityapi.dev/v1/responses \
  -H "Authorization: Bearer $SINGULARITY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.6-luna",
    "input": "Say hello."
  }'
```

**`Python`**

```python title="Python"
from openai import OpenAI

client = OpenAI(
    base_url="https://api.singularityapi.dev/v1",
    api_key="YOUR_API_KEY",
)

response = client.responses.create(
    model="gpt-5.6-luna",
    input="Say hello.",
)
print(response.output_text)
```

**`JavaScript`**

```javascript title="JavaScript"
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.singularityapi.dev/v1",
  apiKey: "YOUR_API_KEY",
});

const response = await client.responses.create({
  model: "gpt-5.6-luna",
  input: "Say hello.",
});
console.log(response.output_text);
```

## Streaming

Set `"stream": true` for standard OpenAI-compatible SSE, same as on [chat completions](/api/chat-completions); see [Streaming](/platform/streaming) for full SSE details. One difference: on this endpoint, usage is not auto-injected into the stream — chat completions injects `stream_options.include_usage`, but responses does not add anything.

## Receipts, contracts, and limits

* The same three response headers apply: `x-singularity-request-id`, `x-singularity-receipt-id`, and `x-singularity-contract-revision` on contract calls.
* `model` calls that use `contract/{slug}` resolve the same way as on chat completions — see [Contracts](/platform/contracts).
* The same \~230-second request deadline applies; exceeding it returns 504 `request_timeout`.

> **Note**
>
> See [Errors & Rate Limits](/api/errors-rate-limits) for the full error envelope and status table.