> ## Documentation Index
> Fetch the complete documentation index at: https://concentrate.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Response

> Start a stateful conversation with your model of choice

## Overview

The main endpoint for generating AI responses. Supports both streaming and non-streaming modes, with automatic normalization across all providers.

## Guardrails

Redaction guardrails are configured on your API key (not in this endpoint body). When enabled, they are applied automatically for requests made with that key.

See [Guardrails & Redaction](/docs/api-reference/endpoint/guardrails-redaction).


## OpenAPI

````yaml POST /v1/responses/
openapi: 3.0.3
info:
  title: Responses API
  description: Unified responses API
  version: 1.0.0
servers:
  - url: https://api.concentrate.ai
security: []
paths:
  /v1/responses/:
    post:
      tags:
        - responses
      description: Start a stateful conversation with your model of choice
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                input:
                  anyOf:
                    - type: string
                      minLength: 1
                    - minItems: 1
                      type: array
                      items:
                        $ref: '#/components/schemas/InputItemInput'
                  description: >-
                    Text, image, or file inputs to the model, used to generate a
                    response.
                model:
                  description: >-
                    Model identifier. Use /v1/models to list all available
                    models. Supports canonical names (e.g. gpt-5.2,
                    claude-opus-4-6), aliases, and provider-prefixed formats
                    (e.g. openai/gpt-5.2). Use "auto" for automatic model
                    selection.
                  type: string
                include:
                  nullable: true
                  maxItems: 8
                  type: array
                  items:
                    type: string
                    enum:
                      - web_search_call.results
                      - web_search_call.action.sources
                      - message.output_text.logprobs
                      - message.input_image.image_url
                      - reasoning.encrypted_content
                      - file_search_call.results
                      - computer_call_output.output.image_url
                      - code_interpreter_call.outputs
                  description: >-
                    Specify additional output data to include in the model
                    response.
                instructions:
                  nullable: true
                  type: string
                  description: >-
                    A system (or developer) message inserted into the model's
                    context. When using along with previous_response_id, the
                    instructions from a previous response will not be carried
                    over to the next response. This makes it simple to swap out
                    system (or developer) messages in new responses.
                max_output_tokens:
                  nullable: true
                  type: integer
                  minimum: 0
                  exclusiveMinimum: true
                  maximum: 9007199254740991
                  description: >-
                    An upper bound for the number of tokens that can be
                    generated for a response, including visible output tokens
                    and reasoning tokens.
                metadata:
                  nullable: true
                  type: object
                  additionalProperties:
                    type: string
                    maxLength: 512
                  description: >-
                    Set of 16 key-value pairs that can be attached to an object.
                    This can be useful for storing additional information about
                    the object in a structured format, and querying for objects
                    via API or the dashboard. Keys are strings with a maximum
                    length of 64 characters. Values are strings with a maximum
                    length of 512 characters.
                reasoning:
                  nullable: true
                  type: object
                  properties:
                    effort:
                      nullable: true
                      type: string
                      enum:
                        - none
                        - minimal
                        - low
                        - medium
                        - high
                        - xhigh
                        - max
                      description: >-
                        Constrains effort on reasoning for reasoning models.
                        Reducing reasoning effort can result in faster responses
                        and fewer tokens used on reasoning in a response.

                        Not all models support all reasoning levels. If your
                        requested reasoning level isn't supported by the model,
                        Concentrate bumps it up, then down, to the closest
                        reasoning level.
                    summary:
                      nullable: true
                      type: string
                      enum:
                        - auto
                        - concise
                        - detailed
                      description: >-
                        A summary of the reasoning performed by the model. This
                        can be useful for debugging and understanding the
                        model's reasoning process. One of auto, concise, or
                        detailed. If both summary and generate_summary are
                        provided, Concentrate prefers summary over
                        generate_summary.
                    generate_summary:
                      nullable: true
                      type: string
                      enum:
                        - auto
                        - concise
                        - detailed
                      description: >-
                        A summary of the reasoning performed by the model. This
                        can be useful for debugging and understanding the
                        model's reasoning process. One of auto, concise, or
                        detailed. If both summary and generate_summary are
                        provided, Concentrate prefers summary over
                        generate_summary.
                  description: Configuration options for reasoning models.
                stream:
                  nullable: true
                  type: boolean
                  description: >-
                    If set to true, the model response data will be streamed to
                    the client as it is generated using server-sent events.
                temperature:
                  nullable: true
                  type: number
                  minimum: 0
                  maximum: 2
                  description: >-
                    What sampling temperature to use, between 0 and 2. Higher
                    values like 0.8 will make the output more random, while
                    lower values like 0.2 will make it more focused and
                    deterministic. We generally recommend altering this or top_p
                    but not both.
                text:
                  nullable: true
                  type: object
                  properties:
                    format:
                      nullable: true
                      oneOf:
                        - $ref: '#/components/schemas/TextFormatInput'
                        - $ref: '#/components/schemas/JsonSchemaFormatInput'
                        - $ref: '#/components/schemas/JsonObjectFormatInput'
                      description: >-
                        An object specifying the format that the model must
                        output.

                        Configuring { "type": "json_schema" } enables Structured
                        Outputs, which ensures the model will match your
                        supplied JSON schema.

                        The default format is { "type": "text" } with no
                        additional options.

                        Not recommended for gpt-4o and newer models:

                        Setting to { "type": "json_object" } enables the older
                        JSON mode, which ensures the message the model generates
                        is valid JSON. Using json_schema is preferred for models
                        that support it. For models that don't support
                        json_schema but do support json_object, Concentrate
                        automatically downgrades to json_object and inserts your
                        schema as a system prompt for backwards compatibility.
                        Thus, Concentrate always recommends sending json_schema
                        instead of json_object.
                    verbosity:
                      nullable: true
                      default: medium
                      type: string
                      enum:
                        - low
                        - medium
                        - high
                      description: >-
                        Constrains the verbosity of the model's response. Lower
                        values will result in more concise responses, while
                        higher values will result in more verbose responses.
                        Currently supported values are low, medium, and high.
                  description: >-
                    Configuration options for a text response from the model.
                    Can be plain text or structured JSON data.
                tools:
                  nullable: true
                  type: array
                  items:
                    $ref: '#/components/schemas/ToolInput'
                  description: >-
                    An array of tools the model may call while generating a
                    response. You can specify which tool to use by setting the
                    tool_choice parameter.
                tool_choice:
                  nullable: true
                  allOf:
                    - $ref: '#/components/schemas/ToolChoiceInput'
                top_p:
                  nullable: true
                  type: number
                  minimum: 0
                  maximum: 1
                  description: >-
                    An alternative to sampling with temperature, called nucleus
                    sampling, where the model considers the results of the
                    tokens with top_p probability mass. So 0.1 means only the
                    tokens comprising the top 10% probability mass are
                    considered. We generally recommend altering this or
                    temperature but not both.
                parallel_tool_calls:
                  nullable: true
                  type: boolean
                  description: Whether to allow the model to run tool calls in parallel.
                previous_response_id:
                  nullable: true
                  type: string
                  description: >-
                    The unique ID of the previous response to the model. Use
                    this to create multi-turn conversations. Cannot be used in
                    conjunction with conversation. Concentrate enables this for
                    all models. In order to be used, request logging must be
                    enabled. Learn more.
                prompt_cache_key:
                  nullable: true
                  type: string
                  description: >-
                    Used to cache responses for similar requests to optimize
                    your cache hit rates. Replaces the user field. If
                    prompt_cache_key or user is not set, Concentrate will
                    automatically add a prompt cache key based on your API key.
                prompt_cache_options:
                  nullable: true
                  allOf:
                    - $ref: '#/components/schemas/PromptCacheOptionsInput'
                prompt_cache_retention:
                  nullable: true
                  type: string
                  enum:
                    - in-memory
                    - in_memory
                    - 24h
                  description: >-
                    The legacy OpenAI prompt-cache retention policy. Earlier
                    OpenAI models use this field for in-memory or 24-hour
                    retention. GPT-5.6 and later use prompt_cache_options.ttl
                    instead.
                top_logprobs:
                  nullable: true
                  type: integer
                  minimum: 0
                  maximum: 20
                  description: >-
                    An integer between 0 and 20 specifying the number of most
                    likely tokens to return at each token position, each with an
                    associated log probability.
                background:
                  nullable: true
                  type: boolean
                  description: >-
                    Whether to run the model response in the background.
                    Unsupported, but included for compatibility.
                context_management:
                  nullable: true
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - compaction
                        description: >-
                          The type of context management strategy. Currently
                          only compaction is supported.
                      compact_threshold:
                        type: integer
                        minimum: 1000
                        maximum: 9007199254740991
                        description: >-
                          The token count at which older context is compacted to
                          free up the context window.
                    required:
                      - type
                      - compact_threshold
                  description: >-
                    Configuration for how the model's context window is managed
                    during a response, such as automatic compaction of older
                    turns. Supported on OpenAI models. Note: on OpenAI
                    gpt-5-family reasoning models, OpenAI's backend currently
                    errors when compaction triggers during a response that
                    performs native web search.
                conversation:
                  nullable: true
                  anyOf:
                    - type: string
                      description: The unique ID of the conversation.
                    - type: object
                      properties:
                        id:
                          type: string
                          description: The unique ID of the conversation.
                      required:
                        - id
                  description: >-
                    The conversation that this response belongs to. Items from
                    this conversation are prepended to input_items for this
                    response request. Cannot be used in conjunction with
                    previous_response_id. Currently unsupported, but included
                    for compatibility. Use previous_response_id instead.
                max_tool_calls:
                  nullable: true
                  type: integer
                  minimum: 0
                  exclusiveMinimum: true
                  maximum: 9007199254740991
                  description: >-
                    The maximum number of total calls to built-in tools that can
                    be processed in a response. This maximum number applies
                    across all built-in tool calls, not per individual tool. Any
                    further attempts to call a tool by the model will be
                    ignored.
                prompt:
                  nullable: true
                  type: object
                  properties:
                    id:
                      type: string
                      description: The unique identifier of the prompt template to use.
                    version:
                      type: string
                      description: Optional version of the prompt template.
                    variables:
                      type: object
                      additionalProperties:
                        anyOf:
                          - type: string
                          - $ref: '#/components/schemas/InputItemContentInput'
                      description: >-
                        Optional map of values to substitute in for variables in
                        your prompt. The substitution values can either be
                        strings, or other Response input types like images or
                        files.
                  required:
                    - id
                    - version
                    - variables
                  description: >-
                    Reference to a prompt template and its variables. Currently
                    unsupported, but included for compatibility.
                safety_identifier:
                  nullable: true
                  type: string
                  description: >-
                    A stable identifier used to help detect users of your
                    application that may be violating usage policies. The IDs
                    should be a string that uniquely identifies each user. We
                    recommend hashing their username or email address, in order
                    to avoid sending us any identifying information.

                    Unsupported, as Concentrate reserves this field.
                service_tier:
                  nullable: true
                  type: string
                  enum:
                    - auto
                    - default
                    - flex
                    - scale
                    - priority
                  description: >-
                    Specifies the processing type used for serving the request.
                    Determines the pricing and performance tier used to process
                    the request. When not set, the default behavior is auto.
                    Currently unsupported, but included for compatibility.
                store:
                  nullable: true
                  type: boolean
                  description: >-
                    Whether to store the generated model response for later
                    retrieval via API.
                stream_options:
                  nullable: true
                  type: object
                  properties:
                    include_obfuscation:
                      nullable: true
                      type: boolean
                      description: >-
                        When true, stream obfuscation will be enabled. Stream
                        obfuscation adds random characters to an obfuscation
                        field on streaming delta events to normalize payload
                        sizes as a mitigation to certain side-channel attacks.
                        These obfuscation fields are included by default, but
                        add a small amount of overhead to the data stream. You
                        can set include_obfuscation to false to optimize for
                        bandwidth if you trust the network links between your
                        application and the API.

                        Currently unsupported, but included for compatibility.
                  description: >-
                    Options for streaming responses. Only set this when you set
                    stream: true.
                truncation:
                  nullable: true
                  type: string
                  enum:
                    - auto
                    - disabled
                  description: >-
                    The truncation strategy to use for the model response. auto:
                    if the input exceeds the model's context window size, the
                    model truncates the response by dropping items from the
                    beginning of the conversation. disabled (default): if the
                    input size exceeds the context window size for a model, the
                    request fails with a 400 error.

                    Currently unsupported, but included for compatibility.
                user:
                  nullable: true
                  type: string
                  description: >-
                    This field is being replaced by safety_identifier and
                    prompt_cache_key. We recommend using prompt_cache_key
                    instead to maintain caching optimizations. A stable
                    identifier for your end-users. Used to boost cache hit rates
                    by better bucketing similar requests and to help detect and
                    prevent abuse.

                    Using this as a safety identifier has no effect, but this
                    value will be used for prompt_cache_key instead of a value
                    based on your API key if provided.
                routing:
                  nullable: true
                  type: object
                  properties:
                    model:
                      nullable: true
                      type: object
                      properties:
                        fallbacks:
                          nullable: true
                          type: array
                          items:
                            description: One of 4631 allowed values.
                            type: string
                          description: >-
                            Ordered list of models to fall back to if the
                            primary model is unavailable or fails.

                            Using auto in the fallbacks will move it to the end
                            of the fallback list, and can be used to
                            continuously try models until one succeeds.
                        sort:
                          nullable: true
                          default: performance
                          description: >-
                            The metric used to sort and select among routing
                            candidates, such as cost, performance, or a
                            percentile latency metric (e.g. p95_latency).
                            Defaults to performance.

                            All metrics are cached for the most recent 15
                            minutes (except percentile latencies other than p50,
                            p90, and p99).
                          anyOf:
                            - type: string
                              enum:
                                - cost
                                - performance
                                - total_requests
                                - uptime
                                - throughput
                                - avg_latency
                                - latency
                                - avg_e2e_latency
                                - e2e_latency
                                - input_tokens
                                - output_tokens
                                - total_tokens
                            - type: string
                              pattern: ^p([0-9]|[1-9][0-9]|100)_(latency|e2e_latency)$
                      description: Model-level routing configuration.
                    provider:
                      nullable: true
                      type: object
                      properties:
                        fallbacks:
                          nullable: true
                          type: array
                          items:
                            type: string
                            description: One of 65 allowed values.
                          description: >-
                            Ordered list of providers to fall back to if the
                            primary provider is unavailable or fails.
                        sort:
                          nullable: true
                          default: performance
                          description: >-
                            The metric used to sort and select among routing
                            candidates, such as cost, performance, or a
                            percentile latency metric (e.g. p95_latency).
                            Defaults to performance.

                            All metrics are cached for the most recent 15
                            minutes (except percentile latencies other than p50,
                            p90, and p99).
                          anyOf:
                            - type: string
                              enum:
                                - cost
                                - performance
                                - total_requests
                                - uptime
                                - throughput
                                - avg_latency
                                - latency
                                - avg_e2e_latency
                                - e2e_latency
                                - input_tokens
                                - output_tokens
                                - total_tokens
                            - type: string
                              pattern: ^p([0-9]|[1-9][0-9]|100)_(latency|e2e_latency)$
                        interval:
                          nullable: true
                          description: >-
                            The time window over which routing metrics are
                            evaluated. Can be written as '1h' or '1 hour'.
                            Defaults to 15 minutes.

                            All metrics are cached for the most recent 15
                            minutes (except percentile latencies other than p50,
                            p90, and p99). Any historical metrics longer than 15
                            minutes are then cached for 15 minutes upon request,
                            and are refreshed when you use those metrics again.
                          type: string
                          pattern: >-
                            ^\d+(?:m| minutes|h| hours?|d| days?|w| weeks?|y|
                            years?)$
                      description: Provider-level routing configuration.
                  description: >-
                    Concentrate routing configuration controlling how requests
                    are routed across models and providers. Learn more about
                    routing.
                cache_control:
                  nullable: true
                  allOf:
                    - $ref: '#/components/schemas/CacheControlInput'
              required:
                - input
                - model
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  model:
                    type: string
                  object:
                    default: response
                    type: string
                    enum:
                      - response
                  output:
                    type: array
                    items:
                      oneOf:
                        - $ref: '#/components/schemas/OutputMessageItem'
                        - $ref: '#/components/schemas/ReasoningItem'
                        - $ref: '#/components/schemas/FunctionToolCallItem'
                        - $ref: '#/components/schemas/CustomToolCallItem'
                        - $ref: '#/components/schemas/WebSearchToolCallItem'
                        - $ref: '#/components/schemas/CompactionItem'
                  error:
                    nullable: true
                    type: object
                    properties:
                      code:
                        type: string
                        description: One of 25 allowed values.
                      message:
                        type: string
                      upstream_error:
                        type: string
                        description: >-
                          The raw JSON error payload returned by the upstream
                          provider, present when the error originated there
                    required:
                      - code
                      - message
                    additionalProperties: false
                  frequency_penalty:
                    nullable: true
                    type: number
                  incomplete_details:
                    nullable: true
                    type: object
                    properties:
                      reason:
                        type: string
                        enum:
                          - max_output_tokens
                          - content_filter
                    required:
                      - reason
                    additionalProperties: false
                  instructions:
                    nullable: true
                    anyOf:
                      - type: string
                      - $ref: '#/components/schemas/InputItem'
                  metadata:
                    nullable: true
                    type: object
                    additionalProperties:
                      type: string
                      maxLength: 512
                    description: >-
                      Set of 16 key-value pairs that can be attached to an
                      object. This can be useful for storing additional
                      information about the object in a structured format, and
                      querying for objects via API or the dashboard. Keys are
                      strings with a maximum length of 64 characters. Values are
                      strings with a maximum length of 512 characters.
                  temperature:
                    nullable: true
                    type: number
                    minimum: 0
                    maximum: 2
                    description: >-
                      What sampling temperature to use, between 0 and 2. Higher
                      values like 0.8 will make the output more random, while
                      lower values like 0.2 will make it more focused and
                      deterministic. We generally recommend altering this or
                      top_p but not both.
                  tool_choice:
                    nullable: true
                    allOf:
                      - $ref: '#/components/schemas/ToolChoice'
                  tools:
                    nullable: true
                    type: array
                    items:
                      $ref: '#/components/schemas/Tool'
                  top_p:
                    nullable: true
                    type: number
                    minimum: 0
                    maximum: 1
                    description: >-
                      An alternative to sampling with temperature, called
                      nucleus sampling, where the model considers the results of
                      the tokens with top_p probability mass. So 0.1 means only
                      the tokens comprising the top 10% probability mass are
                      considered. We generally recommend altering this or
                      temperature but not both.
                  background:
                    nullable: true
                    type: boolean
                  completed_at:
                    nullable: true
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  created_at:
                    nullable: true
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  conversation:
                    nullable: true
                    type: object
                    properties:
                      id:
                        type: string
                    required:
                      - id
                    additionalProperties: false
                  max_output_tokens:
                    nullable: true
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  max_tool_calls:
                    nullable: true
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  parallel_tool_calls:
                    nullable: true
                    type: boolean
                  presence_penalty:
                    nullable: true
                    type: number
                  previous_response_id:
                    nullable: true
                    type: string
                  prompt:
                    nullable: true
                    type: object
                    properties:
                      id:
                        type: string
                        description: The unique identifier of the prompt template to use.
                      version:
                        type: string
                        description: Optional version of the prompt template.
                      variables:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                            - $ref: '#/components/schemas/InputItemContent'
                        description: >-
                          Optional map of values to substitute in for variables
                          in your prompt. The substitution values can either be
                          strings, or other Response input types like images or
                          files.
                    required:
                      - id
                      - version
                      - variables
                    additionalProperties: false
                    description: >-
                      Reference to a prompt template and its variables.
                      Currently unsupported, but included for compatibility.
                  prompt_cache_key:
                    nullable: true
                    type: string
                  prompt_cache_options:
                    nullable: true
                    allOf:
                      - $ref: '#/components/schemas/PromptCacheOptions'
                  prompt_cache_retention:
                    nullable: true
                    type: string
                    enum:
                      - in-memory
                      - in_memory
                      - 24h
                    description: >-
                      The legacy OpenAI prompt-cache retention policy. Earlier
                      OpenAI models use this field for in-memory or 24-hour
                      retention. GPT-5.6 and later use prompt_cache_options.ttl
                      instead.
                  reasoning:
                    nullable: true
                    type: object
                    properties:
                      effort:
                        nullable: true
                        type: string
                        enum:
                          - none
                          - minimal
                          - low
                          - medium
                          - high
                          - xhigh
                          - max
                        description: >-
                          Constrains effort on reasoning for reasoning models.
                          Reducing reasoning effort can result in faster
                          responses and fewer tokens used on reasoning in a
                          response.

                          Not all models support all reasoning levels. If your
                          requested reasoning level isn't supported by the
                          model, Concentrate bumps it up, then down, to the
                          closest reasoning level.
                      summary:
                        nullable: true
                        type: string
                        enum:
                          - auto
                          - concise
                          - detailed
                        description: >-
                          A summary of the reasoning performed by the model.
                          This can be useful for debugging and understanding the
                          model's reasoning process. One of auto, concise, or
                          detailed. If both summary and generate_summary are
                          provided, Concentrate prefers summary over
                          generate_summary.
                      generate_summary:
                        nullable: true
                        type: string
                        enum:
                          - auto
                          - concise
                          - detailed
                        description: >-
                          A summary of the reasoning performed by the model.
                          This can be useful for debugging and understanding the
                          model's reasoning process. One of auto, concise, or
                          detailed. If both summary and generate_summary are
                          provided, Concentrate prefers summary over
                          generate_summary.
                    additionalProperties: false
                    description: Configuration options for reasoning models.
                  safety_identifier:
                    nullable: true
                    type: string
                  service_tier:
                    nullable: true
                    type: string
                    enum:
                      - auto
                      - default
                      - flex
                      - scale
                      - priority
                    description: >-
                      Specifies the processing type used for serving the
                      request. Determines the pricing and performance tier used
                      to process the request. When not set, the default behavior
                      is auto. Currently unsupported, but included for
                      compatibility.
                  status:
                    nullable: true
                    type: string
                    enum:
                      - completed
                      - in_progress
                      - incomplete
                      - failed
                      - cancelled
                      - queued
                    description: >-
                      The status of the response. One of completed, in_progress,
                      incomplete, failed, cancelled, or queued.
                  store:
                    nullable: true
                    type: boolean
                  text:
                    nullable: true
                    type: object
                    properties:
                      format:
                        nullable: true
                        oneOf:
                          - $ref: '#/components/schemas/TextFormat'
                          - $ref: '#/components/schemas/JsonSchemaFormat'
                          - $ref: '#/components/schemas/JsonObjectFormat'
                        description: >-
                          An object specifying the format that the model must
                          output.

                          Configuring { "type": "json_schema" } enables
                          Structured Outputs, which ensures the model will match
                          your supplied JSON schema.

                          The default format is { "type": "text" } with no
                          additional options.

                          Not recommended for gpt-4o and newer models:

                          Setting to { "type": "json_object" } enables the older
                          JSON mode, which ensures the message the model
                          generates is valid JSON. Using json_schema is
                          preferred for models that support it. For models that
                          don't support json_schema but do support json_object,
                          Concentrate automatically downgrades to json_object
                          and inserts your schema as a system prompt for
                          backwards compatibility. Thus, Concentrate always
                          recommends sending json_schema instead of json_object.
                      verbosity:
                        nullable: true
                        default: medium
                        type: string
                        enum:
                          - low
                          - medium
                          - high
                        description: >-
                          Constrains the verbosity of the model's response.
                          Lower values will result in more concise responses,
                          while higher values will result in more verbose
                          responses. Currently supported values are low, medium,
                          and high.
                    additionalProperties: false
                    description: >-
                      Configuration options for a text response from the model.
                      Can be plain text or structured JSON data.
                  top_logprobs:
                    nullable: true
                    type: integer
                    minimum: 0
                    maximum: 20
                    description: >-
                      An integer between 0 and 20 specifying the number of most
                      likely tokens to return at each token position, each with
                      an associated log probability.
                  truncation:
                    nullable: true
                    type: string
                    enum:
                      - auto
                      - disabled
                    description: >-
                      The truncation strategy to use for the model response.
                      auto: if the input exceeds the model's context window
                      size, the model truncates the response by dropping items
                      from the beginning of the conversation. disabled
                      (default): if the input size exceeds the context window
                      size for a model, the request fails with a 400 error.

                      Currently unsupported, but included for compatibility.
                  usage:
                    nullable: true
                    type: object
                    properties:
                      input_tokens:
                        type: number
                        minimum: 0
                      input_tokens_details:
                        type: object
                        properties:
                          cached_tokens:
                            type: number
                            minimum: 0
                            description: >-
                              The number of input tokens read from the prompt
                              cache.
                          cached_tokens_created:
                            nullable: true
                            type: number
                            minimum: 0
                            description: >-
                              Deprecated: use cache_write_tokens instead. The
                              number of input tokens written to the prompt
                              cache. Still populated for now, but will be
                              removed in a future release.
                            deprecated: true
                          cache_write_tokens:
                            nullable: true
                            type: number
                            minimum: 0
                            description: >-
                              The number of input tokens written to the prompt
                              cache.
                        required:
                          - cached_tokens
                        additionalProperties: false
                      output_tokens:
                        type: number
                        minimum: 0
                      output_tokens_details:
                        type: object
                        properties:
                          reasoning_tokens:
                            type: number
                            minimum: 0
                        required:
                          - reasoning_tokens
                        additionalProperties: false
                      tool_calls:
                        nullable: true
                        type: object
                        properties:
                          web_search:
                            nullable: true
                            type: number
                            minimum: 0
                          exa_web_search:
                            nullable: true
                            type: number
                            minimum: 0
                        additionalProperties: false
                      total_tokens:
                        type: number
                        minimum: 0
                    required:
                      - input_tokens
                      - input_tokens_details
                      - output_tokens
                      - output_tokens_details
                      - total_tokens
                    additionalProperties: false
                  user:
                    nullable: true
                    type: string
                  cost:
                    nullable: true
                    type: object
                    properties:
                      total:
                        type: number
                      byok:
                        type: boolean
                        description: >-
                          Whether the request was served using one of your BYOK
                          provider keys.
                      breakdown:
                        type: object
                        additionalProperties:
                          type: object
                          properties:
                            input_tokens:
                              type: number
                              minimum: 0
                            input_tokens_details:
                              type: object
                              properties:
                                cached_tokens:
                                  type: number
                                  minimum: 0
                                  description: >-
                                    The number of input tokens read from the
                                    prompt cache.
                                cached_tokens_created:
                                  nullable: true
                                  type: number
                                  minimum: 0
                                  description: >-
                                    Deprecated: use cache_write_tokens instead.
                                    The number of input tokens written to the
                                    prompt cache. Still populated for now, but
                                    will be removed in a future release.
                                  deprecated: true
                                cache_write_tokens:
                                  nullable: true
                                  type: number
                                  minimum: 0
                                  description: >-
                                    The number of input tokens written to the
                                    prompt cache.
                              required:
                                - cached_tokens
                              additionalProperties: false
                            output_tokens:
                              type: number
                              minimum: 0
                            output_tokens_details:
                              type: object
                              properties:
                                reasoning_tokens:
                                  type: number
                                  minimum: 0
                              required:
                                - reasoning_tokens
                              additionalProperties: false
                            tool_calls:
                              nullable: true
                              type: object
                              properties:
                                web_search:
                                  nullable: true
                                  type: number
                                  minimum: 0
                                exa_web_search:
                                  nullable: true
                                  type: number
                                  minimum: 0
                              additionalProperties: false
                            total_tokens:
                              type: number
                              minimum: 0
                          required:
                            - input_tokens
                            - input_tokens_details
                            - output_tokens
                            - output_tokens_details
                            - total_tokens
                          additionalProperties: false
                    required:
                      - total
                      - byok
                      - breakdown
                    additionalProperties: false
                  redact:
                    nullable: true
                    type: object
                    properties:
                      entities_found:
                        type: number
                      entity_types:
                        type: array
                        items:
                          type: string
                      models_used:
                        type: array
                        items:
                          type: string
                      execution_time_ms:
                        type: number
                      redaction_coverage:
                        type: number
                      redacted_input:
                        type: array
                        items:
                          $ref: '#/components/schemas/InputItem'
                      redacted_tools:
                        type: array
                        items:
                          $ref: '#/components/schemas/Tool'
                    additionalProperties: false
                required:
                  - id
                  - model
                  - object
                  - output
                  - usage
                additionalProperties: false
        default:
          description: Default Response
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            description: One of 25 allowed values.
                          message:
                            type: string
                          upstream_error:
                            type: string
                            description: >-
                              The raw JSON error payload returned by the
                              upstream provider, present when the error
                              originated there
                        required:
                          - code
                          - message
                        additionalProperties: false
                    required:
                      - error
                    additionalProperties: false
components:
  schemas:
    InputItemInput:
      anyOf:
        - $ref: '#/components/schemas/InputMessageInput'
        - $ref: '#/components/schemas/ItemInput'
      description: 'A single input item: a message or an item.'
    TextFormatInput:
      type: object
      properties:
        type:
          type: string
          description: The type of the format. Always text.
          enum:
            - text
      required:
        - type
      title: Text Format
      description: Default response format. Used to generate text responses.
    JsonSchemaFormatInput:
      type: object
      properties:
        type:
          type: string
          description: The type of the format. Always json_schema.
          enum:
            - json_schema
        name:
          type: string
          maxLength: 256
          description: >-
            The name. Must contain only alphanumeric characters, underscores,
            dots, and hyphens, with a maximum length of 256 characters, with a
            minimum length of 1 character after unaccepted characters are
            stripped.
        schema:
          type: object
          additionalProperties: {}
          description: >-
            The schema for the response format, described as a JSON Schema
            object.
        description:
          type: string
          description: >-
            A description of what the response format is for, used by the model
            to determine how to respond in the format.
          nullable: true
        strict:
          type: boolean
          description: >-
            Whether to enable strict schema adherence when generating the
            output. If set to true, the model will always follow the exact
            schema defined in the schema field.
          nullable: true
      required:
        - type
        - name
        - schema
      title: JSON Schema Format
      description: >-
        JSON Schema response format. Used to generate structured JSON responses

        For models that don't support json_schema but do support json_object,
        Concentrate automatically downgrades to json_object and inserts your
        schema as a system prompt for backwards compatibility. Thus, Concentrate
        always recommends sending json_schema instead of json_object.
    JsonObjectFormatInput:
      type: object
      properties:
        type:
          type: string
          description: The type of the format. Always json_object.
          enum:
            - json_object
      required:
        - type
      title: JSON Object Format
      description: >-
        JSON object response format. An older method of generating JSON
        responses. Using json_schema is recommended for models that support it.
        Note that the model will not generate JSON without a system or user
        message instructing it to do so.
    ToolInput:
      oneOf:
        - $ref: '#/components/schemas/FunctionToolInput'
        - $ref: '#/components/schemas/WebSearchToolInput'
        - $ref: '#/components/schemas/CustomToolInput'
      description: A tool the model may call while generating a response.
    ToolChoiceInput:
      anyOf:
        - $ref: '#/components/schemas/SpecificToolChoiceInput'
        - $ref: '#/components/schemas/AllowedToolsToolChoiceInput'
        - type: string
          enum:
            - none
            - auto
            - required
          description: >-
            Controls which (if any) tool is called by the model.

            none means the model will not call any tool.

            auto means the model can pick between generating a message or
            calling one or more tools.

            required means the model must call one or more tools.
          title: Tool Choice Mode
      description: >-
        How the model should select which tool (or tools) to use when generating
        a response. See the tools parameter to see how to specify which tools
        the model can call.
    PromptCacheOptionsInput:
      type: object
      properties:
        mode:
          type: string
          enum:
            - implicit
            - explicit
          description: >-
            The prompt-caching mode. Explicit mode writes only at declared
            breakpoints.
        ttl:
          type: string
          enum:
            - 5m
            - 30m
            - 1h
          description: >-
            The minimum lifetime of cached prefixes written by this request.
            OpenAI supports 30m natively; 5m and 1h are accepted for
            cross-provider compatibility and snap to the nearest TTL the routed
            provider supports. Providers may retain cached prefixes longer.
      description: OpenAI prompt-cache behavior for this request.
    InputItemContentInput:
      oneOf:
        - $ref: '#/components/schemas/InputTextInput'
        - $ref: '#/components/schemas/InputImageInput'
        - $ref: '#/components/schemas/InputFileInput'
      description: 'A single piece of content in an input message: text, image, or file.'
    CacheControlInput:
      type: object
      properties:
        type:
          default: ephemeral
          description: The cache control type. Currently only ephemeral is supported.
          type: string
          enum:
            - ephemeral
        ttl:
          default: 5m
          description: >-
            The time-to-live for the cache entry. One of 5m or 1h. Defaults to
            5m.
          type: string
          enum:
            - 5m
            - 1h
      description: Cache control settings for explicit prompt caching of this content.
    OutputMessageItem:
      type: object
      properties:
        type:
          default: message
          description: The type of the item. Always message.
          type: string
          enum:
            - message
        role:
          type: string
          description: The role of the message author. Always assistant.
          enum:
            - assistant
        id:
          type: string
          description: The unique ID of the output message.
          nullable: true
        status:
          type: string
          enum:
            - completed
            - in_progress
            - incomplete
          description: >-
            The status of the item. One of in_progress, completed, or
            incomplete.
          nullable: true
        content:
          type: array
          items:
            $ref: '#/components/schemas/OutputItemContent'
          description: The content parts of the message.
        cache_control:
          $ref: '#/components/schemas/CacheControl'
        phase:
          type: string
          enum:
            - commentary
            - final_answer
          nullable: true
      required:
        - role
        - content
      additionalProperties: false
      title: Output Message
      description: A message item produced by the model.
    ReasoningItem:
      type: object
      properties:
        type:
          type: string
          description: The type of the item. Always reasoning.
          enum:
            - reasoning
        id:
          type: string
          description: The unique ID of the reasoning item.
          nullable: true
        summary:
          type: array
          items:
            $ref: '#/components/schemas/SummaryText'
          description: A summary of the reasoning performed by the model.
        content:
          type: array
          items:
            $ref: '#/components/schemas/ReasoningText'
          description: The reasoning text produced by the model.
          nullable: true
        encrypted_content:
          type: string
          description: >-
            The encrypted reasoning content, returned when reasoning is not
            stored.
          nullable: true
        status:
          type: string
          enum:
            - completed
            - in_progress
            - incomplete
          description: >-
            The status of the item. One of in_progress, completed, or
            incomplete.
          nullable: true
      required:
        - type
        - summary
      additionalProperties: false
      title: Reasoning
      description: A reasoning item produced by the model.
    FunctionToolCallItem:
      type: object
      properties:
        type:
          type: string
          description: The type of the item. Always function_call.
          enum:
            - function_call
        call_id:
          type: string
          description: >-
            The unique ID of the function tool call, used to correlate it with
            its output.
        name: {}
        arguments:
          type: string
          description: A JSON string of the arguments to pass to the function.
        id:
          type: string
          description: The unique ID of the function tool call item.
          nullable: true
        status:
          type: string
          enum:
            - completed
            - in_progress
            - incomplete
          description: >-
            The status of the item. One of in_progress, completed, or
            incomplete.
          nullable: true
        cache_control:
          $ref: '#/components/schemas/CacheControl'
      required:
        - type
        - call_id
        - name
        - arguments
      additionalProperties: false
      title: Function Tool Call
      description: A tool call to a function generated by the model.
    CustomToolCallItem:
      type: object
      properties:
        type:
          type: string
          description: The type of the item. Always custom_tool_call.
          enum:
            - custom_tool_call
        call_id:
          type: string
          description: >-
            The unique ID of the custom tool call, used to correlate it with its
            output.
        name: {}
        input:
          type: string
          description: The input passed to the custom tool.
        id:
          type: string
          description: The unique ID of the custom tool call item.
          nullable: true
      required:
        - type
        - call_id
        - name
        - input
      additionalProperties: false
      title: Custom Tool Call
      description: A call to a custom tool generated by the model.
    WebSearchToolCallItem:
      type: object
      properties:
        type:
          type: string
          description: The type of the item. Always web_search_call.
          enum:
            - web_search_call
        id:
          type: string
          description: The unique ID of the web search tool call.
        action:
          $ref: '#/components/schemas/WebSearchToolCallAction'
        status:
          anyOf:
            - type: string
              enum:
                - completed
                - in_progress
                - incomplete
              description: >-
                The status of the item. One of in_progress, completed, or
                incomplete.
            - type: string
              enum:
                - searching
          description: The status of the web search tool call.
          nullable: true
        cache_control:
          $ref: '#/components/schemas/CacheControl'
      required:
        - type
        - id
      additionalProperties: false
      title: Web Search Tool Call
      description: A web search call generated by the model.
    CompactionItem:
      type: object
      properties:
        type:
          type: string
          description: The type of the item. Always compaction.
          enum:
            - compaction
        id:
          type: string
          description: The unique ID of the compaction item.
          nullable: true
        encrypted_content:
          type: string
          maxLength: 10485760
          description: The encrypted compacted conversation context.
      required:
        - type
        - encrypted_content
      additionalProperties: false
      title: Compaction
      description: A compaction item containing compacted conversation context.
    InputItem:
      anyOf:
        - $ref: '#/components/schemas/InputMessage'
        - $ref: '#/components/schemas/Item'
      description: 'A single input item: a message or an item.'
    ToolChoice:
      anyOf:
        - $ref: '#/components/schemas/SpecificToolChoice'
        - $ref: '#/components/schemas/AllowedToolsToolChoice'
        - type: string
          enum:
            - none
            - auto
            - required
          description: >-
            Controls which (if any) tool is called by the model.

            none means the model will not call any tool.

            auto means the model can pick between generating a message or
            calling one or more tools.

            required means the model must call one or more tools.
          title: Tool Choice Mode
      description: >-
        How the model should select which tool (or tools) to use when generating
        a response. See the tools parameter to see how to specify which tools
        the model can call.
    Tool:
      oneOf:
        - $ref: '#/components/schemas/FunctionTool'
        - $ref: '#/components/schemas/WebSearchTool'
        - $ref: '#/components/schemas/CustomTool'
      description: A tool the model may call while generating a response.
    InputItemContent:
      oneOf:
        - $ref: '#/components/schemas/InputText'
        - $ref: '#/components/schemas/InputImage'
        - $ref: '#/components/schemas/InputFile'
      description: 'A single piece of content in an input message: text, image, or file.'
    PromptCacheOptions:
      type: object
      properties:
        mode:
          type: string
          enum:
            - implicit
            - explicit
          description: >-
            The prompt-caching mode. Explicit mode writes only at declared
            breakpoints.
        ttl:
          type: string
          enum:
            - 5m
            - 30m
            - 1h
          description: >-
            The minimum lifetime of cached prefixes written by this request.
            OpenAI supports 30m natively; 5m and 1h are accepted for
            cross-provider compatibility and snap to the nearest TTL the routed
            provider supports. Providers may retain cached prefixes longer.
      additionalProperties: false
      description: OpenAI prompt-cache behavior for this request.
    TextFormat:
      type: object
      properties:
        type:
          type: string
          description: The type of the format. Always text.
          enum:
            - text
      required:
        - type
      additionalProperties: false
      title: Text Format
      description: Default response format. Used to generate text responses.
    JsonSchemaFormat:
      type: object
      properties:
        type:
          type: string
          description: The type of the format. Always json_schema.
          enum:
            - json_schema
        name: {}
        schema:
          type: object
          additionalProperties: {}
          description: >-
            The schema for the response format, described as a JSON Schema
            object.
        description:
          type: string
          description: >-
            A description of what the response format is for, used by the model
            to determine how to respond in the format.
          nullable: true
        strict:
          type: boolean
          description: >-
            Whether to enable strict schema adherence when generating the
            output. If set to true, the model will always follow the exact
            schema defined in the schema field.
          nullable: true
      required:
        - type
        - name
        - schema
      additionalProperties: false
      title: JSON Schema Format
      description: >-
        JSON Schema response format. Used to generate structured JSON responses

        For models that don't support json_schema but do support json_object,
        Concentrate automatically downgrades to json_object and inserts your
        schema as a system prompt for backwards compatibility. Thus, Concentrate
        always recommends sending json_schema instead of json_object.
    JsonObjectFormat:
      type: object
      properties:
        type:
          type: string
          description: The type of the format. Always json_object.
          enum:
            - json_object
      required:
        - type
      additionalProperties: false
      title: JSON Object Format
      description: >-
        JSON object response format. An older method of generating JSON
        responses. Using json_schema is recommended for models that support it.
        Note that the model will not generate JSON without a system or user
        message instructing it to do so.
    InputMessageInput:
      type: object
      properties:
        type:
          default: message
          description: The type of the input item. Always message.
          type: string
          enum:
            - message
        role:
          type: string
          enum:
            - user
            - assistant
            - system
            - developer
          description: The role of the message author.
        content:
          anyOf:
            - type: string
              minLength: 1
            - type: array
              items:
                $ref: '#/components/schemas/InputItemContentInput'
          description: 'The content of the message: a string, or an array of content parts.'
        phase:
          type: string
          enum:
            - commentary
            - final_answer
          nullable: true
      required:
        - role
        - content
      title: Message
      description: A message input to the model.
    ItemInput:
      anyOf:
        - $ref: '#/components/schemas/InputMessageItemInput'
        - $ref: '#/components/schemas/OutputMessageItemInput'
        - $ref: '#/components/schemas/FunctionToolCallItemInput'
        - $ref: '#/components/schemas/FunctionToolCallOutputItemInput'
        - $ref: '#/components/schemas/CustomToolCallItemInput'
        - $ref: '#/components/schemas/CustomToolCallOutputItemInput'
        - $ref: '#/components/schemas/ReasoningItemInput'
        - $ref: '#/components/schemas/WebSearchToolCallItemInput'
        - $ref: '#/components/schemas/CompactionItemInput'
      description: A single item in the model's input or output.
    FunctionToolInput:
      type: object
      properties:
        type:
          type: string
          description: The type of the tool. Always function.
          enum:
            - function
        name:
          type: string
          maxLength: 256
          description: >-
            The name. Must contain only alphanumeric characters, underscores,
            dots, and hyphens, with a maximum length of 256 characters, with a
            minimum length of 1 character after unaccepted characters are
            stripped.
        description:
          type: string
          description: >-
            A description of the function. Used by the model to determine
            whether or not to call the function.
          nullable: true
        parameters:
          type: object
          additionalProperties: {}
          description: A JSON schema object describing the parameters of the function.
        strict:
          type: boolean
          description: Whether to enforce strict parameter validation.
          nullable: true
        cache_control:
          $ref: '#/components/schemas/CacheControlInput'
      required:
        - type
        - name
        - parameters
      title: Function Tool
      description: Defines a function in your own code the model can choose to call.
    WebSearchToolInput:
      type: object
      properties:
        type:
          type: string
          enum:
            - web_search
            - web_search_2025_08_26
            - web_search_preview
            - web_search_preview_2025_03_11
          description: The type of the web search tool.
        engine:
          oneOf:
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - auto
                    - native
              required:
                - type
              title: Auto / Native
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - exa
              required:
                - type
              title: Exa
          nullable: true
        filters:
          type: object
          properties:
            allowed_domains:
              minItems: 1
              maxItems: 1200
              type: array
              items:
                type: string
              description: >-
                Allowed domains for the search. If not provided, all domains are
                allowed.
              nullable: true
            blocked_domains:
              minItems: 1
              maxItems: 1200
              type: array
              items:
                type: string
              description: >-
                Blocked domains for the search. If not provided, all domains are
                allowed.
              nullable: true
          description: Filters applied to the web search.
          nullable: true
        search_context_size:
          type: string
          enum:
            - low
            - medium
            - high
          description: >-
            High level guidance for the amount of context window space to use
            for the search. One of low, medium, or high.
          nullable: true
        user_location:
          allOf:
            - $ref: '#/components/schemas/UserLocationInput'
          nullable: true
        cache_control:
          $ref: '#/components/schemas/CacheControlInput'
      required:
        - type
      title: Web Search Tool
      description: Search the web for the latest information before generating a response.
    CustomToolInput:
      type: object
      properties:
        type:
          type: string
          description: The type of the tool. Always custom.
          enum:
            - custom
        name:
          type: string
          maxLength: 256
          description: >-
            The name. Must contain only alphanumeric characters, underscores,
            dots, and hyphens, with a maximum length of 256 characters, with a
            minimum length of 1 character after unaccepted characters are
            stripped.
        description:
          type: string
          description: >-
            Optional description of the custom tool, used to provide more
            context.
          nullable: true
        format:
          allOf:
            - $ref: '#/components/schemas/CustomToolFormatInput'
          nullable: true
        cache_control:
          $ref: '#/components/schemas/CacheControlInput'
      required:
        - type
        - name
      title: Custom Tool
      description: A custom tool that processes input using a specified format.
    SpecificToolChoiceInput:
      oneOf:
        - $ref: '#/components/schemas/FunctionToolChoiceInput'
        - $ref: '#/components/schemas/CustomToolChoiceInput'
        - $ref: '#/components/schemas/TypesToolChoiceInput'
      title: Specific Tool
      description: Forces the model to call a specific tool.
    AllowedToolsToolChoiceInput:
      type: object
      properties:
        type:
          type: string
          description: The tool choice type. Always allowed_tools.
          enum:
            - allowed_tools
        mode:
          type: string
          enum:
            - auto
            - required
          description: >-
            Whether the model may use the allowed tools (auto) or must call one
            of them (required).
        tools:
          minItems: 1
          type: array
          items:
            $ref: '#/components/schemas/SpecificToolChoiceInput'
          description: The tools the model may call.
      required:
        - type
        - mode
        - tools
      title: Allowed Tools
      description: Constrains the tools available to the model to a pre-defined set.
    InputTextInput:
      type: object
      properties:
        type:
          type: string
          description: The type of the input item. Always input_text.
          enum:
            - input_text
        text:
          type: string
          minLength: 1
          description: The text input to the model.
        cache_control:
          $ref: '#/components/schemas/CacheControlInput'
        prompt_cache_breakpoint:
          $ref: '#/components/schemas/PromptCacheBreakpointInput'
      required:
        - type
        - text
      title: Input Text
      description: A text input to the model.
    InputImageInput:
      type: object
      properties:
        type:
          type: string
          description: The type of the input item. Always input_image.
          enum:
            - input_image
        image_url:
          type: string
          pattern: >-
            ^(https?:\/\/.+|data:image\/(png|jpe?g|webp|gif);base64,[A-Za-z0-9+/]+={0,2})$
          description: >-
            The URL of the image. Either an http(s) URL or a base64-encoded data
            URL (data:image/<type>;base64,...).
        detail:
          default: auto
          description: >-
            The detail level of the image to send to the model. One of low,
            high, auto, or original. Models that don't support 'original'
            convert it to 'high'.
          type: string
          enum:
            - low
            - high
            - auto
            - original
          nullable: true
        cache_control:
          $ref: '#/components/schemas/CacheControlInput'
        prompt_cache_breakpoint:
          $ref: '#/components/schemas/PromptCacheBreakpointInput'
      required:
        - type
        - image_url
      title: Input Image
      description: An image input to the model.
    InputFileInput:
      type: object
      properties:
        type:
          type: string
          description: The type of the input item. Always input_file.
          enum:
            - input_file
        file_data:
          type: string
          pattern: ^(data:application\/pdf;base64,)
          description: >-
            The content of the file as a base64-encoded PDF data URL
            (data:application/pdf;base64,...).
        file_url:
          type: string
          pattern: ^https?:\/\/
          description: The URL of the file to send to the model.
        filename:
          type: string
          description: The name of the file, only provided with file_url.
        cache_control:
          $ref: '#/components/schemas/CacheControlInput'
        prompt_cache_breakpoint:
          $ref: '#/components/schemas/PromptCacheBreakpointInput'
      required:
        - type
      title: Input File
      description: A file input (PDF) to the model.
    OutputItemContent:
      oneOf:
        - $ref: '#/components/schemas/OutputText'
      description: A single piece of content in an output message.
    CacheControl:
      type: object
      properties:
        type:
          default: ephemeral
          description: The cache control type. Currently only ephemeral is supported.
          type: string
          enum:
            - ephemeral
        ttl:
          default: 5m
          description: >-
            The time-to-live for the cache entry. One of 5m or 1h. Defaults to
            5m.
          type: string
          enum:
            - 5m
            - 1h
      required:
        - type
      additionalProperties: false
      description: Cache control settings for explicit prompt caching of this content.
    SummaryText:
      type: object
      properties:
        type:
          type: string
          description: The type of the content. Always summary_text.
          enum:
            - summary_text
        text:
          type: string
          description: The summarized reasoning text.
      required:
        - type
        - text
      additionalProperties: false
      description: A chunk of summarized reasoning text produced by the model.
    ReasoningText:
      type: object
      properties:
        type:
          type: string
          description: The type of the content. Always reasoning_text.
          enum:
            - reasoning_text
        text:
          type: string
          description: The reasoning text produced by the model.
      required:
        - type
        - text
      additionalProperties: false
      description: A chunk of reasoning text produced by the model.
    WebSearchToolCallAction:
      oneOf:
        - $ref: '#/components/schemas/WebSearchToolCallSearchAction'
        - $ref: '#/components/schemas/WebSearchToolCallOpenPageAction'
        - $ref: '#/components/schemas/WebSearchToolCallFindAction'
      description: An action performed by the web search tool.
    InputMessage:
      type: object
      properties:
        type:
          default: message
          description: The type of the input item. Always message.
          type: string
          enum:
            - message
        role:
          type: string
          enum:
            - user
            - assistant
            - system
            - developer
          description: The role of the message author.
        content:
          anyOf:
            - type: string
              minLength: 1
            - type: array
              items:
                $ref: '#/components/schemas/InputItemContent'
          description: 'The content of the message: a string, or an array of content parts.'
        phase:
          type: string
          enum:
            - commentary
            - final_answer
          nullable: true
      required:
        - role
        - content
      additionalProperties: false
      title: Message
      description: A message input to the model.
    Item:
      anyOf:
        - $ref: '#/components/schemas/InputMessageItem'
        - $ref: '#/components/schemas/OutputMessageItem'
        - $ref: '#/components/schemas/FunctionToolCallItem'
        - $ref: '#/components/schemas/FunctionToolCallOutputItem'
        - $ref: '#/components/schemas/CustomToolCallItem'
        - $ref: '#/components/schemas/CustomToolCallOutputItem'
        - $ref: '#/components/schemas/ReasoningItem'
        - $ref: '#/components/schemas/WebSearchToolCallItem'
        - $ref: '#/components/schemas/CompactionItem'
      description: A single item in the model's input or output.
    SpecificToolChoice:
      oneOf:
        - $ref: '#/components/schemas/FunctionToolChoice'
        - $ref: '#/components/schemas/CustomToolChoice'
        - $ref: '#/components/schemas/TypesToolChoice'
      title: Specific Tool
      description: Forces the model to call a specific tool.
    AllowedToolsToolChoice:
      type: object
      properties:
        type:
          type: string
          description: The tool choice type. Always allowed_tools.
          enum:
            - allowed_tools
        mode:
          type: string
          enum:
            - auto
            - required
          description: >-
            Whether the model may use the allowed tools (auto) or must call one
            of them (required).
        tools:
          minItems: 1
          type: array
          items:
            $ref: '#/components/schemas/SpecificToolChoice'
          description: The tools the model may call.
      required:
        - type
        - mode
        - tools
      additionalProperties: false
      title: Allowed Tools
      description: Constrains the tools available to the model to a pre-defined set.
    FunctionTool:
      type: object
      properties:
        type:
          type: string
          description: The type of the tool. Always function.
          enum:
            - function
        name: {}
        description:
          type: string
          description: >-
            A description of the function. Used by the model to determine
            whether or not to call the function.
          nullable: true
        parameters:
          type: object
          additionalProperties: {}
          description: A JSON schema object describing the parameters of the function.
        strict:
          type: boolean
          description: Whether to enforce strict parameter validation.
          nullable: true
        cache_control:
          $ref: '#/components/schemas/CacheControl'
      required:
        - type
        - name
        - parameters
      additionalProperties: false
      title: Function Tool
      description: Defines a function in your own code the model can choose to call.
    WebSearchTool:
      type: object
      properties:
        type:
          type: string
          enum:
            - web_search
            - web_search_2025_08_26
            - web_search_preview
            - web_search_preview_2025_03_11
          description: The type of the web search tool.
        engine:
          oneOf:
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - auto
                    - native
              required:
                - type
              additionalProperties: false
              title: Auto / Native
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - exa
              required:
                - type
              additionalProperties: false
              title: Exa
          nullable: true
        filters:
          type: object
          properties:
            allowed_domains:
              minItems: 1
              maxItems: 1200
              type: array
              items:
                type: string
              description: >-
                Allowed domains for the search. If not provided, all domains are
                allowed.
              nullable: true
            blocked_domains:
              minItems: 1
              maxItems: 1200
              type: array
              items:
                type: string
              description: >-
                Blocked domains for the search. If not provided, all domains are
                allowed.
              nullable: true
          additionalProperties: false
          description: Filters applied to the web search.
          nullable: true
        search_context_size:
          type: string
          enum:
            - low
            - medium
            - high
          description: >-
            High level guidance for the amount of context window space to use
            for the search. One of low, medium, or high.
          nullable: true
        user_location:
          allOf:
            - $ref: '#/components/schemas/UserLocation'
          nullable: true
        cache_control:
          $ref: '#/components/schemas/CacheControl'
      required:
        - type
      additionalProperties: false
      title: Web Search Tool
      description: Search the web for the latest information before generating a response.
    CustomTool:
      type: object
      properties:
        type:
          type: string
          description: The type of the tool. Always custom.
          enum:
            - custom
        name: {}
        description:
          type: string
          description: >-
            Optional description of the custom tool, used to provide more
            context.
          nullable: true
        format:
          allOf:
            - $ref: '#/components/schemas/CustomToolFormat'
          nullable: true
        cache_control:
          $ref: '#/components/schemas/CacheControl'
      required:
        - type
        - name
      additionalProperties: false
      title: Custom Tool
      description: A custom tool that processes input using a specified format.
    InputText:
      type: object
      properties:
        type:
          type: string
          description: The type of the input item. Always input_text.
          enum:
            - input_text
        text:
          type: string
          minLength: 1
          description: The text input to the model.
        cache_control:
          $ref: '#/components/schemas/CacheControl'
        prompt_cache_breakpoint:
          $ref: '#/components/schemas/PromptCacheBreakpoint'
      required:
        - type
        - text
      additionalProperties: false
      title: Input Text
      description: A text input to the model.
    InputImage:
      type: object
      properties:
        type:
          type: string
          description: The type of the input item. Always input_image.
          enum:
            - input_image
        image_url:
          type: string
          pattern: >-
            ^(https?:\/\/.+|data:image\/(png|jpe?g|webp|gif);base64,[A-Za-z0-9+/]+={0,2})$
          description: >-
            The URL of the image. Either an http(s) URL or a base64-encoded data
            URL (data:image/<type>;base64,...).
        detail:
          default: auto
          description: >-
            The detail level of the image to send to the model. One of low,
            high, auto, or original. Models that don't support 'original'
            convert it to 'high'.
          type: string
          enum:
            - low
            - high
            - auto
            - original
          nullable: true
        cache_control:
          $ref: '#/components/schemas/CacheControl'
        prompt_cache_breakpoint:
          $ref: '#/components/schemas/PromptCacheBreakpoint'
      required:
        - type
        - image_url
      additionalProperties: false
      title: Input Image
      description: An image input to the model.
    InputFile:
      type: object
      properties:
        type:
          type: string
          description: The type of the input item. Always input_file.
          enum:
            - input_file
        file_data:
          type: string
          pattern: ^(data:application\/pdf;base64,)
          description: >-
            The content of the file as a base64-encoded PDF data URL
            (data:application/pdf;base64,...).
        file_url:
          type: string
          pattern: ^https?:\/\/
          description: The URL of the file to send to the model.
        filename:
          type: string
          description: The name of the file, only provided with file_url.
        cache_control:
          $ref: '#/components/schemas/CacheControl'
        prompt_cache_breakpoint:
          $ref: '#/components/schemas/PromptCacheBreakpoint'
      required:
        - type
      additionalProperties: false
      title: Input File
      description: A file input (PDF) to the model.
    InputMessageItemInput:
      type: object
      properties:
        type:
          default: message
          description: The type of the item. Always message.
          type: string
          enum:
            - message
        role:
          type: string
          enum:
            - user
            - system
            - developer
          description: The role of the message author.
        status:
          type: string
          enum:
            - completed
            - in_progress
            - incomplete
          description: >-
            The status of the item. One of in_progress, completed, or
            incomplete.
          nullable: true
        content:
          type: array
          items:
            $ref: '#/components/schemas/InputItemContentInput'
          description: The content parts of the message.
      required:
        - role
        - content
      title: Input Message
      description: A message item in the model's input.
    OutputMessageItemInput:
      type: object
      properties:
        type:
          default: message
          description: The type of the item. Always message.
          type: string
          enum:
            - message
        role:
          type: string
          description: The role of the message author. Always assistant.
          enum:
            - assistant
        id:
          type: string
          description: The unique ID of the output message.
          nullable: true
        status:
          type: string
          enum:
            - completed
            - in_progress
            - incomplete
          description: >-
            The status of the item. One of in_progress, completed, or
            incomplete.
          nullable: true
        content:
          type: array
          items:
            $ref: '#/components/schemas/OutputItemContentInput'
          description: The content parts of the message.
        cache_control:
          $ref: '#/components/schemas/CacheControlInput'
        phase:
          type: string
          enum:
            - commentary
            - final_answer
          nullable: true
      required:
        - role
        - content
      title: Output Message
      description: A message item produced by the model.
    FunctionToolCallItemInput:
      type: object
      properties:
        type:
          type: string
          description: The type of the item. Always function_call.
          enum:
            - function_call
        call_id:
          type: string
          description: >-
            The unique ID of the function tool call, used to correlate it with
            its output.
        name:
          type: string
          maxLength: 256
          description: >-
            The name. Must contain only alphanumeric characters, underscores,
            dots, and hyphens, with a maximum length of 256 characters, with a
            minimum length of 1 character after unaccepted characters are
            stripped.
        arguments:
          type: string
          description: A JSON string of the arguments to pass to the function.
        id:
          type: string
          description: The unique ID of the function tool call item.
          nullable: true
        status:
          type: string
          enum:
            - completed
            - in_progress
            - incomplete
          description: >-
            The status of the item. One of in_progress, completed, or
            incomplete.
          nullable: true
        cache_control:
          $ref: '#/components/schemas/CacheControlInput'
      required:
        - type
        - call_id
        - name
        - arguments
      title: Function Tool Call
      description: A tool call to a function generated by the model.
    FunctionToolCallOutputItemInput:
      type: object
      properties:
        type:
          type: string
          description: The type of the item. Always function_call_output.
          enum:
            - function_call_output
        call_id:
          type: string
          minLength: 1
          description: The unique ID of the function tool call this output is for.
        output:
          anyOf:
            - type: string
            - type: array
              items:
                $ref: '#/components/schemas/InputItemContentInput'
          description: The output of the function tool call.
        id:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
          description: The unique ID of the function tool call output item.
          nullable: true
        status:
          type: string
          enum:
            - completed
            - in_progress
            - incomplete
          description: >-
            The status of the item. One of in_progress, completed, or
            incomplete.
          nullable: true
        cache_control:
          $ref: '#/components/schemas/CacheControlInput'
      required:
        - type
        - call_id
        - output
      title: Function Tool Call Output
      description: The output of a function tool call, provided back to the model.
    CustomToolCallItemInput:
      type: object
      properties:
        type:
          type: string
          description: The type of the item. Always custom_tool_call.
          enum:
            - custom_tool_call
        call_id:
          type: string
          description: >-
            The unique ID of the custom tool call, used to correlate it with its
            output.
        name:
          type: string
          maxLength: 256
          description: >-
            The name. Must contain only alphanumeric characters, underscores,
            dots, and hyphens, with a maximum length of 256 characters, with a
            minimum length of 1 character after unaccepted characters are
            stripped.
        input:
          type: string
          description: The input passed to the custom tool.
        id:
          type: string
          description: The unique ID of the custom tool call item.
          nullable: true
      required:
        - type
        - call_id
        - name
        - input
      title: Custom Tool Call
      description: A call to a custom tool generated by the model.
    CustomToolCallOutputItemInput:
      type: object
      properties:
        type:
          type: string
          description: The type of the item. Always custom_tool_call_output.
          enum:
            - custom_tool_call_output
        call_id:
          type: string
          description: The unique ID of the custom tool call this output is for.
        output:
          type: string
          description: The output of the custom tool call.
        id:
          type: string
          description: The unique ID of the custom tool call output item.
          nullable: true
        status:
          type: string
          enum:
            - completed
            - in_progress
            - incomplete
          description: >-
            The status of the item. One of in_progress, completed, or
            incomplete.
          nullable: true
      required:
        - type
        - call_id
        - output
      title: Custom Tool Call Output
      description: The output of a custom tool call, provided back to the model.
    ReasoningItemInput:
      type: object
      properties:
        type:
          type: string
          description: The type of the item. Always reasoning.
          enum:
            - reasoning
        id:
          type: string
          description: The unique ID of the reasoning item.
          nullable: true
        summary:
          type: array
          items:
            $ref: '#/components/schemas/SummaryTextInput'
          description: A summary of the reasoning performed by the model.
        content:
          type: array
          items:
            $ref: '#/components/schemas/ReasoningTextInput'
          description: The reasoning text produced by the model.
          nullable: true
        encrypted_content:
          type: string
          description: >-
            The encrypted reasoning content, returned when reasoning is not
            stored.
          nullable: true
        status:
          type: string
          enum:
            - completed
            - in_progress
            - incomplete
          description: >-
            The status of the item. One of in_progress, completed, or
            incomplete.
          nullable: true
      required:
        - type
        - summary
      title: Reasoning
      description: A reasoning item produced by the model.
    WebSearchToolCallItemInput:
      type: object
      properties:
        type:
          type: string
          description: The type of the item. Always web_search_call.
          enum:
            - web_search_call
        id:
          type: string
          description: The unique ID of the web search tool call.
        action:
          $ref: '#/components/schemas/WebSearchToolCallActionInput'
        status:
          anyOf:
            - type: string
              enum:
                - completed
                - in_progress
                - incomplete
              description: >-
                The status of the item. One of in_progress, completed, or
                incomplete.
            - type: string
              enum:
                - searching
          description: The status of the web search tool call.
          nullable: true
        cache_control:
          $ref: '#/components/schemas/CacheControlInput'
      required:
        - type
        - id
      title: Web Search Tool Call
      description: A web search call generated by the model.
    CompactionItemInput:
      type: object
      properties:
        type:
          type: string
          description: The type of the item. Always compaction.
          enum:
            - compaction
        id:
          type: string
          description: The unique ID of the compaction item.
          nullable: true
        encrypted_content:
          type: string
          maxLength: 10485760
          description: The encrypted compacted conversation context.
      required:
        - type
        - encrypted_content
      title: Compaction
      description: A compaction item containing compacted conversation context.
    UserLocationInput:
      type: object
      properties:
        type:
          type: string
          description: The type of location approximation. Always approximate.
          enum:
            - approximate
        timezone:
          type: string
          nullable: true
          description: >-
            IANA timezone identifier (e.g. America/New_York, Europe/London,
            Asia/Tokyo).
        country:
          type: string
          nullable: true
          description: ISO 3166-1 alpha-2 country code (e.g. US, GB, DE, JP).
        city:
          type: string
          description: Free text input for the city of the user, e.g. San Francisco.
          nullable: true
        region:
          type: string
          description: Free text input for the region of the user, e.g. California.
          nullable: true
      required:
        - type
      description: The approximate location of the user, used to refine web search results.
    CustomToolFormatInput:
      oneOf:
        - $ref: '#/components/schemas/TextFormatInput'
        - $ref: '#/components/schemas/GrammarFormatInput'
      description: >-
        The input format for a custom tool. Either unconstrained text or a
        grammar.
    FunctionToolChoiceInput:
      type: object
      properties:
        name:
          type: string
          maxLength: 256
          description: >-
            The name. Must contain only alphanumeric characters, underscores,
            dots, and hyphens, with a maximum length of 256 characters, with a
            minimum length of 1 character after unaccepted characters are
            stripped.
        type:
          type: string
          description: For function calling, the type is always function.
          enum:
            - function
      required:
        - name
        - type
      title: Function
      description: Forces the model to call a specific function.
    CustomToolChoiceInput:
      type: object
      properties:
        name:
          type: string
          maxLength: 256
          description: >-
            The name. Must contain only alphanumeric characters, underscores,
            dots, and hyphens, with a maximum length of 256 characters, with a
            minimum length of 1 character after unaccepted characters are
            stripped.
        type:
          type: string
          description: For custom tool calling, the type is always custom.
          enum:
            - custom
      required:
        - name
        - type
      title: Custom
      description: Forces the model to call a specific custom tool.
    TypesToolChoiceInput:
      type: object
      properties:
        type:
          type: string
          enum:
            - web_search
            - web_search_preview
          description: The type of hosted tool the model should use.
      required:
        - type
      title: Hosted Tool
      description: Forces the model to use a built-in (hosted) tool.
    PromptCacheBreakpointInput:
      type: object
      properties:
        mode:
          type: string
          description: Creates an explicit prompt-cache breakpoint after this block.
          enum:
            - explicit
      required:
        - mode
      description: OpenAI explicit prompt-cache breakpoint settings.
    OutputText:
      type: object
      properties:
        type:
          type: string
          description: The type of the output content. Always output_text.
          enum:
            - output_text
        text:
          type: string
          description: The text output from the model.
        annotations:
          type: array
          items:
            $ref: '#/components/schemas/Annotation'
          description: Annotations on the output text, such as URL citations.
          nullable: true
        logprobs:
          type: array
          items:
            type: object
            properties:
              token:
                type: string
              bytes:
                type: array
                items:
                  type: number
              logprob:
                type: number
              top_logprobs:
                type: array
                items:
                  type: object
                  properties:
                    token:
                      type: string
                    bytes:
                      type: array
                      items:
                        type: number
                    logprob:
                      type: number
                  required:
                    - token
                    - bytes
                    - logprob
                  additionalProperties: false
            required:
              - token
              - bytes
              - logprob
              - top_logprobs
            additionalProperties: false
          description: Log probability information for the output tokens.
          nullable: true
        cache_control:
          $ref: '#/components/schemas/CacheControl'
        prompt_cache_breakpoint:
          $ref: '#/components/schemas/PromptCacheBreakpoint'
      required:
        - type
        - text
      additionalProperties: false
      title: Output Text
      description: A text output from the model.
    WebSearchToolCallSearchAction:
      type: object
      properties:
        type:
          type: string
          description: The type of the action. Always search.
          enum:
            - search
        query:
          type: string
          description: The search query.
        queries:
          type: array
          items:
            type: string
          description: The list of search queries run.
          nullable: true
        sources:
          type: array
          items:
            $ref: '#/components/schemas/Source'
          description: The sources consulted during the search.
          nullable: true
      required:
        - type
      additionalProperties: false
      title: Search Action
      description: A search action performed by the web search tool.
    WebSearchToolCallOpenPageAction:
      type: object
      properties:
        type:
          type: string
          description: The type of the action. Always open_page.
          enum:
            - open_page
        url:
          type: string
          description: The URL of the page opened.
          nullable: true
      required:
        - type
      additionalProperties: false
      title: Open Page
      description: An action where the web search tool opens a page.
    WebSearchToolCallFindAction:
      type: object
      properties:
        type:
          type: string
          description: The type of the action. Always find_in_page.
          enum:
            - find_in_page
        pattern:
          type: string
          description: The pattern searched for within the page.
        url:
          type: string
          description: The URL of the page searched.
      required:
        - type
        - pattern
        - url
      additionalProperties: false
      title: Find In Page
      description: An action where the web search tool searches within a page.
    InputMessageItem:
      type: object
      properties:
        type:
          default: message
          description: The type of the item. Always message.
          type: string
          enum:
            - message
        role:
          type: string
          enum:
            - user
            - system
            - developer
          description: The role of the message author.
        status:
          type: string
          enum:
            - completed
            - in_progress
            - incomplete
          description: >-
            The status of the item. One of in_progress, completed, or
            incomplete.
          nullable: true
        content:
          type: array
          items:
            $ref: '#/components/schemas/InputItemContent'
          description: The content parts of the message.
      required:
        - role
        - content
      additionalProperties: false
      title: Input Message
      description: A message item in the model's input.
    FunctionToolCallOutputItem:
      type: object
      properties:
        type:
          type: string
          description: The type of the item. Always function_call_output.
          enum:
            - function_call_output
        call_id:
          type: string
          minLength: 1
          description: The unique ID of the function tool call this output is for.
        output:
          anyOf:
            - type: string
            - type: array
              items:
                $ref: '#/components/schemas/InputItemContent'
          description: The output of the function tool call.
        id:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
          description: The unique ID of the function tool call output item.
          nullable: true
        status:
          type: string
          enum:
            - completed
            - in_progress
            - incomplete
          description: >-
            The status of the item. One of in_progress, completed, or
            incomplete.
          nullable: true
        cache_control:
          $ref: '#/components/schemas/CacheControl'
      required:
        - type
        - call_id
        - output
      additionalProperties: false
      title: Function Tool Call Output
      description: The output of a function tool call, provided back to the model.
    CustomToolCallOutputItem:
      type: object
      properties:
        type:
          type: string
          description: The type of the item. Always custom_tool_call_output.
          enum:
            - custom_tool_call_output
        call_id:
          type: string
          description: The unique ID of the custom tool call this output is for.
        output:
          type: string
          description: The output of the custom tool call.
        id:
          type: string
          description: The unique ID of the custom tool call output item.
          nullable: true
        status:
          type: string
          enum:
            - completed
            - in_progress
            - incomplete
          description: >-
            The status of the item. One of in_progress, completed, or
            incomplete.
          nullable: true
      required:
        - type
        - call_id
        - output
      additionalProperties: false
      title: Custom Tool Call Output
      description: The output of a custom tool call, provided back to the model.
    FunctionToolChoice:
      type: object
      properties:
        name: {}
        type:
          type: string
          description: For function calling, the type is always function.
          enum:
            - function
      required:
        - name
        - type
      additionalProperties: false
      title: Function
      description: Forces the model to call a specific function.
    CustomToolChoice:
      type: object
      properties:
        name: {}
        type:
          type: string
          description: For custom tool calling, the type is always custom.
          enum:
            - custom
      required:
        - name
        - type
      additionalProperties: false
      title: Custom
      description: Forces the model to call a specific custom tool.
    TypesToolChoice:
      type: object
      properties:
        type:
          type: string
          enum:
            - web_search
            - web_search_preview
          description: The type of hosted tool the model should use.
      required:
        - type
      additionalProperties: false
      title: Hosted Tool
      description: Forces the model to use a built-in (hosted) tool.
    UserLocation:
      type: object
      properties:
        type:
          type: string
          description: The type of location approximation. Always approximate.
          enum:
            - approximate
        timezone:
          type: string
          nullable: true
          description: >-
            IANA timezone identifier (e.g. America/New_York, Europe/London,
            Asia/Tokyo).
        country:
          type: string
          nullable: true
          description: ISO 3166-1 alpha-2 country code (e.g. US, GB, DE, JP).
        city:
          type: string
          description: Free text input for the city of the user, e.g. San Francisco.
          nullable: true
        region:
          type: string
          description: Free text input for the region of the user, e.g. California.
          nullable: true
      required:
        - type
      additionalProperties: false
      description: The approximate location of the user, used to refine web search results.
    CustomToolFormat:
      oneOf:
        - $ref: '#/components/schemas/TextFormat'
        - $ref: '#/components/schemas/GrammarFormat'
      description: >-
        The input format for a custom tool. Either unconstrained text or a
        grammar.
    PromptCacheBreakpoint:
      type: object
      properties:
        mode:
          type: string
          description: Creates an explicit prompt-cache breakpoint after this block.
          enum:
            - explicit
      required:
        - mode
      additionalProperties: false
      description: OpenAI explicit prompt-cache breakpoint settings.
    OutputItemContentInput:
      oneOf:
        - $ref: '#/components/schemas/OutputTextInput'
      description: A single piece of content in an output message.
    SummaryTextInput:
      type: object
      properties:
        type:
          type: string
          description: The type of the content. Always summary_text.
          enum:
            - summary_text
        text:
          type: string
          description: The summarized reasoning text.
      required:
        - type
        - text
      description: A chunk of summarized reasoning text produced by the model.
    ReasoningTextInput:
      type: object
      properties:
        type:
          type: string
          description: The type of the content. Always reasoning_text.
          enum:
            - reasoning_text
        text:
          type: string
          description: The reasoning text produced by the model.
      required:
        - type
        - text
      description: A chunk of reasoning text produced by the model.
    WebSearchToolCallActionInput:
      oneOf:
        - $ref: '#/components/schemas/WebSearchToolCallSearchActionInput'
        - $ref: '#/components/schemas/WebSearchToolCallOpenPageActionInput'
        - $ref: '#/components/schemas/WebSearchToolCallFindActionInput'
      description: An action performed by the web search tool.
    GrammarFormatInput:
      type: object
      properties:
        type:
          type: string
          description: The type of the format. Always grammar.
          enum:
            - grammar
        syntax:
          type: string
          enum:
            - lark
            - regex
          description: The syntax of the grammar definition. One of lark or regex.
        definition:
          type: string
          description: The grammar definition.
      required:
        - type
        - syntax
        - definition
      title: Grammar Format
      description: A grammar format for a custom tool, defined using Lark or regex syntax.
    Annotation:
      oneOf:
        - $ref: '#/components/schemas/UrlCitation'
      description: An annotation on the output text.
    Source:
      oneOf:
        - $ref: '#/components/schemas/UrlSource'
        - $ref: '#/components/schemas/ApiSource'
      description: A source consulted by the web search tool.
    GrammarFormat:
      type: object
      properties:
        type:
          type: string
          description: The type of the format. Always grammar.
          enum:
            - grammar
        syntax:
          type: string
          enum:
            - lark
            - regex
          description: The syntax of the grammar definition. One of lark or regex.
        definition:
          type: string
          description: The grammar definition.
      required:
        - type
        - syntax
        - definition
      additionalProperties: false
      title: Grammar Format
      description: A grammar format for a custom tool, defined using Lark or regex syntax.
    OutputTextInput:
      type: object
      properties:
        type:
          type: string
          description: The type of the output content. Always output_text.
          enum:
            - output_text
        text:
          type: string
          description: The text output from the model.
        annotations:
          type: array
          items:
            $ref: '#/components/schemas/AnnotationInput'
          description: Annotations on the output text, such as URL citations.
          nullable: true
        logprobs:
          type: array
          items:
            type: object
            properties:
              token:
                type: string
              bytes:
                type: array
                items:
                  type: number
              logprob:
                type: number
              top_logprobs:
                type: array
                items:
                  type: object
                  properties:
                    token:
                      type: string
                    bytes:
                      type: array
                      items:
                        type: number
                    logprob:
                      type: number
                  required:
                    - token
                    - bytes
                    - logprob
            required:
              - token
              - bytes
              - logprob
              - top_logprobs
          description: Log probability information for the output tokens.
          nullable: true
        cache_control:
          $ref: '#/components/schemas/CacheControlInput'
        prompt_cache_breakpoint:
          $ref: '#/components/schemas/PromptCacheBreakpointInput'
      required:
        - type
        - text
      title: Output Text
      description: A text output from the model.
    WebSearchToolCallSearchActionInput:
      type: object
      properties:
        type:
          type: string
          description: The type of the action. Always search.
          enum:
            - search
        query:
          type: string
          description: The search query.
        queries:
          type: array
          items:
            type: string
          description: The list of search queries run.
          nullable: true
        sources:
          type: array
          items:
            $ref: '#/components/schemas/SourceInput'
          description: The sources consulted during the search.
          nullable: true
      required:
        - type
      title: Search Action
      description: A search action performed by the web search tool.
    WebSearchToolCallOpenPageActionInput:
      type: object
      properties:
        type:
          type: string
          description: The type of the action. Always open_page.
          enum:
            - open_page
        url:
          type: string
          description: The URL of the page opened.
          nullable: true
      required:
        - type
      title: Open Page
      description: An action where the web search tool opens a page.
    WebSearchToolCallFindActionInput:
      type: object
      properties:
        type:
          type: string
          description: The type of the action. Always find_in_page.
          enum:
            - find_in_page
        pattern:
          type: string
          description: The pattern searched for within the page.
        url:
          type: string
          description: The URL of the page searched.
      required:
        - type
        - pattern
        - url
      title: Find In Page
      description: An action where the web search tool searches within a page.
    UrlCitation:
      type: object
      properties:
        type:
          type: string
          description: The type of the annotation. Always url_citation.
          enum:
            - url_citation
        start_index:
          type: integer
          minimum: 0
          maximum: 9007199254740991
          description: The index of the first character of the citation in the output text.
        end_index:
          type: integer
          minimum: 0
          maximum: 9007199254740991
          description: The index of the last character of the citation in the output text.
        title:
          type: string
          description: The title of the cited web page.
        url:
          type: string
          description: The URL of the cited web page.
      required:
        - type
        - start_index
        - end_index
        - title
        - url
      additionalProperties: false
      title: URL Citation
      description: A citation to a URL in the output text.
    UrlSource:
      type: object
      properties:
        type:
          type: string
          description: The type of the source. Always url.
          enum:
            - url
        url:
          type: string
          description: The URL of the source.
      required:
        - type
        - url
      additionalProperties: false
      title: URL Source
      description: A web URL source consulted by the web search tool.
    ApiSource:
      type: object
      properties:
        type:
          type: string
          description: The type of the source. Always api.
          enum:
            - api
        name:
          type: string
          description: The name of the API source.
      required:
        - type
        - name
      additionalProperties: false
      title: API Source
      description: An API source consulted by the web search tool.
    AnnotationInput:
      oneOf:
        - $ref: '#/components/schemas/UrlCitationInput'
      description: An annotation on the output text.
    SourceInput:
      oneOf:
        - $ref: '#/components/schemas/UrlSourceInput'
        - $ref: '#/components/schemas/ApiSourceInput'
      description: A source consulted by the web search tool.
    UrlCitationInput:
      type: object
      properties:
        type:
          type: string
          description: The type of the annotation. Always url_citation.
          enum:
            - url_citation
        start_index:
          type: integer
          minimum: 0
          maximum: 9007199254740991
          description: The index of the first character of the citation in the output text.
        end_index:
          type: integer
          minimum: 0
          maximum: 9007199254740991
          description: The index of the last character of the citation in the output text.
        title:
          type: string
          description: The title of the cited web page.
        url:
          type: string
          description: The URL of the cited web page.
      required:
        - type
        - start_index
        - end_index
        - title
        - url
      title: URL Citation
      description: A citation to a URL in the output text.
    UrlSourceInput:
      type: object
      properties:
        type:
          type: string
          description: The type of the source. Always url.
          enum:
            - url
        url:
          type: string
          description: The URL of the source.
      required:
        - type
        - url
      title: URL Source
      description: A web URL source consulted by the web search tool.
    ApiSourceInput:
      type: object
      properties:
        type:
          type: string
          description: The type of the source. Always api.
          enum:
            - api
        name:
          type: string
          description: The name of the API source.
      required:
        - type
        - name
      title: API Source
      description: An API source consulted by the web search tool.

````