---
title: "POST /ai/v1/responses"
method: POST
path: "/ai/v1/responses"
tags: ["AI Gateway"]
---

# POST /ai/v1/responses

`POST /ai/v1/responses`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/ai/v1/responses`
- Auth: HTTP bearer

## Request body

- ResponsesRequest: Request body of `POST /ai/v1/responses`, OpenAI's Responses API.
  - `background` boolean, nullable: Run asynchronously and poll for the result. Requires your own provider key: the result is fetched from the provider account.
  - `conversation` object, nullable: Attach the response to a stored conversation. Requires your own provider key, for the same reason as `previous_response_id`.
  - `model` string, required: Model to run, e.g. `gpt-6-luna`. Must be served by OpenAI.
  - `previous_response_id` string, nullable: Continue from a stored response. Requires your own provider key (`X-Provider-Api-Key`), because stored responses live in the provider account that created them.
  - `stream` boolean: Stream the reply as server-sent events.

## Response `200`

JSON when stream=false, SSE when stream=true. Generated SDKs use the explicit /json and /stream operations.

- ResponseObject: A response object as returned by the provider.
  - `id` string, required
  - `model` string, required
  - `object` string, required: Always `response`
  - `status` string, nullable: `completed`, `incomplete`, `failed`, `in_progress`, …
  - `usage` ResponseUsage, nullable: Token usage of a response.
    - `input_tokens` integer
    - `output_tokens` integer
    - `total_tokens` integer

## Other responses

- `400`: Invalid request, or the model is not served by OpenAI
- `401`: Unauthorized
- `403`: Model not allowed
- `404`: Model or provider not configured
- `500`: Internal error

## Changes

- **2026-10-05** `2d395ffb4f03`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/ai/v1/responses/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
