Create a response

POST /responses

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. max_output_tokens is capped at the output maximum of the model, which GET /models gives as max_output_length.

POST
/responses

Authorization

AuthorizationBearer <token>

Your Munito API key.

In: header

Header Parameters

munito-service-tier?string

priority, standard or flex. The response names the tier that is billed; see x-ratelimit-over-limit.

Default"standard"

Value in

  • "priority"
  • "standard"
  • "flex"
munito-affinity?string

An opaque token. Send it back with the next request of the conversation, so that the prompt cache can serve it.

munito-overflow?string

off, model, class or any: what may serve a chat request that its own capacity refuses. The response names the step that served it. Off by default. The request keeps its region, and you pay the price of the model that you asked for. Flex, background and free-tier requests do not overflow.

Default"off"

Value in

  • "off"
  • "model"
  • "class"
  • "any"

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

model*string

Model id from GET /models, e.g. qwen/qwen3.8-27b.

input*string

The input: a plain string, or an array of input items (messages, 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

Persist the response for 30 days for later retrieval.

Defaulttrue
stream?boolean

Stream semantic events back as server-sent events.

Defaultfalse
background?boolean

Generate server-side and return immediately; poll or attach later. Requires store.

Defaultfalse
max_output_tokens?integer

Maximum output tokens to generate, capped at the model's output maximum.

temperature?number

Sampling temperature (0–2).

tools?array<>

OpenAI-style function tools the model may call.

Response Body

application/json

curl -X POST "https://example.com/responses" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen/qwen3.8-27b",
    "input": "Summarize the EU AI Act in one paragraph."
  }'
{
  "id": "resp_9f41c2d7b3a8",
  "object": "response",
  "status": "completed",
  "model": "qwen/qwen3.8-27b",
  "output": [
    {
      "type": "message",
      "id": "msg_5b1e88a04c21",
      "role": "assistant",
      "status": "completed",
      "content": [
        {
          "type": "output_text",
          "text": "The EU AI Act is the first comprehensive AI law: a risk-based framework that bans a narrow set of unacceptable uses, imposes strict obligations on high-risk systems, adds transparency duties for general-purpose models, and phases in enforcement with fines of up to 7% of global turnover."
        }
      ]
    }
  ],
  "usage": {
    "input_tokens": 12,
    "output_tokens": 42,
    "total_tokens": 54
  },
  "previous_response_id": null,
  "store": true
}