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

# Create Responses

`POST /v1/responses`

Generate a unified response block from various input configurations.

## Headers

- `x-api-key` string

## Request body

- CreateResponseBody
  - `model` string, nullable
  - `input` union
    - ItemParam[]
      - union
        - ItemReferenceParam
          - `type` 'item_reference', required — The item type. Always `item_reference`.
          - `id` string, required — The ID of the item to reference.
        - ReasoningItemParam
          - `id` string, nullable
          - `type` 'reasoning', required — The item type. Always `reasoning`.
          - `summary` ReasoningSummaryContentParam[], required — Reasoning summary content associated with this item.
            - `type` 'summary_text', required
            - `text` string, required — The reasoning summary text.
          - `content` unknown
          - `encrypted_content` string, nullable
        - CompactionSummaryItemParam
          - `id` string, nullable
          - `type` 'compaction', required — The type of the item. Always `compaction`.
          - `encrypted_content` string, required — The encrypted content of the compaction summary.
        - UserMessageItemParam
          - `id` string, nullable
          - `type` 'message'
          - `role` 'user', required
          - `content` union, required — The message content, as an array of content parts.
            - Content[]
              - …
            - string
          - `status` string, nullable
        - SystemMessageItemParam
          - `id` string, nullable
          - `type` 'message'
          - `role` 'system', required
          - `content` union, required — The message content, as an array of content parts.
            - Content1[]
              - …
            - string
          - `status` string, nullable
        - DeveloperMessageItemParam
          - `id` string, nullable
          - `type` 'message'
          - `role` 'developer', required
          - `content` union, required — The message content, as an array of content parts.
            - Content1[]
              - …
            - string
          - `status` string, nullable
        - AssistantMessageItemParam
          - `id` string, nullable
          - `type` 'message'
          - `role` 'assistant', required
          - `content` union, required — The message content, as an array of content parts.
            - Content3[]
              - …
            - string
          - `phase` 'commentary' | 'final_answer'
          - `status` string, nullable
        - FunctionCallItemParam
          - `id` string, nullable
          - `call_id` string, required — The unique ID of the function tool call generated by the model.
          - `type` 'function_call', required — The item type. Always `function_call`.
          - `name` string, required — The name of the function to call.
          - `arguments` string, required — The function arguments as a JSON string.
          - `status` 'in_progress' | 'completed' | 'incomplete'
        - FunctionCallOutputItemParam
          - `id` string, nullable
          - `call_id` string, required — The unique ID of the function tool call generated by the model.
          - `type` 'function_call_output', required — The type of the function tool call output. Always `function_call_output`.
          - `output` union, required — Text, image, or file output of the function tool call.
            - string
            - Output[]
              - …
          - `status` 'in_progress' | 'completed' | 'incomplete'
    - string
  - `previous_response_id` string, nullable
  - `include` IncludeEnum[], nullable
  - `tools` ResponsesToolParam[], nullable
    - union
      - FunctionToolParam
        - `name` string, required
        - `description` string, nullable
        - `parameters` object, nullable
        - `strict` boolean, nullable
        - `type` 'function', required
      - object
  - `tool_choice` union
    - ToolChoice2
    - 'none' | 'auto' | 'required'
    - ToolChoice4
      - `type` 'allowed_tools', required
      - `tools` SpecificToolChoiceParam[], required — The list of tools that are permitted for this request.
        - `type` 'function', required
        - `name` string, required — The name of the function tool to call.
      - `mode` 'none' | 'auto' | 'required'
  - `text` TextParam
    - `format` union
      - SchemasResponsesv2TextResponseFormat
        - `type` 'text', required
      - JsonSchemaResponseFormatParam
        - `type` 'json_schema'
        - `description` string, nullable — A description of what the response format is for, used by the model to determine how to respond in the format.
        - `name` string, nullable — The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
        - `schema` object, nullable — The schema for the response format, described as a JSON Schema object.
        - `strict` boolean, nullable
    - `verbosity` 'low' | 'medium' | 'high'
  - `temperature` number, nullable
  - `top_p` number, nullable
  - `presence_penalty` number, nullable
  - `frequency_penalty` number, nullable
  - `parallel_tool_calls` boolean, nullable
  - `stream` boolean, nullable — Whether to stream response events as server-sent events.
  - `background` boolean, nullable — Whether to run the request in the background and return immediately.
  - `max_output_tokens` integer, nullable
  - `max_tool_calls` integer, nullable
  - `reasoning` ReasoningParam
    - `effort` 'none' | 'low' | 'medium' | 'high' | 'xhigh'
    - `summary` 'concise' | 'detailed' | 'auto'
  - `prompt_cache_key` string, nullable
  - `truncation` 'auto' | 'disabled'
  - `instructions` string, nullable
  - `store` boolean, nullable — Whether to store the response so it can be retrieved later.
  - `service_tier` 'auto' | 'default' | 'flex' | 'priority'
  - `top_logprobs` integer, nullable

## Response `200`

Successful Response

- ResponseResource
  - `id` string, required — The unique ID of the response that was created.
  - `object` 'response', required
  - `created_at` integer, required — The Unix timestamp (in seconds) for when the response was created.
  - `completed_at` integer, nullable, required
  - `status` string, required — The status that was set for the response.
  - `incomplete_details` IncompleteDetails, required
    - `reason` string, required — The reason the response could not be completed.
  - `model` string, required — The model that generated this response.
  - `previous_response_id` string, nullable, required
  - `instructions` string, nullable, required
  - `output` ItemField[], required — The output items that were generated by the model.
    - union
      - MessageOutput
        - `type` 'message', required — The type of the message. Always set to `message`.
        - `id` string, required — The unique ID of the message.
        - `status` 'in_progress' | 'completed' | 'incomplete', required
        - `role` 'user' | 'assistant' | 'system' | 'developer', required
        - `content` Content4[], required — The content of the message
          - union
            - InputTextContent
              - …
            - OutputTextContent
              - …
            - TextContentOutput
              - …
            - SummaryTextContent
              - …
            - ReasoningTextContent
              - …
            - RefusalContent
              - …
            - InputImageContent
              - …
            - InputFileContent
              - …
            - InputVideoContent
              - …
        - `phase` 'commentary' | 'final_answer'
      - FunctionCall
        - `type` 'function_call', required — The type of the item. Always `function_call`.
        - `id` string, required — The unique ID of the function call item.
        - `call_id` string, required — The unique ID of the function tool call that was generated.
        - `name` string, required — The name of the function that was called.
        - `arguments` string, required — The arguments JSON string that was generated.
        - `status` 'in_progress' | 'completed' | 'incomplete', required
      - FunctionCallOutput
        - `type` 'function_call_output', required — The type of the function tool call output. Always `function_call_output`.
        - `id` string, required — The unique ID of the function tool call output. Populated when this item is returned via API.
        - `call_id` string, required — The unique ID of the function tool call generated by the model.
        - `output` union, required
          - string
          - Output1[]
            - union
              - …
        - `status` 'in_progress' | 'completed' | 'incomplete', required
      - ReasoningBody
        - `type` 'reasoning', required — The type of the item. Always `reasoning`.
        - `id` string, required — The unique ID of the reasoning item.
        - `content` Content5[], nullable — The reasoning content that was generated.
          - union
            - InputTextContent
              - …
            - OutputTextContent
              - …
            - TextContentOutput
              - …
            - SummaryTextContent
              - …
            - ReasoningTextContent
              - …
            - RefusalContent
              - …
            - InputImageContent
              - …
            - InputFileContent
              - …
        - `summary` Summary[], required — The reasoning summary content that was generated.
          - union
            - InputTextContent
              - …
            - OutputTextContent
              - …
            - TextContentOutput
              - …
            - SummaryTextContent
              - …
            - ReasoningTextContent
              - …
            - RefusalContent
              - …
            - InputImageContent
              - …
            - InputFileContent
              - …
        - `encrypted_content` string, nullable — The encrypted reasoning content that was generated.
      - CompactionBody
        - `type` 'compaction', required — The type of the item. Always `compaction`.
        - `id` string, required — The unique ID of the compaction item.
        - `encrypted_content` string, required — The encrypted content that was produced by compaction.
        - `created_by` string, nullable — The identifier of the actor that created the item.
  - `error` Error1, required
    - `code` string, required — A machine-readable error code that was returned.
    - `message` string, required — A human-readable description of the error that was returned.
  - `tools` ToolOutput[], required — The tools that were available to the model during response generation.
    - `type` 'function', required
    - `name` string, required — The name of the function to call.
    - `description` string, nullable, required
    - `parameters` object, nullable, required
    - `strict` boolean, nullable, required
  - `tool_choice` union, required
    - FunctionToolChoice
      - `type` 'function', required
      - `name` string, nullable
    - 'none' | 'auto' | 'required'
    - AllowedToolChoice
      - `type` 'allowed_tools', required
      - `tools` FunctionToolChoice[], required
        - `type` 'function', required
        - `name` string, nullable
      - `mode` 'none' | 'auto' | 'required', required
  - `truncation` 'auto' | 'disabled', required
  - `parallel_tool_calls` boolean, required — Whether the model was allowed to call multiple tools in parallel.
  - `text` TextField, required
    - `format` union, required
      - TextResponseFormatOutput
        - `type` 'text', required
      - JsonObjectResponseFormatOutput
        - `type` 'json_object', required
      - JsonSchemaResponseFormatOutput
        - `type` 'json_schema', required
        - `name` string, required
        - `description` string, nullable, required
        - `schema` unknown, required
        - `strict` boolean, required
    - `verbosity` 'low' | 'medium' | 'high'
  - `top_p` number, required — The nucleus sampling parameter that was used for this response.
  - `presence_penalty` number, required — The presence penalty that was used to penalize new tokens based on whether they appear in the text so far.
  - `frequency_penalty` number, required — The frequency penalty that was used to penalize new tokens based on their frequency in the text so far.
  - `top_logprobs` integer, required — The number of most likely tokens that were returned at each position, along with their log probabilities.
  - `temperature` number, required — The sampling temperature that was used for this response.
  - `reasoning` Reasoning, required
    - `effort` 'none' | 'low' | 'medium' | 'high' | 'xhigh', required
    - `summary` 'concise' | 'detailed' | 'auto', required
  - `usage` SchemasResponsesv2Usage, required
    - `input_tokens` integer, required — The number of input tokens that were used to generate the response.
    - `output_tokens` integer, required — The number of output tokens that were generated by the model.
    - `total_tokens` integer, required — The total number of tokens that were used.
    - `input_tokens_details` InputTokensDetails, required
      - `cached_tokens` integer, required — The number of input tokens that were served from cache.
    - `output_tokens_details` OutputTokensDetails, required
      - `reasoning_tokens` integer, required — The number of output tokens that were attributed to reasoning.
  - `max_output_tokens` integer, nullable, required
  - `max_tool_calls` integer, nullable, required
  - `store` boolean, required — Whether this response was stored so it can be retrieved later.
  - `background` boolean, required — Whether this request was run in the background.
  - `service_tier` string, required — The service tier that was used for this response.
  - `prompt_cache_key` string, nullable, required

## Other responses

- `400` — Bad Request - Invalid query parameters or body format.
- `401` — Unauthorized - Missing or invalid API key.
- `403` — Forbidden - Key does not have permission or is disabled.
- `422` — Unprocessable Entity - Request body validation failed.
- `429` — Too Many Requests - Rate limit exceeded.
- `500` — Internal Server Error - Internal error occurred.
- `502` — Bad Gateway - Provider error occurred.

---

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