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

# Create a response



## OpenAPI

````yaml POST /v1/responses
openapi: 3.1.0
info:
  title: Antara API
  version: 1.0.0
  description: OpenAI- and Anthropic-compatible inference plus organization management.
servers:
  - url: https://api.antarah.dev
security: []
paths:
  /v1/responses:
    post:
      summary: >-
        Create a model response (OpenAI Responses, stateless); `stream: true`
        answers with `response.*` server-sent events
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResponseRequest'
      responses:
        '200':
          description: >-
            `application/json` when `stream` is false; otherwise
            `text/event-stream`: `event: <type>` + `data:
            <ResponseStreamEvent>`, ending with `response.completed` or
            `response.incomplete` (`response.failed` on a failure after the
            headers)
          headers:
            x-request-id:
              schema:
                type: string
                description: Request ID (`req_…`); also sent as `request-id`
              required: false
              description: Request ID (`req_…`); also sent as `request-id`
            ratelimit-policy:
              schema:
                type: string
                description: e.g. `"rpm";q=60;w=60` (02 §8)
              required: false
              description: e.g. `"rpm";q=60;w=60` (02 §8)
            ratelimit:
              schema:
                type: string
                description: Scope closest to exhaustion, e.g. `"rpm";r=59;t=42`
              required: false
              description: Scope closest to exhaustion, e.g. `"rpm";r=59;t=42`
            x-ratelimit-limit-requests:
              schema:
                type: string
                description: RPM of the scope closest to exhaustion
              required: false
              description: RPM of the scope closest to exhaustion
            x-ratelimit-remaining-requests:
              schema:
                type: string
                description: Requests left in the window
              required: false
              description: Requests left in the window
            x-ratelimit-reset-requests:
              schema:
                type: string
                description: Duration, e.g. `"1s"`, `"6m0s"`
              required: false
              description: Duration, e.g. `"1s"`, `"6m0s"`
            x-ratelimit-limit-tokens:
              schema:
                type: string
                description: TPM of the scope closest to exhaustion
              required: false
              description: TPM of the scope closest to exhaustion
            x-ratelimit-remaining-tokens:
              schema:
                type: string
                description: Tokens left in the window
              required: false
              description: Tokens left in the window
            x-ratelimit-reset-tokens:
              schema:
                type: string
                description: Duration
              required: false
              description: Duration
            x-antara-policy-action:
              schema:
                type: string
                description: >-
                  `blocked` when an enforcing policy refused before the headers
                  were sent (02 §9.7)
              required: false
              description: >-
                `blocked` when an enforcing policy refused before the headers
                were sent (02 §9.7)
            deprecation:
              schema:
                type: string
                description: 'Deprecated model: `@<unix>` (RFC 9745)'
              required: false
              description: 'Deprecated model: `@<unix>` (RFC 9745)'
            sunset:
              schema:
                type: string
                description: 'Deprecated model: HTTP-date (RFC 8594)'
              required: false
              description: 'Deprecated model: HTTP-date (RFC 8594)'
            link:
              schema:
                type: string
                description: 'Deprecated model: `<docs>; rel="deprecation"`'
              required: false
              description: 'Deprecated model: `<docs>; rel="deprecation"`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/ResponseStreamEvent'
        '400':
          description: '`context_length_exceeded`, `unknown_policy`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIError'
        '402':
          description: '`insufficient_credits`, `spend_limit_reached`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIError'
        '502':
          description: '`upstream_error`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIError'
        '503':
          description: '`upstream_unavailable`, `policy_evaluation_unavailable`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIError'
        '504':
          description: '`upstream_timeout`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIError'
        default:
          description: OpenAI-shaped error (02 §4.1)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIError'
      security:
        - projectKey: []
        - session: []
components:
  schemas:
    ResponseRequest:
      type: object
      properties:
        model:
          type: string
          minLength: 1
          description: Public model ID, e.g. `a1` (A-05)
          example: a1
        input:
          anyOf:
            - type: string
            - type: array
              items:
                anyOf:
                  - type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - message
                      role:
                        type: string
                        enum:
                          - user
                          - system
                          - developer
                      content:
                        anyOf:
                          - type: string
                          - type: array
                            items:
                              oneOf:
                                - type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - input_text
                                    text:
                                      type: string
                                  required:
                                    - type
                                    - text
                                - type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - input_image
                                    image_url:
                                      type: string
                                    detail:
                                      type:
                                        - string
                                        - 'null'
                                      enum:
                                        - auto
                                        - low
                                        - high
                                        - null
                                  required:
                                    - type
                                    - image_url
                                - type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - input_file
                                  required:
                                    - type
                                  description: 'Rejected: `400 unsupported_modality`'
                                - type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - input_audio
                                  required:
                                    - type
                                  description: 'Rejected: `400 unsupported_modality`'
                            minItems: 1
                    required:
                      - role
                      - content
                  - type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - message
                      role:
                        type: string
                        enum:
                          - assistant
                      content:
                        anyOf:
                          - type: string
                          - type: array
                            items:
                              oneOf:
                                - type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - output_text
                                    text:
                                      type: string
                                  required:
                                    - type
                                    - text
                                - type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - refusal
                                    refusal:
                                      type: string
                                  required:
                                    - type
                                    - refusal
                                - type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - input_text
                                    text:
                                      type: string
                                  required:
                                    - type
                                    - text
                    required:
                      - role
                      - content
                  - type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - function_call
                      call_id:
                        type: string
                        minLength: 1
                      name:
                        type: string
                        minLength: 1
                      arguments:
                        type: string
                    required:
                      - type
                      - call_id
                      - name
                      - arguments
                  - type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - function_call_output
                      call_id:
                        type: string
                        minLength: 1
                      output:
                        anyOf:
                          - type: string
                          - type: array
                            items:
                              oneOf:
                                - type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - input_text
                                    text:
                                      type: string
                                  required:
                                    - type
                                    - text
                                - type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - input_image
                                    image_url:
                                      type: string
                                    detail:
                                      type:
                                        - string
                                        - 'null'
                                      enum:
                                        - auto
                                        - low
                                        - high
                                        - null
                                  required:
                                    - type
                                    - image_url
                    required:
                      - type
                      - call_id
                      - output
                  - type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - reasoning
                      id:
                        type: string
                      summary:
                        type: array
                        items:
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - summary_text
                            text:
                              type: string
                          required:
                            - type
                            - text
                      encrypted_content:
                        type:
                          - string
                          - 'null'
                    required:
                      - type
                      - summary
                  - type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - item_reference
                    required:
                      - type
              minItems: 1
              maxItems: 10000
        instructions:
          type:
            - string
            - 'null'
        max_output_tokens:
          type:
            - integer
            - 'null'
          minimum: 1
          description: 1…the model's `max_output_tokens`
        temperature:
          type:
            - number
            - 'null'
          minimum: 0
          maximum: 2
        top_p:
          type:
            - number
            - 'null'
          minimum: 0
          maximum: 1
        tools:
          type:
            - array
            - 'null'
          items:
            oneOf:
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - function
                  name:
                    type: string
                    minLength: 1
                  description:
                    type:
                      - string
                      - 'null'
                  parameters:
                    type:
                      - object
                      - 'null'
                    additionalProperties: {}
                  strict:
                    type:
                      - boolean
                      - 'null'
                required:
                  - type
                  - name
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - web_search
                required:
                  - type
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - web_search_preview
                required:
                  - type
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - file_search
                required:
                  - type
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - code_interpreter
                required:
                  - type
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - computer_use_preview
                required:
                  - type
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - image_generation
                required:
                  - type
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - mcp
                required:
                  - type
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - local_shell
                required:
                  - type
          maxItems: 128
        tool_choice:
          anyOf:
            - type: string
              enum:
                - none
                - auto
                - required
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - function
                name:
                  type: string
                  minLength: 1
              required:
                - type
                - name
            - type: 'null'
        parallel_tool_calls:
          type:
            - boolean
            - 'null'
        max_tool_calls:
          type:
            - integer
            - 'null'
          minimum: 1
        reasoning:
          type:
            - object
            - 'null'
          properties:
            effort:
              type:
                - string
                - 'null'
              enum:
                - none
                - minimal
                - low
                - medium
                - high
                - xhigh
                - max
                - null
          description: '`effort` must be one of the model''s `reasoning_efforts`'
        text:
          type:
            - object
            - 'null'
          properties:
            format:
              oneOf:
                - type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - text
                  required:
                    - type
                - type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - json_object
                  required:
                    - type
                - type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - json_schema
                    name:
                      type: string
                      minLength: 1
                    description:
                      type:
                        - string
                        - 'null'
                    schema:
                      type: object
                      additionalProperties: {}
                    strict:
                      type:
                        - boolean
                        - 'null'
                  required:
                    - type
                    - name
                    - schema
        truncation:
          type:
            - string
            - 'null'
          enum:
            - auto
            - disabled
            - null
        prompt_cache_key:
          type:
            - string
            - 'null'
          minLength: 0
          maxLength: 512
        include:
          type:
            - array
            - 'null'
          items:
            type: string
        stream:
          type:
            - boolean
            - 'null'
          description: Default `false`
        include_reasoning:
          type:
            - boolean
            - 'null'
          description: '`false` strips reasoning items from the output'
        policy_ids:
          type:
            - array
            - 'null'
          items:
            type: string
            minLength: 1
            maxLength: 120
          maxItems: 20
          description: 'Antara extension: published policies to add for this request'
        background:
          type:
            - boolean
            - 'null'
          description: Only `false`
        store:
          type:
            - boolean
            - 'null'
          description: 'Always treated as `false`; the response echoes `store: false`'
        metadata:
          type:
            - object
            - 'null'
          additionalProperties:
            type: string
        user:
          type:
            - string
            - 'null'
          minLength: 0
          maxLength: 512
        safety_identifier:
          type:
            - string
            - 'null'
          minLength: 0
          maxLength: 64
        service_tier:
          type:
            - string
            - 'null'
        client_metadata:
          type:
            - object
            - 'null'
          additionalProperties: {}
      required:
        - model
        - input
      additionalProperties: false
      description: >-
        Rejected with `400 unsupported_parameter`: `previous_response_id`,
        `conversation`, `background: true`, built-in tools, `include` values
        other than the two listed, item references, and any field not listed
        here.
    Response:
      type: object
      properties:
        id:
          type: string
          pattern: ^resp_[0-9a-f]{32}$
          example: resp_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f
        object:
          type: string
          enum:
            - response
        created_at:
          type: integer
          description: Unix seconds
          example: 1793750400
        status:
          type: string
          enum:
            - in_progress
            - completed
            - incomplete
            - failed
        error:
          type:
            - object
            - 'null'
          properties:
            code:
              type: string
            message:
              type: string
          required:
            - code
            - message
        incomplete_details:
          type:
            - object
            - 'null'
          properties:
            reason:
              type: string
          required:
            - reason
        instructions:
          type:
            - string
            - 'null'
        max_output_tokens:
          type:
            - integer
            - 'null'
        max_tool_calls:
          type:
            - integer
            - 'null'
        model:
          type: string
          example: a1
        output:
          type: array
          items:
            $ref: '#/components/schemas/ResponseOutputItem'
        parallel_tool_calls:
          type: boolean
        previous_response_id:
          type: 'null'
        reasoning:
          type: object
          properties:
            effort:
              type:
                - string
                - 'null'
              enum:
                - none
                - minimal
                - low
                - medium
                - high
                - xhigh
                - max
                - null
            summary:
              type: 'null'
          required:
            - effort
            - summary
        store:
          type: boolean
          enum:
            - false
        temperature:
          type:
            - number
            - 'null'
        text:
          type: object
          properties:
            format:
              oneOf:
                - type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - text
                  required:
                    - type
                - type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - json_object
                  required:
                    - type
                - type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - json_schema
                    name:
                      type: string
                      minLength: 1
                    description:
                      type:
                        - string
                        - 'null'
                    schema:
                      type: object
                      additionalProperties: {}
                    strict:
                      type:
                        - boolean
                        - 'null'
                  required:
                    - type
                    - name
                    - schema
          required:
            - format
        tool_choice:
          anyOf:
            - type: string
              enum:
                - none
                - auto
                - required
            - type: object
              properties:
                type:
                  type: string
                  enum:
                    - function
                name:
                  type: string
              required:
                - type
                - name
        tools:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                enum:
                  - function
              name:
                type: string
                minLength: 1
              description:
                type:
                  - string
                  - 'null'
              parameters:
                type:
                  - object
                  - 'null'
                additionalProperties: {}
              strict:
                type:
                  - boolean
                  - 'null'
            required:
              - type
              - name
        top_p:
          type:
            - number
            - 'null'
        truncation:
          type: string
          enum:
            - auto
            - disabled
        usage:
          $ref: '#/components/schemas/ResponseUsage'
        metadata:
          type: object
          additionalProperties:
            type: string
        user:
          type:
            - string
            - 'null'
      required:
        - id
        - object
        - created_at
        - status
        - error
        - incomplete_details
        - instructions
        - max_output_tokens
        - max_tool_calls
        - model
        - output
        - parallel_tool_calls
        - previous_response_id
        - reasoning
        - store
        - temperature
        - text
        - tool_choice
        - tools
        - top_p
        - truncation
        - usage
        - metadata
        - user
    ResponseStreamEvent:
      oneOf:
        - type: object
          properties:
            type:
              type: string
              enum:
                - response.output_text.delta
            sequence_number:
              type: integer
            item_id:
              type: string
            output_index:
              type: integer
            content_index:
              type: integer
            delta:
              type: string
            logprobs:
              type: array
              items:
                type: object
                properties:
                  token:
                    type: string
                  logprob:
                    type: number
                  bytes:
                    type:
                      - array
                      - 'null'
                    items:
                      type: integer
                  top_logprobs:
                    type: array
                    items:
                      type: object
                      properties:
                        token:
                          type: string
                        logprob:
                          type: number
                        bytes:
                          type:
                            - array
                            - 'null'
                          items:
                            type: integer
                      required:
                        - token
                        - logprob
                        - bytes
                required:
                  - token
                  - logprob
                  - bytes
                  - top_logprobs
          required:
            - type
            - sequence_number
            - item_id
            - output_index
            - content_index
            - delta
            - logprobs
        - type: object
          properties:
            type:
              type: string
              enum:
                - response.created
            sequence_number:
              type: integer
            response:
              $ref: '#/components/schemas/Response'
          required:
            - type
            - sequence_number
            - response
        - type: object
          properties:
            type:
              type: string
              enum:
                - response.in_progress
            sequence_number:
              type: integer
            response:
              $ref: '#/components/schemas/Response'
          required:
            - type
            - sequence_number
            - response
        - type: object
          properties:
            type:
              type: string
              enum:
                - response.completed
            sequence_number:
              type: integer
            response:
              $ref: '#/components/schemas/Response'
          required:
            - type
            - sequence_number
            - response
        - type: object
          properties:
            type:
              type: string
              enum:
                - response.incomplete
            sequence_number:
              type: integer
            response:
              $ref: '#/components/schemas/Response'
          required:
            - type
            - sequence_number
            - response
        - type: object
          properties:
            type:
              type: string
              enum:
                - response.failed
            sequence_number:
              type: integer
            response:
              $ref: '#/components/schemas/Response'
          required:
            - type
            - sequence_number
            - response
        - type: object
          properties:
            type:
              type: string
              enum:
                - response.output_item.added
            sequence_number:
              type: integer
            output_index:
              type: integer
            item:
              $ref: '#/components/schemas/ResponseOutputItem'
          required:
            - type
            - sequence_number
            - output_index
            - item
        - type: object
          properties:
            type:
              type: string
              enum:
                - response.output_item.done
            sequence_number:
              type: integer
            output_index:
              type: integer
            item:
              $ref: '#/components/schemas/ResponseOutputItem'
          required:
            - type
            - sequence_number
            - output_index
            - item
        - type: object
          properties:
            type:
              type: string
              enum:
                - response.content_part.added
            sequence_number:
              type: integer
            item_id:
              type: string
            output_index:
              type: integer
            content_index:
              type: integer
            part:
              anyOf:
                - type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - output_text
                    text:
                      type: string
                    annotations:
                      type: array
                      items: {}
                      maxItems: 0
                      description: Always empty (no built-in tools)
                    logprobs:
                      type: array
                      items:
                        type: object
                        properties:
                          token:
                            type: string
                          logprob:
                            type: number
                          bytes:
                            type:
                              - array
                              - 'null'
                            items:
                              type: integer
                          top_logprobs:
                            type: array
                            items:
                              type: object
                              properties:
                                token:
                                  type: string
                                logprob:
                                  type: number
                                bytes:
                                  type:
                                    - array
                                    - 'null'
                                  items:
                                    type: integer
                              required:
                                - token
                                - logprob
                                - bytes
                        required:
                          - token
                          - logprob
                          - bytes
                          - top_logprobs
                  required:
                    - type
                    - text
                    - annotations
                - type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - refusal
                    refusal:
                      type: string
                  required:
                    - type
                    - refusal
                - type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - reasoning_text
                    text:
                      type: string
                  required:
                    - type
                    - text
          required:
            - type
            - sequence_number
            - item_id
            - output_index
            - content_index
            - part
        - type: object
          properties:
            type:
              type: string
              enum:
                - response.content_part.done
            sequence_number:
              type: integer
            item_id:
              type: string
            output_index:
              type: integer
            content_index:
              type: integer
            part:
              anyOf:
                - type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - output_text
                    text:
                      type: string
                    annotations:
                      type: array
                      items: {}
                      maxItems: 0
                      description: Always empty (no built-in tools)
                    logprobs:
                      type: array
                      items:
                        type: object
                        properties:
                          token:
                            type: string
                          logprob:
                            type: number
                          bytes:
                            type:
                              - array
                              - 'null'
                            items:
                              type: integer
                          top_logprobs:
                            type: array
                            items:
                              type: object
                              properties:
                                token:
                                  type: string
                                logprob:
                                  type: number
                                bytes:
                                  type:
                                    - array
                                    - 'null'
                                  items:
                                    type: integer
                              required:
                                - token
                                - logprob
                                - bytes
                        required:
                          - token
                          - logprob
                          - bytes
                          - top_logprobs
                  required:
                    - type
                    - text
                    - annotations
                - type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - refusal
                    refusal:
                      type: string
                  required:
                    - type
                    - refusal
                - type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - reasoning_text
                    text:
                      type: string
                  required:
                    - type
                    - text
          required:
            - type
            - sequence_number
            - item_id
            - output_index
            - content_index
            - part
        - type: object
          properties:
            type:
              type: string
              enum:
                - response.output_text.done
            sequence_number:
              type: integer
            item_id:
              type: string
            output_index:
              type: integer
            content_index:
              type: integer
            text:
              type: string
            logprobs:
              type: array
              items:
                type: object
                properties:
                  token:
                    type: string
                  logprob:
                    type: number
                  bytes:
                    type:
                      - array
                      - 'null'
                    items:
                      type: integer
                  top_logprobs:
                    type: array
                    items:
                      type: object
                      properties:
                        token:
                          type: string
                        logprob:
                          type: number
                        bytes:
                          type:
                            - array
                            - 'null'
                          items:
                            type: integer
                      required:
                        - token
                        - logprob
                        - bytes
                required:
                  - token
                  - logprob
                  - bytes
                  - top_logprobs
          required:
            - type
            - sequence_number
            - item_id
            - output_index
            - content_index
            - text
            - logprobs
        - type: object
          properties:
            type:
              type: string
              enum:
                - response.refusal.delta
            sequence_number:
              type: integer
            item_id:
              type: string
            output_index:
              type: integer
            content_index:
              type: integer
            delta:
              type: string
          required:
            - type
            - sequence_number
            - item_id
            - output_index
            - content_index
            - delta
        - type: object
          properties:
            type:
              type: string
              enum:
                - response.refusal.done
            sequence_number:
              type: integer
            item_id:
              type: string
            output_index:
              type: integer
            content_index:
              type: integer
            refusal:
              type: string
          required:
            - type
            - sequence_number
            - item_id
            - output_index
            - content_index
            - refusal
        - type: object
          properties:
            type:
              type: string
              enum:
                - response.function_call_arguments.delta
            sequence_number:
              type: integer
            item_id:
              type: string
            output_index:
              type: integer
            delta:
              type: string
          required:
            - type
            - sequence_number
            - item_id
            - output_index
            - delta
        - type: object
          properties:
            type:
              type: string
              enum:
                - response.function_call_arguments.done
            sequence_number:
              type: integer
            item_id:
              type: string
            output_index:
              type: integer
            arguments:
              type: string
          required:
            - type
            - sequence_number
            - item_id
            - output_index
            - arguments
        - type: object
          properties:
            type:
              type: string
              enum:
                - response.reasoning_summary_part.added
            sequence_number:
              type: integer
            item_id:
              type: string
            output_index:
              type: integer
            summary_index:
              type: integer
            part:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - summary_text
                text:
                  type: string
              required:
                - type
                - text
          required:
            - type
            - sequence_number
            - item_id
            - output_index
            - summary_index
            - part
        - type: object
          properties:
            type:
              type: string
              enum:
                - response.reasoning_summary_part.done
            sequence_number:
              type: integer
            item_id:
              type: string
            output_index:
              type: integer
            summary_index:
              type: integer
            part:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - summary_text
                text:
                  type: string
              required:
                - type
                - text
          required:
            - type
            - sequence_number
            - item_id
            - output_index
            - summary_index
            - part
        - type: object
          properties:
            type:
              type: string
              enum:
                - response.reasoning_summary_text.delta
            sequence_number:
              type: integer
            item_id:
              type: string
            output_index:
              type: integer
            summary_index:
              type: integer
            delta:
              type: string
          required:
            - type
            - sequence_number
            - item_id
            - output_index
            - summary_index
            - delta
        - type: object
          properties:
            type:
              type: string
              enum:
                - response.reasoning_summary_text.done
            sequence_number:
              type: integer
            item_id:
              type: string
            output_index:
              type: integer
            summary_index:
              type: integer
            text:
              type: string
          required:
            - type
            - sequence_number
            - item_id
            - output_index
            - summary_index
            - text
        - type: object
          properties:
            type:
              type: string
              enum:
                - response.reasoning_text.delta
            sequence_number:
              type: integer
            item_id:
              type: string
            output_index:
              type: integer
            content_index:
              type: integer
            delta:
              type: string
          required:
            - type
            - sequence_number
            - item_id
            - output_index
            - content_index
            - delta
        - type: object
          properties:
            type:
              type: string
              enum:
                - response.reasoning_text.done
            sequence_number:
              type: integer
            item_id:
              type: string
            output_index:
              type: integer
            content_index:
              type: integer
            text:
              type: string
          required:
            - type
            - sequence_number
            - item_id
            - output_index
            - content_index
            - text
    OpenAIError:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
              example: invalid_request_error
            param:
              type:
                - string
                - 'null'
            code:
              type: string
              example: invalid_api_key
            request_id:
              type: string
          required:
            - message
            - type
            - param
            - code
            - request_id
      required:
        - error
    ResponseOutputItem:
      oneOf:
        - type: object
          properties:
            type:
              type: string
              enum:
                - message
            id:
              type: string
            status:
              type: string
              enum:
                - in_progress
                - completed
                - incomplete
            role:
              type: string
              enum:
                - assistant
            content:
              type: array
              items:
                oneOf:
                  - type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - output_text
                      text:
                        type: string
                      annotations:
                        type: array
                        items: {}
                        maxItems: 0
                        description: Always empty (no built-in tools)
                      logprobs:
                        type: array
                        items:
                          type: object
                          properties:
                            token:
                              type: string
                            logprob:
                              type: number
                            bytes:
                              type:
                                - array
                                - 'null'
                              items:
                                type: integer
                            top_logprobs:
                              type: array
                              items:
                                type: object
                                properties:
                                  token:
                                    type: string
                                  logprob:
                                    type: number
                                  bytes:
                                    type:
                                      - array
                                      - 'null'
                                    items:
                                      type: integer
                                required:
                                  - token
                                  - logprob
                                  - bytes
                          required:
                            - token
                            - logprob
                            - bytes
                            - top_logprobs
                    required:
                      - type
                      - text
                      - annotations
                  - type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - refusal
                      refusal:
                        type: string
                    required:
                      - type
                      - refusal
          required:
            - type
            - id
            - status
            - role
            - content
        - type: object
          properties:
            type:
              type: string
              enum:
                - reasoning
            id:
              type: string
            summary:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - summary_text
                  text:
                    type: string
                required:
                  - type
                  - text
            content:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - reasoning_text
                  text:
                    type: string
                required:
                  - type
                  - text
            encrypted_content:
              type:
                - string
                - 'null'
            status:
              type: string
              enum:
                - in_progress
                - completed
                - incomplete
          required:
            - type
            - id
            - summary
        - type: object
          properties:
            type:
              type: string
              enum:
                - function_call
            id:
              type: string
            call_id:
              type: string
            name:
              type: string
            arguments:
              type: string
            status:
              type: string
              enum:
                - in_progress
                - completed
                - incomplete
          required:
            - type
            - id
            - call_id
            - name
            - arguments
            - status
    ResponseUsage:
      type:
        - object
        - 'null'
      properties:
        input_tokens:
          type: integer
        input_tokens_details:
          type: object
          properties:
            cached_tokens:
              type: integer
          required:
            - cached_tokens
        output_tokens:
          type: integer
        output_tokens_details:
          type: object
          properties:
            reasoning_tokens:
              type: integer
          required:
            - reasoning_tokens
        total_tokens:
          type: integer
      required:
        - input_tokens
        - input_tokens_details
        - output_tokens
        - output_tokens_details
        - total_tokens
  securitySchemes:
    projectKey:
      type: http
      scheme: bearer
      description: '`ak_…` project API key (or `x-api-key`)'
    session:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Supabase access token + `Antara-Organization` (management) or
        `Antara-Project` (inference)

````

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