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

# Create response

`POST /responses`

Responses-shaped chat-completions compatibility adapter for compatible LLM and vision-language deployments. Does not implement full state, include, reasoning, hosted-tool, conversation-item, or background-job semantics.

## Request body

- ResponsesRequest
  - `model` string, required
  - `input` union, required
    - string
    - object[]
  - `instructions` string — System-level instruction text mapped into a chat system message.
  - `stream` boolean — When true, the response is a server-sent event stream.
  - `max_output_tokens` integer
  - `temperature` number
  - `top_p` number
  - `tools` Tool[]
    - `type` 'function', required
    - `function` object, required
      - `name` string, required
      - `description` string
      - `parameters` object — JSON Schema
  - `tool_choice` union
    - 'none' | 'auto' | 'required'
    - object
      - `type` 'function'
      - `function` object
        - `name` string
  - `reasoning_effort` 'none' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' — Reasoning effort for this request, sent at the top level beside text. Which of these values a model honors, and which it rejects, is model specific and is stated on that model's page. On a model that cannot enforce a response format while it is reasoning, a request carrying text.format or response_format is refused with 400 hosted_parameter_not_supported and param response_format unless it also sends reasoning_effort none.
  - `response_format` union
    - object
      - `type` 'text'
    - object
      - `type` 'json_object'
    - object
      - `type` 'json_schema', required
      - `json_schema` object, required
        - `name` string, required
        - `strict` boolean
        - `schema` object, required — JSON Schema
  - `reasoning` object — The canonical Responses effort carrier. reasoning.effort maps to the same per-model effort rule as reasoning_effort; models refused for structured output at their default accept reasoning.effort none.
    - `effort` 'none' | 'low' | 'medium' | 'high' | 'xhigh' | 'max'

## Response `200`

Response object or SSE stream if stream=true

- ResponsesResponse
  - `id` string, required
  - `object` string, required
  - `created_at` integer
  - `model` string, required
  - `output_text` string — Convenience text extracted from output content when available.
  - `output` object[]
  - `usage` Usage
    - `cost` number — The calculated cost of this request in US dollars, to eight decimals: the settlement formula over the tokens the provider reported. Present on hosted models; absent on workspace deployments. 0 during a promotional free window and for a response with no billable output. runinfra.cost_microcents is the canonical integer.
    - `prompt_tokens` integer
    - `completion_tokens` integer
    - `total_tokens` integer
    - `prompt_tokens_details` object — Present on every hosted model response. cached_tokens is the count of input tokens billed at the cached input rate, the figure the cost was computed with; 0 when nothing was billed as cached, including a response that settled at zero and a model whose cache is shared across tenants. runinfra.cached_input_tokens carries the same number.
      - `cached_tokens` integer
    - `runinfra` RunInfraUsageMetadata
      - `cost_microcents` integer — The calculated cost of this request in microcents (one cent is 1,000,000 microcents), the ledger unit settlement uses; the canonical figure. usage.cost is this value in dollars. The balance is debited in whole cents with sub-cent carry, so a single debit can differ from this by less than a cent.
      - `cached_input_tokens` integer — The count of input tokens billed at the cached input rate on this request, the same number as usage.prompt_tokens_details.cached_tokens. Present on every hosted model response; 0 when nothing was billed as cached.
      - `output_token_accounting` RunInfraOutputTokenAccounting
        - `visible_answer_tokens` 0, required — Final-answer token count classified by the RunInfra proxy for an all-empty generation-limit outcome.
        - `non_answer_completion_tokens` integer, required — Provider-reported completion tokens when the response produced no final answer.
        - `sources` object, required
          - `visible_answer_tokens` 'proxy_classified', required
          - `non_answer_completion_tokens` 'provider_reported', required

## Other responses

- `400` — Malformed request
- `401` — Missing or invalid API key
- `402` — Insufficient credits
- `403` — Key scope mismatch or plan limit exceeded
- `404` — Model or deployment not found
- `409` — Idempotency conflict
- `422` — Request cannot be replayed or processed safely
- `429` — Rate limit exceeded
- `500` — Unexpected gateway error
- `502` — Upstream serving backend transient failure
- `503` — Endpoint stopped, provisioning, or at capacity
- `504` — Gateway timeout

---

[API](https://skmtc.dev/runinfra/apis/runinfra-api.md) · [All operations](https://skmtc.dev/runinfra/apis/runinfra-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/runinfra/runinfra-api/revisions/dbd314122f80/schema)
