---
title: "Create a response"
method: POST
path: "/responses"
tags: ["Responses"]
---

# Create a response

`POST /responses`

## Request

- Base URL: `https://api.munito.ai/inference/v1`
- URL: `https://api.munito.ai/inference/v1/responses`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

Create a response with the OpenAI Responses API. Send a string or a list of items in `input`. Set the system prompt with `instructions`.

- Continue a conversation with `previous_response_id`. The server restores its history from responses created with `store: true`.
- Set `stream: true` to receive response events.
- Set `background: true` to generate a response asynchronously, then poll or attach later. A background response is stored.
- Use function `tools` or `text.format` with `json_schema` for structured output.

A response is not stored by default, unlike OpenAI. Send `store: true` to keep it for 30 days. A `max_output_tokens` above the output maximum of the model uses that maximum.

## Headers

- `munito-service-tier` 'priority' | 'standard' | 'flex'
- `munito-affinity` string
- `munito-overflow` 'off' | 'model' | 'class' | 'any'

## Request body

- object
  - `model` string, required: Model id from GET /models, e.g. `qwen/qwen3.8-27b`.
  - `input` union, required: The input: a plain string, or an array of input items (messages, function-call outputs).
    - string
    - object[]: Input items: messages, function calls and function-call outputs.
  - `instructions` string: System instructions for this response.
  - `previous_response_id` string: Continue from an earlier response. The server replays that conversation state.
  - `store` boolean: Keep the response for 30 days for later retrieval and for `previous_response_id`.
  - `stream` boolean: Stream semantic events back as server-sent events.
  - `background` boolean: Generate server-side and return immediately; poll or attach later. A background response is stored, so `store: false` with `background: true` answers 400.
  - `max_output_tokens` integer: Maximum output tokens to generate, capped at the model's output maximum.
  - `temperature` number: Sampling temperature (0–2).
  - `tools` object[]: OpenAI-style function tools the model may call. A namespace tool groups function tools. The API accepts a hosted web search tool, and the model answers without a search.

## Response `200`

The response object: the same shape that the final response.completed stream event carries.

---

[API](https://skmtc.dev/munito/apis/munito-ai-api.md) - [All operations](https://skmtc.dev/munito/apis/munito-ai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/munito/apis/munito-ai-api/revisions/d4ccbe8844df?raw)
