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

# Invoke an agent

> Creates a model response for the given input. Returns a response object or a stream of server-sent events.

<Note>
  **Related guide**: Build agents guide. See the [Build agents guide](/ai-studio/ai-engineering/build-agents) for a walkthrough with examples.
</Note>

Invoke an **Agent** with the [Responses API](/reference/responses/create-response) by setting `model` to `agent/<key>`. The agent's configured model, tools, knowledge bases, and memory apply automatically, so the request only needs to provide the input.

This endpoint implements the [OpenResponses](https://www.openresponses.org/) specification, a multi-provider, interoperable LLM interface. **Orq.ai** extends the spec with platform features like variables, memory, identity, and **Orq.ai** tools.

For a comprehensive guide with examples, see the [Run Agents documentation](/ai-studio/ai-engineering/run-agents) and the [Responses API documentation](/ai-gateway/features/responses-api).

<RequestExample>
  ```bash Simple text theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl -X POST https://my.orq.ai/v3/router/responses \
    -H "Authorization: Bearer $ORQ_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "agent/my-agent",
      "input": "Help me plan a microservices architecture for our e-commerce platform."
    }'
  ```

  ```bash Image input theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl -X POST https://my.orq.ai/v3/router/responses \
    -H "Authorization: Bearer $ORQ_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "agent/image-classifier",
      "input": [
        {
          "type": "message",
          "role": "user",
          "content": [
            { "type": "input_text", "text": "What can you see in this image?" },
            {
              "type": "input_image",
              "image_url": "https://example.com/image.jpg",
              "detail": "auto"
            }
          ]
        }
      ]
    }'
  ```

  ```bash Variables theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl -X POST https://my.orq.ai/v3/router/responses \
    -H "Authorization: Bearer $ORQ_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "agent/my-agent",
      "input": "I need help with my account.",
      "variables": {
        "user_name": "John Smith",
        "user_role": "admin",
        "api_token": { "secret": true, "value": "sk-secret-123" }
      }
    }'
  ```

  ```bash Memory theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl -X POST https://my.orq.ai/v3/router/responses \
    -H "Authorization: Bearer $ORQ_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "agent/agent-memories",
      "input": "Do you remember what my name is?",
      "memory": {
        "entity_id": "customer_456"
      }
    }'
  ```

  ```bash Streaming theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl -X POST https://my.orq.ai/v3/router/responses \
    -H "Authorization: Bearer $ORQ_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "agent/my-agent",
      "input": "Help me plan a microservices architecture for our e-commerce platform.",
      "stream": true
    }'
  ```

  ```bash Multi-turn theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl -X POST https://my.orq.ai/v3/router/responses \
    -H "Authorization: Bearer $ORQ_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "agent/my-agent",
      "previous_response_id": "resp_01KP6DFC5FB7K7K10TVP60PF81",
      "input": "Can you expand on the challenges section?"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json Simple text theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "id": "resp_01KP6DFC5FB7K7K10TVP60PF81",
    "object": "response",
    "created_at": 1776184439,
    "completed_at": 1776184439,
    "status": "completed",
    "model": "agent/my-agent",
    "output": [
      {
        "type": "message",
        "id": "msg_01KP6DFCG3RF80BEBXP06XX258",
        "role": "assistant",
        "status": "completed",
        "content": [
          {
            "type": "output_text",
            "text": "Here's a microservices architecture for your e-commerce platform: start with a catalog service, a cart service, an order service, and a payment service, each owning its own database.",
            "annotations": []
          }
        ]
      }
    ],
    "usage": {
      "input_tokens": 120,
      "output_tokens": 340,
      "total_tokens": 460,
      "input_tokens_details": {
        "cached_tokens": 0,
        "cache_creation_tokens": 0
      },
      "output_tokens_details": {
        "reasoning_tokens": 0
      },
      "input_cost": 0.0003,
      "output_cost": 0.00204,
      "total_cost": 0.00234
    }
  }
  ```

  ```json Image input theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "id": "resp_01KP6EJD020945A3WCBMD581RH",
    "object": "response",
    "created_at": 1776185587,
    "completed_at": 1776185591,
    "status": "completed",
    "model": "agent/image-classifier",
    "input": [
      {
        "type": "message",
        "role": "user",
        "content": [
          { "type": "input_text", "text": "What can you see in this image?" },
          { "type": "input_image", "image_url": "https://example.com/image.jpg", "detail": "auto" }
        ]
      }
    ],
    "output": [
      {
        "type": "message",
        "id": "msg_01KP6EJJ7FKC0SDWVBEC626TCM",
        "role": "assistant",
        "status": "completed",
        "content": [
          {
            "type": "output_text",
            "text": "The image shows a city skyline at dusk, with several high-rise buildings and a river in the foreground.",
            "annotations": []
          }
        ]
      }
    ],
    "usage": {
      "input_tokens": 8514,
      "output_tokens": 24,
      "total_tokens": 8538
    }
  }
  ```

  ```json Variables theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "id": "resp_01KP6GDRS1FY0VW4V77GTK9P7G",
    "object": "response",
    "created_at": 1776185700,
    "completed_at": 1776185701,
    "status": "completed",
    "model": "agent/my-agent",
    "output": [
      {
        "type": "message",
        "id": "msg_01KP6GDS6TK09C7RM7GKAFPQ1Z",
        "role": "assistant",
        "status": "completed",
        "content": [
          {
            "type": "output_text",
            "text": "Hi John, I can see you have an admin account. What would you like help with?",
            "annotations": []
          }
        ]
      }
    ],
    "variables": {
      "user_name": "John Smith",
      "user_role": "admin"
    },
    "usage": {
      "input_tokens": 95,
      "output_tokens": 24,
      "total_tokens": 119
    }
  }
  ```

  ```json Memory theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "id": "resp_01KP6H2N8QF4Z0RB7M9KCV3PXA",
    "object": "response",
    "created_at": 1776186000,
    "completed_at": 1776186001,
    "status": "completed",
    "model": "agent/agent-memories",
    "output": [
      {
        "type": "message",
        "id": "msg_01KP6H2NJ7KC0SDWVBEC992RTM",
        "role": "assistant",
        "status": "completed",
        "content": [
          {
            "type": "output_text",
            "text": "Yes, your name is John. How can I help you today?",
            "annotations": []
          }
        ]
      }
    ],
    "usage": {
      "input_tokens": 142,
      "output_tokens": 18,
      "total_tokens": 160
    }
  }
  ```

  ```text Streaming (SSE) theme={"theme":{"light":"github-light","dark":"github-dark"}}
  event: response.created
  data: {"type":"response.created","sequence_number":1,
    "response":{"id":"resp_01KP6E957P5VF...","status":"in_progress",...}}

  event: response.in_progress
  data: {"type":"response.in_progress","sequence_number":2,...}

  event: response.output_item.added
  data: {"type":"response.output_item.added","sequence_number":3,
    "output_index":0,
    "item":{"id":"msg_01kp6e95fs...","type":"message","role":"assistant","content":[]}}

  event: response.content_part.added
  data: {"type":"response.content_part.added","sequence_number":4,
    "item_id":"msg_01kp6e95fs...","output_index":0,"content_index":0,
    "part":{"type":"output_text","text":""}}

  event: response.output_text.delta
  data: {"type":"response.output_text.delta","sequence_number":5,
    "item_id":"msg_01kp6e95fs...","output_index":0,"content_index":0,
    "delta":"Here's a microservices architecture"}

  event: response.output_text.delta
  data: {"type":"response.output_text.delta","sequence_number":6,
    "item_id":"msg_01kp6e95fs...","output_index":0,"content_index":0,
    "delta":" for your e-commerce platform."}

  event: response.output_text.done
  data: {"type":"response.output_text.done","sequence_number":7,
    "item_id":"msg_01kp6e95fs...","output_index":0,"content_index":0,
    "text":"Here's a microservices architecture for your e-commerce platform."}

  event: response.output_item.done
  data: {"type":"response.output_item.done","sequence_number":8,
    "output_index":0,
    "item":{"type":"message","role":"assistant","status":"completed",
      "content":[{"type":"output_text","text":"Here's a microservices architecture for your e-commerce platform.","annotations":[]}]}}

  event: response.completed
  data: {"type":"response.completed","sequence_number":9,
    "response":{"id":"resp_01KP6E957P5VF...","status":"completed",
      "usage":{"input_tokens":120,"output_tokens":340,"total_tokens":460}}}

  event: done
  data: [DONE]
  ```

  ```json Multi-turn theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "id": "resp_01KP6ENF391202692JCGD6YBM5",
    "object": "response",
    "created_at": 1776185687,
    "completed_at": 1776185687,
    "status": "completed",
    "model": "agent/my-agent",
    "previous_response_id": "resp_01KP6DFC5FB7K7K10TVP60PF81",
    "input": [
      {
        "type": "message",
        "id": "msg_01KP6DFXWPKZ12AS254YKHRA8R",
        "role": "user",
        "content": [{ "type": "input_text", "text": "Can you expand on the challenges section?" }]
      }
    ],
    "output": [
      {
        "type": "message",
        "id": "msg_01KP6ENFR9G5G69TTE5AD9W65W",
        "role": "assistant",
        "status": "completed",
        "content": [
          {
            "type": "output_text",
            "text": "The main challenges are distributed transactions across services, eventual consistency between the order and payment services, and the operational overhead of running and monitoring each service independently.",
            "annotations": []
          }
        ]
      }
    ],
    "usage": {
      "input_tokens": 460,
      "output_tokens": 88,
      "total_tokens": 548
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml post /v3/router/responses
openapi: 3.1.0
info:
  title: orq.ai API
  version: '2.0'
  description: orq.ai API documentation
servers:
  - url: https://my.orq.ai
security:
  - ApiKey: []
tags:
  - name: Chunking
    description: Split text into smaller chunks for retrieval and generation workflows.
  - name: File Systems
    description: >-
      Create and manage persistent file systems that agents and MCP clients read
      from and write to.
  - name: Knowledge Bases
    description: Create and manage knowledge bases used by agents and retrieval workflows.
  - name: Memory Stores
    description: Create and manage memory stores, memories, and memory documents.
  - name: Evals
    description: Run an evaluator against a conversation and its result
  - name: Logs
    description: >-
      OpenTelemetry log query API. Search, filter, aggregate, and facet log
      records ingested via OTLP.
  - name: Reporting
    description: >-
      GenAI reporting API over canonical analytics rollups. Accepts a metric
      name, time range, grain, group-by, and filters; returns a typed time
      series and optional totals.
  - name: Traces
    description: >-
      Query and inspect ingested trace data: search trace summaries, aggregate
      metrics, and read individual traces and their spans.
  - description: List models available through the AI Router.
    name: Models
  - name: Policies
  - name: Alerts
    description: >-
      Alerts evaluate a Reporting API metric on a fixed interval and fire
      notifications through notifiers when the value breaches a threshold. Each
      breach opens a trigger that tracks the incident until the value recovers.
  - name: Annotation Queues
    description: Annotation queues collect spans for human review.
  - name: API keys
    description: >-
      API keys authenticate programmatic access to the workspace. They expose
      opaque tokens, per-domain access grants, and budget and rate-limit
      constraints.
  - name: Audit Logs
    description: Audit logs record workspace entity changes and access-relevant events.
  - name: Budgets
    description: >-
      Budgets govern spend, token usage, and request rate across six scopes:
      workspace, project, identity, API key, provider, and model. Every
      applicable budget is enforced, and the most restrictive limit applies per
      dimension.
  - name: Files
    description: File upload and retrieval operations.
  - name: Guardrail Rules
    description: >-
      Guardrail Rules conditionally enforce evaluators and plugins for AI
      Gateway traffic. Rules may be scoped to a project or the whole workspace.
  - name: Hub
    description: Hub items are reusable templates available to a workspace.
  - name: Identities
    description: >-
      Identities represent end users from your system for usage and engagement
      tracking.
  - name: Management keys
    description: >-
      Management keys are workspace-scoped credentials that authenticate
      programmatic access to workspace administration surfaces (API keys,
      budgets). Unlike project-scoped API keys, a management key always operates
      at the workspace level.
  - name: MCP Gateway
    description: >-
      Register upstream MCP servers, discover and sync their tools, and assemble
      gateways that expose a curated tool surface to MCP clients.
  - name: Model Catalog
    description: >-
      Browse the orq.ai model catalog: every model orq offers, across every
      provider, with pricing, capabilities and benchmark data. List endpoints
      only return models that are not deprecated. This API is public, requires
      no authentication, and is rate limited to 120 requests per minute per IP.
      Responses carry a 5-minute cache-control max-age.
  - name: Notifiers
    description: Notifier destinations used to send delivery and workflow notifications.
  - name: Projects
    description: Projects organize resources within a workspace
  - name: Routing Rules
    description: >-
      Routing Rules conditionally select models and enforce request plugins for
      AI Gateway traffic. Rules are evaluated by ascending priority and may be
      scoped to a project or the whole workspace.
  - name: Threads
    description: Threads group related trace invocations and their aggregate usage
  - name: Skills
    description: >-
      Skills are modular instructions you can use to codify processes and
      conventions
  - name: Smart Routers
    description: >-
      Create and manage workspace Smart Routers. A Smart Router selects a model
      from an eligible pool for each request according to a quality, balanced,
      or cost profile.
  - name: Webhooks
    description: >-
      Create and manage webhooks that deliver workspace events to external HTTPS
      endpoints.
  - name: Workspaces
    description: >-
      A workspace is the tenant. Create is called from a user session during
      onboarding; Get, List, and Update are the public management surface.
  - name: Workspace Security
    description: >-
      Workspace-level domain verification and IP allowlist controls. These
      operations are restricted to workspace administrators.
  - name: Workspace Settings
    description: >-
      Workspace-level settings managed with a workspace credential. A workspace
      is the tenant, so these settings are a singleton — there is nothing to
      create or delete, only read and update.
  - name: Responses
  - description: Run agents on a cron cadence. Minimum firing interval is 1 hour.
    name: Agent Schedules
  - name: Embeddings
  - name: Telemetry
    description: >-
      Unified query envelope for traces, metrics, and logs. One request shape,
      one filter dialect, and one response shape per source, validated by a
      per-source registry.
  - description: Beta. Run typed classification questions against a classify model.
    name: Classify
  - description: Search Gateway with managed credits or BYOK.
    name: Web Search
externalDocs:
  url: https://docs.orq.ai
  description: orq.ai Documentation
paths:
  /v3/router/responses:
    post:
      tags:
        - Responses
      summary: Create response
      description: >-
        Creates a model response for the given input. Returns a response object
        or a stream of server-sent events.
      operationId: create-router-response
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                background:
                  description: If true, the response runs asynchronously in the background.
                  type: boolean
                cache:
                  $ref: '#/components/schemas/CacheConfig'
                  description: Exact-match response cache configuration for this request.
                cache_control:
                  description: >-
                    Top-level cache control automatically applies a
                    cache_control marker to the last cacheable block in the
                    request.
                  properties:
                    ttl:
                      default: 5m
                      description: >-
                        The time-to-live for the cache control breakpoint. This
                        may be one of the following values:


                        - `5m`: 5 minutes

                        - `1h`: 1 hour


                        Defaults to `5m`. Only supported by Anthropic Claude
                        models.
                      enum:
                        - 5m
                        - 1h
                      type: string
                    type:
                      description: >-
                        Create a cache control breakpoint. Accepts only the
                        value "ephemeral".
                      enum:
                        - ephemeral
                      type: string
                  required:
                    - type
                  title: Cache control
                  type: object
                conversation:
                  $ref: '#/components/schemas/ConversationParam'
                  description: Conversation context for multi-turn interactions.
                fallbacks:
                  description: >-
                    Fallback models to try if the primary model fails. Each
                    entry specifies a model in provider/model format.
                  items:
                    $ref: '#/components/schemas/FallbackConfig'
                  type:
                    - array
                    - 'null'
                frequency_penalty:
                  description: >-
                    Penalize new tokens based on their frequency in the text so
                    far. Between -2.0 and 2.0.
                  format: double
                  type: number
                guardrails:
                  description: Guardrails to evaluate the request against.
                  items:
                    $ref: '#/components/schemas/EvaluatorRef'
                  type: array
                identity:
                  $ref: '#/components/schemas/ResponseIdentity'
                  description: Identity/contact information for the end-user.
                input:
                  anyOf:
                    - description: A simple text string as input.
                      title: Text
                      type: string
                    - description: An array of input items.
                      items:
                        description: >-
                          An input item. The "type" field determines the item
                          kind: "message", "function_call",
                          "function_call_output", "item_reference", etc.
                        properties:
                          arguments:
                            description: >-
                              The function arguments as a JSON string (for
                              function_call items).
                            type: string
                          async:
                            description: >-
                              Whether a function or custom tool call runs
                              asynchronously.
                            type: boolean
                          call_id:
                            description: >-
                              The function call identifier (for function_call
                              and function_call_output items).
                            type: string
                          content:
                            anyOf:
                              - title: Text
                                type: string
                              - items:
                                  anyOf:
                                    - description: A text content part.
                                      properties:
                                        cache_control:
                                          properties:
                                            ttl:
                                              default: 5m
                                              description: >-
                                                The time-to-live for the cache control
                                                breakpoint. This may be one of the
                                                following values:


                                                - `5m`: 5 minutes

                                                - `1h`: 1 hour


                                                Defaults to `5m`. Only supported by
                                                Anthropic Claude models.
                                              enum:
                                                - 5m
                                                - 1h
                                              type: string
                                            type:
                                              type: string
                                              enum:
                                                - ephemeral
                                              description: >-
                                                Create a cache control breakpoint at
                                                this content block. Accepts only the
                                                value "ephemeral".
                                          required:
                                            - type
                                          title: Cache control
                                          type: object
                                        text:
                                          type: string
                                          description: The text content.
                                        type:
                                          enum:
                                            - input_text
                                          type: string
                                      required:
                                        - type
                                        - text
                                      title: Text
                                      type: object
                                    - description: An image content part.
                                      properties:
                                        cache_control:
                                          properties:
                                            ttl:
                                              default: 5m
                                              description: >-
                                                The time-to-live for the cache control
                                                breakpoint. This may be one of the
                                                following values:


                                                - `5m`: 5 minutes

                                                - `1h`: 1 hour


                                                Defaults to `5m`. Only supported by
                                                Anthropic Claude models.
                                              enum:
                                                - 5m
                                                - 1h
                                              type: string
                                            type:
                                              type: string
                                              enum:
                                                - ephemeral
                                              description: >-
                                                Create a cache control breakpoint at
                                                this content block. Accepts only the
                                                value "ephemeral".
                                          required:
                                            - type
                                          title: Cache control
                                          type: object
                                        detail:
                                          description: >-
                                            The detail level for image
                                            understanding.
                                          enum:
                                            - auto
                                            - low
                                            - high
                                          type: string
                                        file_id:
                                          description: The ID of a previously uploaded file.
                                          type: string
                                        image_url:
                                          description: The URL of the image.
                                          type: string
                                        type:
                                          enum:
                                            - input_image
                                          type: string
                                      required:
                                        - type
                                      title: Image
                                      type: object
                                    - description: >-
                                        A file content part. Provide file_id,
                                        file_data (base64), or file_url.
                                      properties:
                                        cache_control:
                                          properties:
                                            ttl:
                                              default: 5m
                                              description: >-
                                                The time-to-live for the cache control
                                                breakpoint. This may be one of the
                                                following values:


                                                - `5m`: 5 minutes

                                                - `1h`: 1 hour


                                                Defaults to `5m`. Only supported by
                                                Anthropic Claude models.
                                              enum:
                                                - 5m
                                                - 1h
                                              type: string
                                            type:
                                              type: string
                                              enum:
                                                - ephemeral
                                              description: >-
                                                Create a cache control breakpoint at
                                                this content block. Accepts only the
                                                value "ephemeral".
                                          required:
                                            - type
                                          title: Cache control
                                          type: object
                                        file_data:
                                          description: Base64-encoded file content.
                                          type: string
                                        file_id:
                                          description: The ID of a previously uploaded file.
                                          type: string
                                        file_url:
                                          description: A URL to fetch the file from.
                                          type: string
                                        filename:
                                          description: The name of the file.
                                          type: string
                                        mime_type:
                                          description: >-
                                            The MIME type of the file (e.g.,
                                            application/pdf).
                                          type: string
                                        type:
                                          enum:
                                            - input_file
                                          type: string
                                      required:
                                        - type
                                      title: File
                                      type: object
                                  description: A content part within a message.
                                title: Content parts
                                type: array
                            description: >-
                              The content of the item: a string or an array of
                              content parts.
                          id:
                            description: >-
                              The ID of the item. For item_reference items, this
                              identifies the referenced item.
                            type: string
                          name:
                            description: >-
                              The name of the function that was called (for
                              function_call items).
                            type: string
                          output:
                            description: >-
                              The output of the function call (for
                              function_call_output type).
                            type: string
                          reasoning:
                            description: >-
                              Reasoning settings applied by a
                              configuration_update item.
                            properties:
                              effort:
                                enum:
                                  - none
                                  - minimal
                                  - low
                                  - medium
                                  - high
                                  - xhigh
                                  - max
                                type: string
                            type: object
                          role:
                            description: >-
                              The role of the message sender (for message
                              items).
                            enum:
                              - user
                              - assistant
                              - system
                              - developer
                            type: string
                          status:
                            description: The status of a model-generated input item.
                            enum:
                              - in_progress
                              - completed
                              - incomplete
                            type: string
                          type:
                            description: The type of item.
                            enum:
                              - message
                              - function_call
                              - function_call_output
                              - item_reference
                              - reasoning
                              - custom_tool_call
                              - custom_tool_call_output
                              - computer_call
                              - computer_call_output
                              - local_shell_call
                              - local_shell_call_output
                              - shell_call
                              - shell_call_output
                              - apply_patch_call
                              - apply_patch_call_output
                              - tool_search_call
                              - tool_search_output
                              - additional_tools
                              - compaction
                              - program
                              - program_output
                              - mcp_call
                              - mcp_list_tools
                              - mcp_approval_request
                              - mcp_approval_response
                              - configuration_update
                            type: string
                        type: object
                      title: Items
                      type: array
                  description: >-
                    Input to the model: a string or an array of input items
                    (messages, files, etc.).
                instructions:
                  description: System prompt / instructions for the model.
                  type: string
                integration_id:
                  description: >-
                    Integration ID used to resolve provider credentials for this
                    request.
                  type: string
                limits:
                  $ref: '#/components/schemas/ResponseExecutionLimits'
                  description: >-
                    Bound agent-loop execution. Fields: max_iterations (LLM
                    turns), max_execution_time (seconds), max_cost (USD; send 0
                    to disable a manifest-configured cap), max_depth (sub-agent
                    nesting), tool_timeout (seconds). Body values override
                    agent-manifest defaults.
                load_balancer:
                  $ref: '#/components/schemas/LoadBalancerConfig'
                  description: >-
                    Load balancing configuration for selecting among multiple
                    models.
                max_output_tokens:
                  description: Maximum number of tokens in the response output.
                  format: int64
                  type: integer
                max_tool_calls:
                  description: Maximum number of tool call rounds in the agentic loop.
                  format: int64
                  type: integer
                memory:
                  $ref: '#/components/schemas/MemoryParam'
                  description: >-
                    Attach a memory store entity to enable persistent memory
                    across requests. See Memory Stores documentation for setup.
                metadata:
                  additionalProperties:
                    type: string
                  description: >-
                    Developer-defined key-value pairs attached to the response
                    (OpenAI spec: Map<string, string>). Non-string values are
                    rejected with a 400.
                  type: object
                model:
                  description: >-
                    The model to use in provider/model format (e.g.
                    openai/gpt-4o). Use agent/<key> to invoke a pre-configured
                    agent from the orq.ai platform.
                  type: string
                parallel_tool_calls:
                  description: Whether to allow parallel tool calls.
                  type: boolean
                plugins:
                  description: >-
                    Request-scoped transforms applied to the text exchanged with
                    the model. Supports pii_redaction, which replaces PII with
                    placeholders before the provider sees it and restores the
                    original values in the response; response_healing, which
                    repairs malformed JSON in non-streaming model output; and
                    trace_scrubbing, which removes selected sensitive fields
                    from exported traces.
                  items:
                    $ref: '#/components/schemas/PublicPlugin'
                  type:
                    - array
                    - 'null'
                presence_penalty:
                  description: >-
                    Penalize new tokens based on their presence in the text so
                    far. Between -2.0 and 2.0.
                  format: double
                  type: number
                previous_response_id:
                  description: >-
                    The ID of a previous response to continue from. Requires
                    store to be true (default) on the original response.
                  type: string
                prompt_cache_key:
                  description: Key for prompt caching across requests.
                  type: string
                prompt_cache_options:
                  $ref: '#/components/schemas/OpenAIPromptCacheOptions'
                  description: >-
                    OpenAI prompt cache options. GPT-5.6 and later support
                    ttl=30m.
                reasoning:
                  $ref: '#/components/schemas/ReasoningParam'
                  description: >-
                    Configure reasoning behavior. Set effort (none, minimal,
                    low, medium, high, xhigh, max) to control how much the model
                    thinks before answering. Higher effort means more reasoning
                    tokens and better answers for complex tasks, at higher cost.
                retry:
                  $ref: '#/components/schemas/ResponseRetryConfig'
                  description: >-
                    Retry configuration. Specify the number of retries and which
                    HTTP status codes should trigger a retry.
                safety_identifier:
                  description: Safety identifier for content filtering.
                  type: string
                security:
                  $ref: '#/components/schemas/SecurityConfig'
                  description: Trace masking configuration for request and response data.
                service_tier:
                  description: >-
                    Processing mode for the request. Fast uses premium
                    low-latency processing; priority remains a
                    backward-compatible alias.
                  enum:
                    - auto
                    - default
                    - flex
                    - fast
                    - scale
                    - priority
                  type: string
                stop_sequences:
                  description: >-
                    Custom text sequences that cause the model to stop
                    generating. Forwarded to providers that support it (e.g.
                    Anthropic); ignored otherwise.
                  items:
                    type: string
                  type: array
                store:
                  description: >-
                    Whether to persist the response (default: true). When false,
                    the response cannot be retrieved later and
                    previous_response_id will not work for follow-up requests.
                  type: boolean
                stream:
                  description: If true, returns a stream of server-sent events.
                  type: boolean
                stream_options:
                  $ref: '#/components/schemas/StreamOptions'
                temperature:
                  description: Sampling temperature between 0 and 2.
                  format: double
                  type: number
                template_engine:
                  description: >-
                    Template engine for variable substitution in instructions.
                    Defaults to the agent manifest's engine when invoking an
                    agent, otherwise text.
                  enum:
                    - text
                    - jinja
                    - mustache
                  type: string
                text:
                  description: Configuration for text output.
                  properties:
                    format:
                      anyOf:
                        - properties:
                            type:
                              type: string
                              enum:
                                - text
                          required:
                            - type
                          title: Plain text
                          type: object
                        - properties:
                            description:
                              description: >-
                                A description of what the response format is
                                for, used by the model to determine how to
                                respond in the format.
                              type: string
                            name:
                              description: >-
                                The name of the response format. Must be a-z,
                                A-Z, 0-9, or contain underscores and dashes,
                                with a maximum length of 64.
                              maxLength: 64
                              pattern: ^[a-zA-Z0-9_-]+$
                              type: string
                            schema:
                              additionalProperties: true
                              description: >-
                                The schema for the response format, described as
                                a JSON Schema object.
                              type: object
                            strict:
                              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.
                              type: boolean
                            type:
                              description: >-
                                The type of response format being defined.
                                Always `json_schema`.
                              enum:
                                - json_schema
                              type: string
                          required:
                            - type
                            - name
                            - schema
                          title: JSON Schema
                          type: object
                      description: 'The output format: plain text or structured JSON schema.'
                    verbosity:
                      description: Controls the verbosity of the model output.
                      enum:
                        - low
                        - medium
                        - high
                      type: string
                  type: object
                thread:
                  $ref: '#/components/schemas/ResponseThread'
                  description: Thread for grouping related requests.
                timeout:
                  $ref: '#/components/schemas/TimeoutConfig'
                  description: Provider call timeout configuration in milliseconds.
                tool_choice:
                  anyOf:
                    - description: >-
                        Shorthand: "auto" lets the model decide, "none" disables
                        tools, "required" forces tool use.
                      enum:
                        - auto
                        - none
                        - required
                      title: Shorthand
                      type: string
                    - description: Select a specific function tool by name.
                      properties:
                        name:
                          type: string
                          description: The name of the function to call.
                        type:
                          type: string
                          enum:
                            - function
                      required:
                        - type
                        - name
                      title: Specific function
                      type: object
                  description: >-
                    How the model should use the provided tools. Can be a string
                    shorthand or a specific function selector.
                tools:
                  description: Tools available to the model.
                  items:
                    anyOf:
                      - description: A function tool the model can call.
                        properties:
                          async:
                            description: >-
                              Whether the tool response can be returned
                              asynchronously.
                            type: boolean
                          cache_control:
                            properties:
                              ttl:
                                default: 5m
                                description: >-
                                  The time-to-live for the cache control
                                  breakpoint. This may be one of the following
                                  values:


                                  - `5m`: 5 minutes

                                  - `1h`: 1 hour


                                  Defaults to `5m`. Only supported by Anthropic
                                  Claude models.
                                enum:
                                  - 5m
                                  - 1h
                                type: string
                              type:
                                type: string
                                enum:
                                  - ephemeral
                                description: >-
                                  Create a cache control breakpoint at this
                                  content block. Accepts only the value
                                  "ephemeral".
                            required:
                              - type
                            title: Cache control
                            type: object
                          description:
                            description: A description of what the function does.
                            type: string
                          name:
                            description: The name of the function.
                            type: string
                          parameters:
                            additionalProperties: true
                            description: >-
                              The parameters the function accepts, as a JSON
                              Schema object.
                            type: object
                          strict:
                            description: Whether to enforce strict parameter validation.
                            type: boolean
                          type:
                            type: string
                            enum:
                              - function
                        required:
                          - type
                          - name
                        title: Function
                        type: object
                      - description: A custom tool that accepts free-form input.
                        properties:
                          async:
                            description: >-
                              Whether the tool response can be returned
                              asynchronously.
                            type: boolean
                          description:
                            description: A description of what the custom tool does.
                            type: string
                          name:
                            description: The name of the custom tool.
                            type: string
                          type:
                            enum:
                              - custom
                            type: string
                        required:
                          - type
                          - name
                        title: Custom
                        type: object
                      - $ref: '#/components/schemas/OrqAdvisorTool'
                      - $ref: '#/components/schemas/OrqSidekickTool'
                      - description: >-
                          An orq.ai platform tool reference. For MCP tools,
                          prefer type 'mcp' with 'key' instead of 'orq:mcp' with
                          'tool_id'.
                        properties:
                          files:
                            description: >-
                              Files to stage in /workspace for
                              orq:code_interpreter. Maximum 10 files.
                            items:
                              properties:
                                file_id:
                                  description: The workspace file ID.
                                  type: string
                                name:
                                  description: The file name exposed under /workspace.
                                  type: string
                              required:
                                - file_id
                                - name
                              type: object
                            maxItems: 10
                            type: array
                          network:
                            description: >-
                              Network access intent for orq:code_interpreter.
                              Stored and validated today; runtime enforcement by
                              the sandbox egress layer is rolling out and until
                              then sandbox executions retain default public
                              internet egress.
                            properties:
                              allowlist:
                                default: []
                                description: >-
                                  Allowed network hostnames or IPv4 addresses
                                  when mode is allowlist. Maximum 50 entries.
                                items:
                                  type: string
                                maxItems: 50
                                type: array
                              mode:
                                default: disabled
                                description: Network mode. Defaults to disabled.
                                enum:
                                  - disabled
                                  - allowlist
                                type: string
                            type: object
                          timezone:
                            description: >-
                              Default IANA timezone for orq:datetime (e.g.,
                              "Europe/Amsterdam").
                            type: string
                          tool_id:
                            description: The tool ID (for orq:mcp, orq:http, orq:function).
                            type: string
                          type:
                            description: >-
                              The orq.ai tool type. orq:web_search,
                              orq:web_fetch, and orq:datetime are the canonical
                              names for orq:google_search, orq:web_scraper, and
                              orq:current_date.
                            enum:
                              - orq:web_search
                              - orq:web_fetch
                              - orq:datetime
                              - orq:search_models
                              - orq:image_generation
                              - orq:apply_patch
                              - orq:fusion
                              - orq:shell
                              - orq:query_knowledge_base
                              - orq:retrieve_knowledge_bases
                              - orq:current_date
                              - orq:google_search
                              - orq:web_scraper
                              - orq:code_interpreter
                              - orq:mcp
                              - orq:http
                              - orq:function
                            type: string
                        required:
                          - type
                        title: orq.ai Tool
                        type: object
                      - description: >-
                          An MCP (Model Context Protocol) server tool. Provide
                          server_url for inline mode, or key to reference a
                          pre-configured MCP server.
                        properties:
                          allowed_tools:
                            description: >-
                              Filter which tools from the MCP server are
                              exposed.
                            properties:
                              read_only:
                                description: >-
                                  Only expose tools with readOnlyHint
                                  annotation.
                                type: boolean
                              tool_names:
                                description: List of allowed tool names.
                                items:
                                  type: string
                                type: array
                            type: object
                          headers:
                            additionalProperties:
                              type: string
                            description: >-
                              Custom headers to send with MCP requests. Values
                              support {{variable}} templates.
                            type: object
                          key:
                            description: >-
                              Unique identifier. Required for pre-configured MCP
                              servers (lookup key). For inline servers, used as
                              a trace/display label.
                            type: string
                          server_description:
                            description: Human-readable description of the server.
                            type: string
                          server_url:
                            description: The MCP server endpoint URL (inline mode).
                            type: string
                          type:
                            enum:
                              - mcp
                            type: string
                        required:
                          - type
                        title: MCP Tool
                        type: object
                    description: >-
                      A tool definition. The "type" field determines the tool
                      kind.
                  type: array
                top_k:
                  description: >-
                    Only sample from the top K options for each subsequent
                    token. Forwarded to providers that support it (e.g.
                    Anthropic); ignored otherwise.
                  format: int64
                  type: integer
                top_logprobs:
                  description: Number of most likely tokens to return at each position.
                  format: int64
                  type: integer
                top_p:
                  description: Nucleus sampling parameter.
                  format: double
                  type: number
                variables:
                  additionalProperties: {}
                  description: >-
                    Template variables for prompt substitution. Plain values
                    fill {{variable}} placeholders in instructions. For secrets,
                    use {"secret": true, "value": "sensitive-data"} — secrets
                    are automatically passed to platform tools (Python, HTTP,
                    MCP) and redacted from traces.
                  type: object
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  background:
                    type: boolean
                  completed_at:
                    format: int64
                    type:
                      - integer
                      - 'null'
                  conversation:
                    $ref: '#/components/schemas/ConversationParam'
                  created_at:
                    format: int64
                    type: integer
                  error:
                    anyOf:
                      - $ref: '#/components/schemas/ResponseError'
                      - type: 'null'
                  frequency_penalty:
                    type: number
                    format: double
                  id:
                    type: string
                  incomplete_details:
                    anyOf:
                      - $ref: '#/components/schemas/IncompleteDetails'
                      - type: 'null'
                  input:
                    description: >-
                      Array of input items (messages, function call outputs,
                      etc.)
                    items: {}
                    type:
                      - array
                      - 'null'
                  instructions:
                    type:
                      - string
                      - 'null'
                  max_output_tokens:
                    format: int64
                    type:
                      - integer
                      - 'null'
                  max_tool_calls:
                    format: int64
                    type:
                      - integer
                      - 'null'
                  memory:
                    $ref: '#/components/schemas/MemoryParam'
                  metadata:
                    additionalProperties:
                      type: string
                    description: >-
                      Developer-defined key-value pairs attached to the response
                      (OpenAI spec: Map<string, string>).
                    type: object
                  model:
                    type: string
                  object:
                    description: Always "response"
                    type: string
                  output:
                    description: >-
                      Array of output items (messages, function calls,
                      reasoning, etc.)
                    items: {}
                    type:
                      - array
                      - 'null'
                  parallel_tool_calls:
                    type: boolean
                  presence_penalty:
                    type: number
                    format: double
                  previous_response_id:
                    type:
                      - string
                      - 'null'
                  prompt_cache_key:
                    type:
                      - string
                      - 'null'
                  prompt_cache_options:
                    anyOf:
                      - $ref: '#/components/schemas/OpenAIPromptCacheOptions'
                      - type: 'null'
                  prompt_cache_retention:
                    type:
                      - string
                      - 'null'
                  reasoning:
                    anyOf:
                      - $ref: '#/components/schemas/Reasoning'
                      - type: 'null'
                  safety_identifier:
                    type:
                      - string
                      - 'null'
                  service_tier:
                    enum:
                      - auto
                      - default
                      - flex
                      - fast
                      - scale
                      - priority
                    type: string
                  status:
                    enum:
                      - queued
                      - in_progress
                      - completed
                      - failed
                      - incomplete
                    type: string
                  store:
                    type: boolean
                  telemetry:
                    $ref: '#/components/schemas/ResponseTelemetry'
                    description: >-
                      OpenTelemetry trace and span identifiers for this
                      response.
                  temperature:
                    type: number
                    format: double
                  text:
                    description: Text output configuration including format and verbosity
                  tool_choice:
                    description: >-
                      Tool choice setting: "auto", "none", "required", or a
                      specific function
                  tools:
                    description: Array of tool configurations used in this response
                    items: {}
                    type:
                      - array
                      - 'null'
                  top_k:
                    description: >-
                      Only sample from the top K options for each subsequent
                      token. Present only when set on the request.
                    format: int64
                    type: integer
                  top_logprobs:
                    format: int64
                    type: integer
                  top_p:
                    type: number
                    format: double
                  truncation:
                    enum:
                      - disabled
                      - auto
                    type: string
                  usage:
                    anyOf:
                      - $ref: '#/components/schemas/PublicUsage'
                      - type: 'null'
                  user:
                    type:
                      - string
                      - 'null'
                  variables:
                    type: object
                    additionalProperties: {}
                required:
                  - id
                  - object
                  - created_at
                  - completed_at
                  - status
                  - incomplete_details
                  - model
                  - previous_response_id
                  - instructions
                  - input
                  - output
                  - error
                  - tools
                  - tool_choice
                  - temperature
                  - top_p
                  - presence_penalty
                  - frequency_penalty
                  - top_logprobs
                  - max_output_tokens
                  - max_tool_calls
                  - reasoning
                  - text
                  - user
                  - usage
                  - truncation
                  - parallel_tool_calls
                  - store
                  - background
                  - metadata
                  - service_tier
                  - safety_identifier
                  - prompt_cache_key
                  - prompt_cache_retention
                  - prompt_cache_options
                type: object
            text/event-stream:
              schema:
                $ref: '#/components/schemas/ResponseStreamEvent'
          description: Returns a response object or a stream of events.
components:
  schemas:
    CacheConfig:
      additionalProperties: false
      properties:
        ttl:
          format: int64
          type: integer
        type:
          type: string
      required:
        - type
      type: object
    ConversationParam:
      additionalProperties: false
      properties:
        id:
          type: string
      required:
        - id
      type: object
    FallbackConfig:
      additionalProperties: false
      properties:
        model:
          type: string
      required:
        - model
      type: object
    EvaluatorRef:
      additionalProperties: false
      properties:
        execute_on:
          enum:
            - input
            - output
            - both
          type: string
        id:
          type: string
          minLength: 1
        is_guardrail:
          type: boolean
        options:
          type: object
          additionalProperties: {}
        sample_rate:
          format: double
          maximum: 1
          minimum: 0
          type: number
        timeout:
          format: int64
          maximum: 600000
          minimum: 1000
          type: integer
      required:
        - id
        - execute_on
      type: object
    ResponseIdentity:
      additionalProperties: false
      properties:
        display_name:
          type: string
        email:
          type: string
        id:
          type: string
        metadata:
          items:
            type: object
            additionalProperties: {}
          type:
            - array
            - 'null'
        tags:
          items:
            type: string
          type:
            - array
            - 'null'
      required:
        - id
      type: object
    ResponseExecutionLimits:
      additionalProperties: false
      properties:
        max_cost:
          type: number
          format: double
        max_depth:
          format: int64
          type: integer
        max_execution_time:
          format: int64
          type: integer
        max_iterations:
          format: int64
          type: integer
        tool_timeout:
          format: int64
          type: integer
      type: object
    LoadBalancerConfig:
      additionalProperties: false
      properties:
        models:
          items:
            $ref: '#/components/schemas/LoadBalancerModelConfig'
          type:
            - array
            - 'null'
        type:
          type: string
      required:
        - type
        - models
      type: object
    MemoryParam:
      additionalProperties: false
      properties:
        entity_id:
          type: string
      required:
        - entity_id
      type: object
    PublicPlugin:
      additionalProperties: false
      properties:
        entities:
          description: >-
            pii_redaction only. Entity types to redact (e.g. EMAIL_ADDRESS,
            BSN). On its own this is a strict allowlist; alongside regions it
            adds to the region coverage. Omit to redact every type detected for
            the language and regions. See GET /v2/pii/capabilities for valid
            types.
          items:
            type: string
          type:
            - array
            - 'null'
        entity_thresholds:
          additionalProperties:
            type: number
            format: double
          description: >-
            pii_redaction only. Per-entity confidence cutoff overrides in [0,1],
            keyed by entity type. An override replaces threshold for that type
            and may sit above or below it. Every key must also appear in
            entities.
          type: object
        id:
          description: >-
            Plugin discriminator. pii_redaction redacts PII, response_healing
            repairs malformed JSON, and trace_scrubbing removes selected
            sensitive fields from exported traces.
          enum:
            - pii_redaction
            - response_healing
            - trace_scrubbing
          type: string
        language:
          description: >-
            pii_redaction only. Detector language, or "auto" to detect it per
            request. Defaults to auto. The accepted values are whatever GET
            /v2/pii/capabilities lists, so they are not enumerated here: a fixed
            enum would reject a language the detector has since added.
          type: string
        mask:
          description: >-
            trace_scrubbing only. Trace surfaces to scrub. At least one value
            required.
          items:
            type: string
            enum:
              - all
              - system
              - input
              - output
              - metadata
              - variables
          minItems: 1
          type:
            - array
            - 'null'
        on_failure:
          description: >-
            pii_redaction only. Behavior when redaction is unavailable. block
            (default) fails the request; passthrough sends the original text.
          enum:
            - block
            - passthrough
          type: string
        regions:
          description: >-
            pii_redaction only. Region codes selecting whole regions of coverage
            (e.g. nl, gb). Every entity type those regions cover is redacted,
            alongside the base catalog. ["all"] cannot be combined with other
            region codes, and leaving both this and entities empty also runs
            every region, so selecting nothing is the widest request rather than
            the narrowest. Combines with entities: the two selections are
            unioned.
          items:
            type: string
          type:
            - array
            - 'null'
        threshold:
          description: pii_redaction only. Detector confidence cutoff in [0,1].
          format: double
          maximum: 1
          minimum: 0
          type: number
      required:
        - id
      type: object
    OpenAIPromptCacheOptions:
      additionalProperties: false
      properties:
        mode:
          enum:
            - implicit
            - explicit
          type: string
        ttl:
          enum:
            - 30m
          type: string
      type: object
    ReasoningParam:
      additionalProperties: false
      properties:
        effort:
          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.
          enum:
            - none
            - minimal
            - low
            - medium
            - high
            - xhigh
            - max
          type: string
        summary:
          description: The format of the reasoning summary returned by the model.
          enum:
            - concise
            - detailed
            - auto
          type: string
      type: object
    ResponseRetryConfig:
      additionalProperties: false
      properties:
        count:
          description: Number of retries (1-5).
          format: int64
          type: integer
        on_codes:
          description: HTTP status codes that trigger a retry (e.g. [429, 500, 502, 503]).
          items:
            format: int64
            type: integer
          type:
            - array
            - 'null'
      required:
        - count
        - on_codes
      type: object
    SecurityConfig:
      additionalProperties: false
      properties:
        mask:
          items:
            type: string
          type:
            - array
            - 'null'
      type: object
    StreamOptions:
      additionalProperties: false
      properties:
        include_obfuscation:
          type: boolean
      required:
        - include_obfuscation
      type: object
    ResponseThread:
      additionalProperties: false
      properties:
        id:
          type: string
        tags:
          items:
            type: string
          type:
            - array
            - 'null'
      required:
        - id
      type: object
    TimeoutConfig:
      additionalProperties: false
      properties:
        call_timeout:
          format: int64
          type: integer
      required:
        - call_timeout
      type: object
    OrqAdvisorTool:
      additionalProperties: false
      description: Lets the primary model consult a configured secondary model for advice.
      properties:
        max_tokens:
          description: >-
            Maximum secondary-model output tokens. 0 uses the provider default;
            the selected model may impose a lower maximum.
          format: int64
          maximum: 128000
          minimum: 0
          type: integer
        max_transcript_tokens:
          description: >-
            Maximum estimated conversation-transcript tokens sent to the
            secondary model. 0 includes the full transcript.
          format: int64
          minimum: 0
          type: integer
        max_uses:
          description: Maximum invocations per request. 0 means unlimited.
          format: int64
          minimum: 0
          type: integer
        model:
          description: Secondary model in provider/model format.
          minLength: 1
          type: string
        reasoning_effort:
          description: >-
            Reasoning effort for supported models. Omit to use the provider
            default.
          enum:
            - none
            - minimal
            - low
            - medium
            - high
            - xhigh
            - max
          type: string
        temperature:
          description: Sampling temperature. The selected model may impose a lower maximum.
          format: double
          maximum: 2
          minimum: 0
          type: number
        type:
          description: Advisor tool discriminator.
          enum:
            - orq:advisor
          type: string
      required:
        - type
        - model
      title: Advisor
      type: object
    OrqSidekickTool:
      additionalProperties: false
      description: >-
        Lets the primary model delegate a concrete task to a configured worker
        model. Use type "orq:subagent" ("orq:sidekick" is the legacy alias).
      properties:
        max_tokens:
          description: >-
            Maximum secondary-model output tokens. 0 uses the provider default;
            the selected model may impose a lower maximum.
          format: int64
          maximum: 128000
          minimum: 0
          type: integer
        max_uses:
          description: Maximum invocations per request. 0 means unlimited.
          format: int64
          minimum: 0
          type: integer
        model:
          description: Secondary model in provider/model format.
          minLength: 1
          type: string
        output_format:
          description: Optional output-format guidance for the secondary model.
          type: string
        reasoning_effort:
          description: >-
            Reasoning effort for supported models. Omit to use the provider
            default.
          enum:
            - none
            - minimal
            - low
            - medium
            - high
            - xhigh
            - max
          type: string
        system_prompt:
          description: Optional system prompt for the secondary model.
          type: string
        temperature:
          description: Sampling temperature. The selected model may impose a lower maximum.
          format: double
          maximum: 2
          minimum: 0
          type: number
        type:
          description: Subagent tool discriminator; orq:sidekick is the legacy alias.
          enum:
            - orq:subagent
            - orq:sidekick
          type: string
      required:
        - type
        - model
      title: Subagent
      type: object
    ResponseError:
      additionalProperties: false
      properties:
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
      type: object
    IncompleteDetails:
      additionalProperties: false
      properties:
        reason:
          type: string
      required:
        - reason
      type: object
    Reasoning:
      additionalProperties: false
      properties:
        effort:
          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.
          enum:
            - none
            - minimal
            - low
            - medium
            - high
            - xhigh
            - max
          type: string
        summary:
          description: The format of the reasoning summary returned by the model.
          enum:
            - concise
            - detailed
            - auto
            - null
          type:
            - string
            - 'null'
      type: object
    ResponseTelemetry:
      additionalProperties: false
      properties:
        span_id:
          type: string
        trace_id:
          type: string
      required:
        - trace_id
        - span_id
      type: object
    PublicUsage:
      additionalProperties: false
      properties:
        input_cost:
          description: >-
            Cost (USD) of input tokens. Present when billing was computed for
            this response.
          format: double
          type: number
        input_tokens:
          format: int64
          type: integer
        input_tokens_details:
          $ref: '#/components/schemas/InputTokensDetails'
        output_cost:
          description: >-
            Cost (USD) of output tokens. Present when billing was computed for
            this response.
          format: double
          type: number
        output_tokens:
          format: int64
          type: integer
        output_tokens_details:
          $ref: '#/components/schemas/OutputTokensDetails'
        server_tool_use:
          $ref: '#/components/schemas/ServerToolUseDetails'
          description: >-
            Per-tool breakdown of server tool calls (provider-native and
            orq-executed) made during this response.
        total_cost:
          description: >-
            Total cost (USD) of the response. Present when billing was computed
            for this response.
          format: double
          type: number
        total_tokens:
          format: int64
          type: integer
        web_search_requests:
          format: int64
          type: integer
      required:
        - input_tokens
        - output_tokens
        - total_tokens
        - input_tokens_details
        - output_tokens_details
      type: object
    ResponseStreamEvent:
      description: >-
        A single server-sent event emitted on the response stream. The `type`
        field discriminates the payload.
      discriminator:
        mapping:
          error: '#/components/schemas/ResponseErrorStreamEvent'
          response.code_interpreter_call.completed: '#/components/schemas/ResponseCodeInterpreterCallCompletedStreamEvent'
          response.code_interpreter_call.in_progress: >-
            #/components/schemas/ResponseCodeInterpreterCallInProgressStreamEvent
          response.code_interpreter_call.interpreting: >-
            #/components/schemas/ResponseCodeInterpreterCallInterpretingStreamEvent
          response.code_interpreter_call_code.delta: '#/components/schemas/ResponseCodeInterpreterCallCodeDeltaStreamEvent'
          response.code_interpreter_call_code.done: '#/components/schemas/ResponseCodeInterpreterCallCodeDoneStreamEvent'
          response.completed: '#/components/schemas/ResponseCompletedStreamEvent'
          response.content_part.added: '#/components/schemas/ResponseContentPartAddedStreamEvent'
          response.content_part.done: '#/components/schemas/ResponseContentPartDoneStreamEvent'
          response.created: '#/components/schemas/ResponseCreatedStreamEvent'
          response.custom_tool_call_input.delta: '#/components/schemas/ResponseCustomToolCallInputDeltaStreamEvent'
          response.custom_tool_call_input.done: '#/components/schemas/ResponseCustomToolCallInputDoneStreamEvent'
          response.failed: '#/components/schemas/ResponseFailedStreamEvent'
          response.file_search_call.completed: '#/components/schemas/ResponseFileSearchCallCompletedStreamEvent'
          response.file_search_call.in_progress: '#/components/schemas/ResponseFileSearchCallInProgressStreamEvent'
          response.file_search_call.searching: '#/components/schemas/ResponseFileSearchCallSearchingStreamEvent'
          response.function_call_arguments.delta: '#/components/schemas/ResponseFunctionCallArgumentsDeltaStreamEvent'
          response.function_call_arguments.done: '#/components/schemas/ResponseFunctionCallArgumentsDoneStreamEvent'
          response.image_generation_call.completed: '#/components/schemas/ResponseImageGenerationCallCompletedStreamEvent'
          response.image_generation_call.generating: >-
            #/components/schemas/ResponseImageGenerationCallGeneratingStreamEvent
          response.image_generation_call.in_progress: >-
            #/components/schemas/ResponseImageGenerationCallInProgressStreamEvent
          response.image_generation_call.partial_image: >-
            #/components/schemas/ResponseImageGenerationCallPartialImageStreamEvent
          response.in_progress: '#/components/schemas/ResponseInProgressStreamEvent'
          response.incomplete: '#/components/schemas/ResponseIncompleteStreamEvent'
          response.mcp_call.completed: '#/components/schemas/ResponseMCPCallCompletedStreamEvent'
          response.mcp_call.failed: '#/components/schemas/ResponseMCPCallFailedStreamEvent'
          response.mcp_call.in_progress: '#/components/schemas/ResponseMCPCallInProgressStreamEvent'
          response.mcp_call_arguments.delta: '#/components/schemas/ResponseMCPCallArgumentsDeltaStreamEvent'
          response.mcp_call_arguments.done: '#/components/schemas/ResponseMCPCallArgumentsDoneStreamEvent'
          response.mcp_list_tools.completed: '#/components/schemas/ResponseMCPListToolsCompletedStreamEvent'
          response.mcp_list_tools.failed: '#/components/schemas/ResponseMCPListToolsFailedStreamEvent'
          response.mcp_list_tools.in_progress: '#/components/schemas/ResponseMCPListToolsInProgressStreamEvent'
          response.output_item.added: '#/components/schemas/ResponseOutputItemAddedStreamEvent'
          response.output_item.done: '#/components/schemas/ResponseOutputItemDoneStreamEvent'
          response.output_text.annotation.added: '#/components/schemas/ResponseOutputTextAnnotationAddedStreamEvent'
          response.output_text.delta: '#/components/schemas/ResponseOutputTextDeltaStreamEvent'
          response.output_text.done: '#/components/schemas/ResponseOutputTextDoneStreamEvent'
          response.queued: '#/components/schemas/ResponseQueuedStreamEvent'
          response.reasoning.delta: '#/components/schemas/ResponseReasoningDeltaStreamEvent'
          response.reasoning.done: '#/components/schemas/ResponseReasoningDoneStreamEvent'
          response.reasoning_summary_part.added: '#/components/schemas/ResponseReasoningSummaryPartAddedStreamEvent'
          response.reasoning_summary_part.done: '#/components/schemas/ResponseReasoningSummaryPartDoneStreamEvent'
          response.reasoning_summary_text.delta: '#/components/schemas/ResponseReasoningSummaryTextDeltaStreamEvent'
          response.reasoning_summary_text.done: '#/components/schemas/ResponseReasoningSummaryTextDoneStreamEvent'
          response.reasoning_text.delta: '#/components/schemas/ResponseReasoningTextDeltaStreamEvent'
          response.reasoning_text.done: '#/components/schemas/ResponseReasoningTextDoneStreamEvent'
          response.refusal.delta: '#/components/schemas/ResponseRefusalDeltaStreamEvent'
          response.refusal.done: '#/components/schemas/ResponseRefusalDoneStreamEvent'
          response.web_search_call.completed: '#/components/schemas/ResponseWebSearchCallCompletedStreamEvent'
          response.web_search_call.in_progress: '#/components/schemas/ResponseWebSearchCallInProgressStreamEvent'
          response.web_search_call.searching: '#/components/schemas/ResponseWebSearchCallSearchingStreamEvent'
        propertyName: type
      oneOf:
        - $ref: '#/components/schemas/ResponseCreatedStreamEvent'
        - $ref: '#/components/schemas/ResponseQueuedStreamEvent'
        - $ref: '#/components/schemas/ResponseInProgressStreamEvent'
        - $ref: '#/components/schemas/ResponseCompletedStreamEvent'
        - $ref: '#/components/schemas/ResponseFailedStreamEvent'
        - $ref: '#/components/schemas/ResponseIncompleteStreamEvent'
        - $ref: '#/components/schemas/ResponseOutputItemAddedStreamEvent'
        - $ref: '#/components/schemas/ResponseOutputItemDoneStreamEvent'
        - $ref: '#/components/schemas/ResponseContentPartAddedStreamEvent'
        - $ref: '#/components/schemas/ResponseContentPartDoneStreamEvent'
        - $ref: '#/components/schemas/ResponseOutputTextDeltaStreamEvent'
        - $ref: '#/components/schemas/ResponseOutputTextDoneStreamEvent'
        - $ref: '#/components/schemas/ResponseOutputTextAnnotationAddedStreamEvent'
        - $ref: '#/components/schemas/ResponseRefusalDeltaStreamEvent'
        - $ref: '#/components/schemas/ResponseRefusalDoneStreamEvent'
        - $ref: '#/components/schemas/ResponseFunctionCallArgumentsDeltaStreamEvent'
        - $ref: '#/components/schemas/ResponseFunctionCallArgumentsDoneStreamEvent'
        - $ref: '#/components/schemas/ResponseReasoningDeltaStreamEvent'
        - $ref: '#/components/schemas/ResponseReasoningTextDeltaStreamEvent'
        - $ref: '#/components/schemas/ResponseReasoningDoneStreamEvent'
        - $ref: '#/components/schemas/ResponseReasoningTextDoneStreamEvent'
        - $ref: '#/components/schemas/ResponseReasoningSummaryTextDeltaStreamEvent'
        - $ref: '#/components/schemas/ResponseReasoningSummaryTextDoneStreamEvent'
        - $ref: '#/components/schemas/ResponseReasoningSummaryPartAddedStreamEvent'
        - $ref: '#/components/schemas/ResponseReasoningSummaryPartDoneStreamEvent'
        - $ref: '#/components/schemas/ResponseWebSearchCallInProgressStreamEvent'
        - $ref: '#/components/schemas/ResponseWebSearchCallSearchingStreamEvent'
        - $ref: '#/components/schemas/ResponseWebSearchCallCompletedStreamEvent'
        - $ref: '#/components/schemas/ResponseFileSearchCallInProgressStreamEvent'
        - $ref: '#/components/schemas/ResponseFileSearchCallSearchingStreamEvent'
        - $ref: '#/components/schemas/ResponseFileSearchCallCompletedStreamEvent'
        - $ref: >-
            #/components/schemas/ResponseCodeInterpreterCallInProgressStreamEvent
        - $ref: >-
            #/components/schemas/ResponseCodeInterpreterCallInterpretingStreamEvent
        - $ref: '#/components/schemas/ResponseCodeInterpreterCallCompletedStreamEvent'
        - $ref: >-
            #/components/schemas/ResponseImageGenerationCallInProgressStreamEvent
        - $ref: >-
            #/components/schemas/ResponseImageGenerationCallGeneratingStreamEvent
        - $ref: '#/components/schemas/ResponseImageGenerationCallCompletedStreamEvent'
        - $ref: '#/components/schemas/ResponseMCPCallInProgressStreamEvent'
        - $ref: '#/components/schemas/ResponseMCPCallCompletedStreamEvent'
        - $ref: '#/components/schemas/ResponseMCPCallFailedStreamEvent'
        - $ref: '#/components/schemas/ResponseMCPListToolsInProgressStreamEvent'
        - $ref: '#/components/schemas/ResponseMCPListToolsCompletedStreamEvent'
        - $ref: '#/components/schemas/ResponseMCPListToolsFailedStreamEvent'
        - $ref: '#/components/schemas/ResponseCodeInterpreterCallCodeDeltaStreamEvent'
        - $ref: '#/components/schemas/ResponseCodeInterpreterCallCodeDoneStreamEvent'
        - $ref: '#/components/schemas/ResponseMCPCallArgumentsDeltaStreamEvent'
        - $ref: '#/components/schemas/ResponseMCPCallArgumentsDoneStreamEvent'
        - $ref: '#/components/schemas/ResponseCustomToolCallInputDeltaStreamEvent'
        - $ref: '#/components/schemas/ResponseCustomToolCallInputDoneStreamEvent'
        - $ref: >-
            #/components/schemas/ResponseImageGenerationCallPartialImageStreamEvent
        - $ref: '#/components/schemas/ResponseErrorStreamEvent'
      title: Response Stream Event
    LoadBalancerModelConfig:
      additionalProperties: false
      properties:
        model:
          type: string
        weight:
          type: number
          format: double
      required:
        - model
        - weight
      type: object
    InputTokensDetails:
      additionalProperties: false
      properties:
        cache_creation_1h_tokens:
          format: int64
          type: integer
        cache_creation_5m_tokens:
          format: int64
          type: integer
        cache_creation_tokens:
          format: int64
          type: integer
        cache_write_tokens:
          format: int64
          type: integer
        cached_tokens:
          format: int64
          type: integer
      required:
        - cached_tokens
        - cache_write_tokens
        - cache_creation_tokens
      type: object
    OutputTokensDetails:
      additionalProperties: false
      properties:
        reasoning_tokens:
          format: int64
          type: integer
      required:
        - reasoning_tokens
      type: object
    ServerToolUseDetails:
      additionalProperties: false
      properties:
        advisor_requests:
          format: int64
          type: integer
        code_interpreter_sessions:
          format: int64
          type: integer
        datetime_requests:
          format: int64
          type: integer
        fusion_requests:
          format: int64
          type: integer
        image_generation_calls:
          format: int64
          type: integer
        search_models_requests:
          format: int64
          type: integer
        shell_commands:
          format: int64
          type: integer
        subagent_requests:
          format: int64
          type: integer
        web_fetch_requests:
          format: int64
          type: integer
        web_search_requests:
          format: int64
          type: integer
      type: object
    ResponseErrorStreamEvent:
      additionalProperties: true
      description: A `error` server-sent event.
      properties:
        error:
          $ref: '#/components/schemas/ResponseError'
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - error
          type: string
      required:
        - type
        - sequence_number
        - error
      title: Error
      type: object
    ResponseCodeInterpreterCallCompletedStreamEvent:
      additionalProperties: true
      description: A `response.code_interpreter_call.completed` server-sent event.
      properties:
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.code_interpreter_call.completed
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
      title: Code Interpreter Call Completed
      type: object
    ResponseCodeInterpreterCallInProgressStreamEvent:
      additionalProperties: true
      description: A `response.code_interpreter_call.in_progress` server-sent event.
      properties:
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.code_interpreter_call.in_progress
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
      title: Code Interpreter Call In Progress
      type: object
    ResponseCodeInterpreterCallInterpretingStreamEvent:
      additionalProperties: true
      description: A `response.code_interpreter_call.interpreting` server-sent event.
      properties:
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.code_interpreter_call.interpreting
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
      title: Code Interpreter Call Interpreting
      type: object
    ResponseCodeInterpreterCallCodeDeltaStreamEvent:
      additionalProperties: true
      description: A `response.code_interpreter_call_code.delta` server-sent event.
      properties:
        delta:
          description: Incremental text or argument chunk.
          type: string
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.code_interpreter_call_code.delta
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - delta
      title: Code Interpreter Call Code Delta
      type: object
    ResponseCodeInterpreterCallCodeDoneStreamEvent:
      additionalProperties: true
      description: A `response.code_interpreter_call_code.done` server-sent event.
      properties:
        code:
          description: The completed code interpreter code.
          type: string
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.code_interpreter_call_code.done
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - code
      title: Code Interpreter Call Code Done
      type: object
    ResponseCompletedStreamEvent:
      additionalProperties: true
      description: A `response.completed` server-sent event.
      properties:
        response:
          $ref: '#/components/schemas/PublicResponseResource'
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.completed
          type: string
      required:
        - type
        - sequence_number
        - response
      title: Completed
      type: object
    ResponseContentPartAddedStreamEvent:
      additionalProperties: true
      description: A `response.content_part.added` server-sent event.
      properties:
        content_index:
          description: Index of the content part within the output item.
          type: integer
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        part:
          additionalProperties: true
          description: The content part.
          type: object
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.content_part.added
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - content_index
        - part
      title: Content Part Added
      type: object
    ResponseContentPartDoneStreamEvent:
      additionalProperties: true
      description: A `response.content_part.done` server-sent event.
      properties:
        content_index:
          description: Index of the content part within the output item.
          type: integer
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        part:
          additionalProperties: true
          description: The content part.
          type: object
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.content_part.done
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - content_index
        - part
      title: Content Part Done
      type: object
    ResponseCreatedStreamEvent:
      additionalProperties: true
      description: A `response.created` server-sent event.
      properties:
        response:
          $ref: '#/components/schemas/PublicResponseResource'
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.created
          type: string
      required:
        - type
        - sequence_number
        - response
      title: Created
      type: object
    ResponseCustomToolCallInputDeltaStreamEvent:
      additionalProperties: true
      description: A `response.custom_tool_call_input.delta` server-sent event.
      properties:
        delta:
          description: Incremental text or argument chunk.
          type: string
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.custom_tool_call_input.delta
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - delta
      title: Custom Tool Call Input Delta
      type: object
    ResponseCustomToolCallInputDoneStreamEvent:
      additionalProperties: true
      description: A `response.custom_tool_call_input.done` server-sent event.
      properties:
        input:
          description: The completed custom tool call input.
          type: string
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.custom_tool_call_input.done
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - input
      title: Custom Tool Call Input Done
      type: object
    ResponseFailedStreamEvent:
      additionalProperties: true
      description: A `response.failed` server-sent event.
      properties:
        response:
          $ref: '#/components/schemas/PublicResponseResource'
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.failed
          type: string
      required:
        - type
        - sequence_number
        - response
      title: Failed
      type: object
    ResponseFileSearchCallCompletedStreamEvent:
      additionalProperties: true
      description: A `response.file_search_call.completed` server-sent event.
      properties:
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.file_search_call.completed
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
      title: File Search Call Completed
      type: object
    ResponseFileSearchCallInProgressStreamEvent:
      additionalProperties: true
      description: A `response.file_search_call.in_progress` server-sent event.
      properties:
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.file_search_call.in_progress
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
      title: File Search Call In Progress
      type: object
    ResponseFileSearchCallSearchingStreamEvent:
      additionalProperties: true
      description: A `response.file_search_call.searching` server-sent event.
      properties:
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.file_search_call.searching
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
      title: File Search Call Searching
      type: object
    ResponseFunctionCallArgumentsDeltaStreamEvent:
      additionalProperties: true
      description: A `response.function_call_arguments.delta` server-sent event.
      properties:
        delta:
          description: Incremental text or argument chunk.
          type: string
        item_id:
          description: ID of the output item this event refers to.
          type: string
        obfuscation:
          description: Obfuscation padding accompanying the delta, when present.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.function_call_arguments.delta
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - delta
      title: Function Call Arguments Delta
      type: object
    ResponseFunctionCallArgumentsDoneStreamEvent:
      additionalProperties: true
      description: A `response.function_call_arguments.done` server-sent event.
      properties:
        arguments:
          description: The completed function-call arguments JSON.
          type: string
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.function_call_arguments.done
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - arguments
      title: Function Call Arguments Done
      type: object
    ResponseImageGenerationCallCompletedStreamEvent:
      additionalProperties: true
      description: A `response.image_generation_call.completed` server-sent event.
      properties:
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.image_generation_call.completed
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
      title: Image Generation Call Completed
      type: object
    ResponseImageGenerationCallGeneratingStreamEvent:
      additionalProperties: true
      description: A `response.image_generation_call.generating` server-sent event.
      properties:
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.image_generation_call.generating
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
      title: Image Generation Call Generating
      type: object
    ResponseImageGenerationCallInProgressStreamEvent:
      additionalProperties: true
      description: A `response.image_generation_call.in_progress` server-sent event.
      properties:
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.image_generation_call.in_progress
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
      title: Image Generation Call In Progress
      type: object
    ResponseImageGenerationCallPartialImageStreamEvent:
      additionalProperties: true
      description: A `response.image_generation_call.partial_image` server-sent event.
      properties:
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        partial_image_b64:
          description: Base64-encoded partial image.
          type: string
        partial_image_index:
          description: Index of the partial image.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.image_generation_call.partial_image
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - partial_image_b64
        - partial_image_index
      title: Image Generation Call Partial Image
      type: object
    ResponseInProgressStreamEvent:
      additionalProperties: true
      description: A `response.in_progress` server-sent event.
      properties:
        response:
          $ref: '#/components/schemas/PublicResponseResource'
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.in_progress
          type: string
      required:
        - type
        - sequence_number
        - response
      title: In Progress
      type: object
    ResponseIncompleteStreamEvent:
      additionalProperties: true
      description: A `response.incomplete` server-sent event.
      properties:
        response:
          $ref: '#/components/schemas/PublicResponseResource'
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.incomplete
          type: string
      required:
        - type
        - sequence_number
        - response
      title: Incomplete
      type: object
    ResponseMCPCallCompletedStreamEvent:
      additionalProperties: true
      description: A `response.mcp_call.completed` server-sent event.
      properties:
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.mcp_call.completed
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
      title: MCP Call Completed
      type: object
    ResponseMCPCallFailedStreamEvent:
      additionalProperties: true
      description: A `response.mcp_call.failed` server-sent event.
      properties:
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.mcp_call.failed
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
      title: MCP Call Failed
      type: object
    ResponseMCPCallInProgressStreamEvent:
      additionalProperties: true
      description: A `response.mcp_call.in_progress` server-sent event.
      properties:
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.mcp_call.in_progress
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
      title: MCP Call In Progress
      type: object
    ResponseMCPCallArgumentsDeltaStreamEvent:
      additionalProperties: true
      description: A `response.mcp_call_arguments.delta` server-sent event.
      properties:
        delta:
          description: Incremental text or argument chunk.
          type: string
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.mcp_call_arguments.delta
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - delta
      title: MCP Call Arguments Delta
      type: object
    ResponseMCPCallArgumentsDoneStreamEvent:
      additionalProperties: true
      description: A `response.mcp_call_arguments.done` server-sent event.
      properties:
        arguments:
          description: The completed MCP-call arguments JSON.
          type: string
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.mcp_call_arguments.done
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - arguments
      title: MCP Call Arguments Done
      type: object
    ResponseMCPListToolsCompletedStreamEvent:
      additionalProperties: true
      description: A `response.mcp_list_tools.completed` server-sent event.
      properties:
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.mcp_list_tools.completed
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
      title: MCP List Tools Completed
      type: object
    ResponseMCPListToolsFailedStreamEvent:
      additionalProperties: true
      description: A `response.mcp_list_tools.failed` server-sent event.
      properties:
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.mcp_list_tools.failed
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
      title: MCP List Tools Failed
      type: object
    ResponseMCPListToolsInProgressStreamEvent:
      additionalProperties: true
      description: A `response.mcp_list_tools.in_progress` server-sent event.
      properties:
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.mcp_list_tools.in_progress
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
      title: MCP List Tools In Progress
      type: object
    ResponseOutputItemAddedStreamEvent:
      additionalProperties: true
      description: A `response.output_item.added` server-sent event.
      properties:
        item:
          additionalProperties: true
          description: The output item (message, function call, reasoning, etc.).
          type: object
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.output_item.added
          type: string
      required:
        - type
        - sequence_number
        - output_index
        - item
      title: Output Item Added
      type: object
    ResponseOutputItemDoneStreamEvent:
      additionalProperties: true
      description: A `response.output_item.done` server-sent event.
      properties:
        item:
          additionalProperties: true
          description: The output item (message, function call, reasoning, etc.).
          type: object
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.output_item.done
          type: string
      required:
        - type
        - sequence_number
        - output_index
        - item
      title: Output Item Done
      type: object
    ResponseOutputTextAnnotationAddedStreamEvent:
      additionalProperties: true
      description: A `response.output_text.annotation.added` server-sent event.
      properties:
        annotation:
          additionalProperties: true
          description: The annotation added to the output text.
          type: object
        annotation_index:
          description: Index of the annotation within the content part.
          type: integer
        content_index:
          description: Index of the content part within the output item.
          type: integer
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.output_text.annotation.added
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - content_index
        - annotation_index
        - annotation
      title: Output Text Annotation Added
      type: object
    ResponseOutputTextDeltaStreamEvent:
      additionalProperties: true
      description: A `response.output_text.delta` server-sent event.
      properties:
        content_index:
          description: Index of the content part within the output item.
          type: integer
        delta:
          description: Incremental text or argument chunk.
          type: string
        item_id:
          description: ID of the output item this event refers to.
          type: string
        logprobs:
          description: Log probability information for the emitted tokens.
          items:
            type: object
            additionalProperties: true
          type: array
        obfuscation:
          description: Obfuscation padding accompanying the delta, when present.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.output_text.delta
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - content_index
        - delta
        - logprobs
      title: Output Text Delta
      type: object
    ResponseOutputTextDoneStreamEvent:
      additionalProperties: true
      description: A `response.output_text.done` server-sent event.
      properties:
        content_index:
          description: Index of the content part within the output item.
          type: integer
        item_id:
          description: ID of the output item this event refers to.
          type: string
        logprobs:
          description: Log probability information for the emitted tokens.
          items:
            type: object
            additionalProperties: true
          type: array
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        text:
          description: The completed output text.
          type: string
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.output_text.done
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - content_index
        - text
        - logprobs
      title: Output Text Done
      type: object
    ResponseQueuedStreamEvent:
      additionalProperties: true
      description: A `response.queued` server-sent event.
      properties:
        response:
          $ref: '#/components/schemas/PublicResponseResource'
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.queued
          type: string
      required:
        - type
        - sequence_number
        - response
      title: Queued
      type: object
    ResponseReasoningDeltaStreamEvent:
      additionalProperties: true
      description: A `response.reasoning.delta` server-sent event.
      properties:
        content_index:
          description: Index of the content part within the output item.
          type: integer
        delta:
          description: Incremental text or argument chunk.
          type: string
        item_id:
          description: ID of the output item this event refers to.
          type: string
        obfuscation:
          description: Obfuscation padding accompanying the delta, when present.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.reasoning.delta
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - content_index
        - delta
      title: Reasoning Delta
      type: object
    ResponseReasoningDoneStreamEvent:
      additionalProperties: true
      description: A `response.reasoning.done` server-sent event.
      properties:
        content_index:
          description: Index of the content part within the output item.
          type: integer
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        text:
          description: The completed reasoning text.
          type: string
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.reasoning.done
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - content_index
        - text
      title: Reasoning Done
      type: object
    ResponseReasoningSummaryPartAddedStreamEvent:
      additionalProperties: true
      description: A `response.reasoning_summary_part.added` server-sent event.
      properties:
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        part:
          additionalProperties: true
          description: The reasoning summary part.
          type: object
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        summary_index:
          description: Index of the reasoning summary part.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.reasoning_summary_part.added
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - summary_index
        - part
      title: Reasoning Summary Part Added
      type: object
    ResponseReasoningSummaryPartDoneStreamEvent:
      additionalProperties: true
      description: A `response.reasoning_summary_part.done` server-sent event.
      properties:
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        part:
          additionalProperties: true
          description: The reasoning summary part.
          type: object
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        summary_index:
          description: Index of the reasoning summary part.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.reasoning_summary_part.done
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - summary_index
        - part
      title: Reasoning Summary Part Done
      type: object
    ResponseReasoningSummaryTextDeltaStreamEvent:
      additionalProperties: true
      description: A `response.reasoning_summary_text.delta` server-sent event.
      properties:
        delta:
          description: Incremental text or argument chunk.
          type: string
        item_id:
          description: ID of the output item this event refers to.
          type: string
        obfuscation:
          description: Obfuscation padding accompanying the delta, when present.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        summary_index:
          description: Index of the reasoning summary part.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.reasoning_summary_text.delta
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - summary_index
        - delta
      title: Reasoning Summary Text Delta
      type: object
    ResponseReasoningSummaryTextDoneStreamEvent:
      additionalProperties: true
      description: A `response.reasoning_summary_text.done` server-sent event.
      properties:
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        summary_index:
          description: Index of the reasoning summary part.
          type: integer
        text:
          description: The completed reasoning summary text.
          type: string
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.reasoning_summary_text.done
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - summary_index
        - text
      title: Reasoning Summary Text Done
      type: object
    ResponseReasoningTextDeltaStreamEvent:
      additionalProperties: true
      description: A `response.reasoning_text.delta` server-sent event.
      properties:
        content_index:
          description: Index of the content part within the output item.
          type: integer
        delta:
          description: Incremental text or argument chunk.
          type: string
        item_id:
          description: ID of the output item this event refers to.
          type: string
        obfuscation:
          description: Obfuscation padding accompanying the delta, when present.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.reasoning_text.delta
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - content_index
        - delta
      title: Reasoning Text Delta
      type: object
    ResponseReasoningTextDoneStreamEvent:
      additionalProperties: true
      description: A `response.reasoning_text.done` server-sent event.
      properties:
        content_index:
          description: Index of the content part within the output item.
          type: integer
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        text:
          description: The completed reasoning text.
          type: string
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.reasoning_text.done
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - content_index
        - text
      title: Reasoning Text Done
      type: object
    ResponseRefusalDeltaStreamEvent:
      additionalProperties: true
      description: A `response.refusal.delta` server-sent event.
      properties:
        content_index:
          description: Index of the content part within the output item.
          type: integer
        delta:
          description: Incremental text or argument chunk.
          type: string
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.refusal.delta
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - content_index
        - delta
      title: Refusal Delta
      type: object
    ResponseRefusalDoneStreamEvent:
      additionalProperties: true
      description: A `response.refusal.done` server-sent event.
      properties:
        content_index:
          description: Index of the content part within the output item.
          type: integer
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        refusal:
          description: The completed refusal text.
          type: string
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.refusal.done
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
        - content_index
        - refusal
      title: Refusal Done
      type: object
    ResponseWebSearchCallCompletedStreamEvent:
      additionalProperties: true
      description: A `response.web_search_call.completed` server-sent event.
      properties:
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.web_search_call.completed
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
      title: Web Search Call Completed
      type: object
    ResponseWebSearchCallInProgressStreamEvent:
      additionalProperties: true
      description: A `response.web_search_call.in_progress` server-sent event.
      properties:
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.web_search_call.in_progress
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
      title: Web Search Call In Progress
      type: object
    ResponseWebSearchCallSearchingStreamEvent:
      additionalProperties: true
      description: A `response.web_search_call.searching` server-sent event.
      properties:
        item_id:
          description: ID of the output item this event refers to.
          type: string
        output_index:
          description: Index of the output item in the response output array.
          type: integer
        sequence_number:
          description: Monotonically increasing sequence number for ordering events.
          type: integer
        type:
          description: The event type. Discriminates the payload.
          enum:
            - response.web_search_call.searching
          type: string
      required:
        - type
        - sequence_number
        - item_id
        - output_index
      title: Web Search Call Searching
      type: object
    PublicResponseResource:
      additionalProperties: false
      properties:
        background:
          type: boolean
        completed_at:
          format: int64
          type:
            - integer
            - 'null'
        conversation:
          $ref: '#/components/schemas/ConversationParam'
        created_at:
          format: int64
          type: integer
        error:
          anyOf:
            - $ref: '#/components/schemas/ResponseError'
            - type: 'null'
        frequency_penalty:
          type: number
          format: double
        id:
          type: string
        incomplete_details:
          anyOf:
            - $ref: '#/components/schemas/IncompleteDetails'
            - type: 'null'
        input:
          description: Array of input items (messages, function call outputs, etc.)
          items: {}
          type:
            - array
            - 'null'
        instructions:
          type:
            - string
            - 'null'
        max_output_tokens:
          format: int64
          type:
            - integer
            - 'null'
        max_tool_calls:
          format: int64
          type:
            - integer
            - 'null'
        memory:
          $ref: '#/components/schemas/MemoryParam'
        metadata:
          additionalProperties:
            type: string
          description: >-
            Developer-defined key-value pairs attached to the response (OpenAI
            spec: Map<string, string>).
          type: object
        model:
          type: string
        object:
          description: Always "response"
          type: string
        output:
          description: Array of output items (messages, function calls, reasoning, etc.)
          items: {}
          type:
            - array
            - 'null'
        parallel_tool_calls:
          type: boolean
        presence_penalty:
          type: number
          format: double
        previous_response_id:
          type:
            - string
            - 'null'
        prompt_cache_key:
          type:
            - string
            - 'null'
        prompt_cache_options:
          anyOf:
            - $ref: '#/components/schemas/OpenAIPromptCacheOptions'
            - type: 'null'
        prompt_cache_retention:
          type:
            - string
            - 'null'
        reasoning:
          anyOf:
            - $ref: '#/components/schemas/Reasoning'
            - type: 'null'
        safety_identifier:
          type:
            - string
            - 'null'
        service_tier:
          enum:
            - auto
            - default
            - flex
            - fast
            - scale
            - priority
          type: string
        status:
          enum:
            - queued
            - in_progress
            - completed
            - failed
            - incomplete
          type: string
        store:
          type: boolean
        telemetry:
          $ref: '#/components/schemas/ResponseTelemetry'
          description: OpenTelemetry trace and span identifiers for this response.
        temperature:
          type: number
          format: double
        text:
          description: Text output configuration including format and verbosity
        tool_choice:
          description: >-
            Tool choice setting: "auto", "none", "required", or a specific
            function
        tools:
          description: Array of tool configurations used in this response
          items: {}
          type:
            - array
            - 'null'
        top_k:
          description: >-
            Only sample from the top K options for each subsequent token.
            Present only when set on the request.
          format: int64
          type: integer
        top_logprobs:
          format: int64
          type: integer
        top_p:
          type: number
          format: double
        truncation:
          enum:
            - disabled
            - auto
          type: string
        usage:
          anyOf:
            - $ref: '#/components/schemas/PublicUsage'
            - type: 'null'
        user:
          type:
            - string
            - 'null'
        variables:
          type: object
          additionalProperties: {}
      required:
        - id
        - object
        - created_at
        - completed_at
        - status
        - incomplete_details
        - model
        - previous_response_id
        - instructions
        - input
        - output
        - error
        - tools
        - tool_choice
        - temperature
        - top_p
        - presence_penalty
        - frequency_penalty
        - top_logprobs
        - max_output_tokens
        - max_tool_calls
        - reasoning
        - text
        - user
        - usage
        - truncation
        - parallel_tool_calls
        - store
        - background
        - metadata
        - service_tier
        - safety_identifier
        - prompt_cache_key
        - prompt_cache_retention
        - prompt_cache_options
      type: object
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.