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

# Responses API

> OpenAI Responses API relayed by Omniall AI.

**Base path:** `POST https://api.omniall.ai/v1/responses`

Prefer this format for newer OpenAI models, built-in tools (web search), and multi-turn `previous_response_id` flows.

### Scenarios
- **Vision / files**: `input` items `input_image` / `input_file`
- **Web search**: built-in tool `{ "type": "web_search_preview" }`
- **Agent**: function tools in `tools`
- **Reasoning**: `reasoning.effort`

Official reference: https://platform.openai.com/docs/api-reference/responses




## OpenAPI

````yaml openapi/xgapi-public.yaml POST /v1/responses
openapi: 3.0.3
info:
  title: Omniall AI Public API
  description: >-
    Omniall AI public API. Website: https://omniall.ai — API host:
    https://api.omniall.ai — Model Square: https://omniall.ai/pricing
  version: 1.1.0
servers:
  - url: https://api.omniall.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Models
    description: List models available to your API key.
  - name: ChatGPT Chat Completions
    x-group: ChatGPT
    description: OpenAI Chat Completions (`POST /v1/chat/completions`).
  - name: Responses
    description: OpenAI Responses API (`POST /v1/responses`).
  - name: Claude
    description: Anthropic Messages API (`POST /v1/messages`).
  - name: Gemini
    description: Google Gemini generateContent / streamGenerateContent.
  - name: Images
    description: >-
      Image generation (OpenAI Images), vendor guides, and Midjourney proxy
      APIs.
  - name: Video
    description: Async video tasks.
  - name: Audio
    description: Speech and related audio APIs.
  - name: Rerank
    description: Document reranking.
paths:
  /v1/responses:
    post:
      tags:
        - Responses
      summary: Responses API
      description: >
        OpenAI Responses API relayed by Omniall AI.


        **Base path:** `POST https://api.omniall.ai/v1/responses`


        Prefer this format for newer OpenAI models, built-in tools (web search),
        and multi-turn `previous_response_id` flows.


        ### Scenarios

        - **Vision / files**: `input` items `input_image` / `input_file`

        - **Web search**: built-in tool `{ "type": "web_search_preview" }`

        - **Agent**: function tools in `tools`

        - **Reasoning**: `reasoning.effort`


        Official reference:
        https://platform.openai.com/docs/api-reference/responses
      operationId: createResponse
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResponsesRequest'
            examples:
              basic:
                summary: Basic Responses
                value:
                  model: gpt-5
                  input: Explain Kubernetes in one paragraph
              vision:
                summary: Image input
                value:
                  model: gpt-5
                  input:
                    - role: user
                      content:
                        - type: input_text
                          text: Describe this image
                        - type: input_image
                          image_url: https://example.com/photo.jpg
              file:
                summary: File analysis
                value:
                  model: gpt-5
                  input:
                    - role: user
                      content:
                        - type: input_text
                          text: Extract key risks from this document
                        - type: input_file
                          file_url: https://example.com/report.pdf
              web_search:
                summary: Built-in web search tool
                value:
                  model: gpt-5
                  tools:
                    - type: web_search_preview
                  input: Latest release notes for OpenAI Responses API
              agent:
                summary: Agent with function tool
                value:
                  model: gpt-5
                  tools:
                    - type: function
                      name: lookup_order
                      description: Lookup order by id
                      parameters:
                        type: object
                        properties:
                          order_id:
                            type: string
                        required:
                          - order_id
                  input: Where is order A100?
              reasoning:
                summary: Reasoning effort
                value:
                  model: gpt-5
                  reasoning:
                    effort: medium
                    summary: auto
                  input: Prove that there are infinitely many primes
      responses:
        '200':
          description: Response object (or SSE events when streaming).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponsesResponse'
        '400':
          description: Invalid request body or unsupported parameter for the model.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
              example:
                error:
                  message: '无效的令牌 (request id: ...)'
                  type: new_api_error
                  code: ''
        '403':
          description: Forbidden (banned user, IP allowlist, group access).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
        '429':
          description: Rate limited.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
        '500':
          description: Upstream or gateway internal error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
components:
  schemas:
    ResponsesRequest:
      type: object
      required:
        - model
      description: >-
        OpenAI Responses API request (`POST /v1/responses`). Prefer this for
        newer OpenAI models and built-in tools.
      properties:
        model:
          type: string
          example: gpt-5
          description: Model id from Model Square.
        input:
          description: >-
            User input: a plain string, or an array of items/parts
            (`input_text`, `input_image`, `input_file`, etc.).
          oneOf:
            - type: string
            - type: array
              items:
                type: object
                additionalProperties: true
        instructions:
          type: string
          description: >-
            System-level instructions for this response (similar to a system
            prompt).
        max_output_tokens:
          type: integer
          description: Maximum tokens the model may generate.
        temperature:
          type: number
          description: Sampling temperature.
        top_p:
          type: number
          description: Nucleus sampling parameter.
        stream:
          type: boolean
          description: If true, stream response events over SSE.
        stream_options:
          type: object
          additionalProperties: true
          description: Streaming options passthrough.
        tools:
          type: array
          description: >-
            Built-in tools (e.g. `{ "type": "web_search_preview" }`) and/or
            function tools for agents.
          items:
            type: object
            additionalProperties: true
        tool_choice:
          oneOf:
            - type: string
            - type: object
              additionalProperties: true
          description: How tools are selected (`auto`, required, or specific tool).
        parallel_tool_calls:
          oneOf:
            - type: boolean
            - type: object
          description: Allow multiple tool calls in one turn when supported.
        max_tool_calls:
          type: integer
          description: Cap on tool calls for this response.
        previous_response_id:
          type: string
          description: >-
            Continue from a prior response id (multi-turn without resending full
            history).
        conversation:
          type: object
          additionalProperties: true
          description: Conversation object/id when using Responses conversation state.
        reasoning:
          type: object
          properties:
            effort:
              type: string
              enum:
                - low
                - medium
                - high
              description: 'How much reasoning effort to spend: `low` / `medium` / `high`.'
            summary:
              type: string
              description: Whether/how to return a reasoning summary.
          description: Reasoning controls for reasoning models.
        text:
          type: object
          additionalProperties: true
          description: >-
            Text format configuration (including structured output / json_schema
            when supported).
        include:
          type: array
          items:
            type: string
          description: Extra fields to include in the response payload.
        truncation:
          type: string
          enum:
            - auto
            - disabled
          description: 'How to handle context overflow: `auto` or `disabled`.'
        metadata:
          type: object
          additionalProperties: true
          description: Arbitrary metadata attached to the response.
        store:
          description: >-
            Whether upstream may store the interaction (channel setting
            dependent).
          oneOf:
            - type: boolean
            - type: object
        user:
          type: string
          description: End-user identifier for abuse monitoring.
    ResponsesResponse:
      type: object
      properties:
        id:
          type: string
          description: Response id (use with `previous_response_id`).
        object:
          type: string
          example: response
          description: Usually `response`.
        created_at:
          type: integer
          description: Unix timestamp.
        status:
          type: string
          enum:
            - completed
            - failed
            - in_progress
            - incomplete
          description: >-
            Lifecycle status: `completed`, `failed`, `in_progress`,
            `incomplete`.
        model:
          type: string
          description: Model used.
        output:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
              id:
                type: string
              status:
                type: string
              role:
                type: string
              content:
                type: array
                items:
                  type: object
                  properties:
                    type:
                      type: string
                    text:
                      type: string
          description: >-
            Output items (messages, tool calls, etc.). Read message content
            parts for the answer text.
        usage:
          type: object
          properties:
            input_tokens:
              type: integer
              description: Input tokens.
            output_tokens:
              type: integer
              description: Output tokens.
            total_tokens:
              type: integer
              description: Total tokens.
          description: Token usage.
      description: Responses API result object.
    OpenAIErrorResponse:
      type: object
      description: OpenAI-style error envelope returned on auth/request failures.
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
            - type
          properties:
            message:
              type: string
              description: >-
                Human-readable error. The gateway may append a request id for
                support.
            type:
              type: string
              description: Error type, commonly `new_api_error`.
              example: new_api_error
            code:
              type: string
              description: >-
                Optional machine-readable code (e.g. `access_denied`). May be an
                empty string.
          description: Error object.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Use Authorization: Bearer sk-... from https://omniall.ai/dashboard'

````

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