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

# GPT All-Model API - Responses Reference

> - OpenAI-compatible Responses API for GPT series text models; select the specific model via `model` (see the comparison table on the `model` parameter for all allowed values)
- The whole series consists of reasoning models, with reasoning depth controlled by `reasoning.effort`; reasoning tokens are billed as output tokens
- Prompt caching applies automatically: cached input tokens are billed at the lower cached rate
- Supports both synchronous and streaming (SSE) modes
- Server-side tools: `web_search` (web search), `code_interpreter` (code execution), `file_search` (file search)
- Plain `function` tools (client-side function calls) are supported as well
- Multi-turn conversations can be chained with `previous_response_id`
- **Note** Model support varies for some parameters; see the per-parameter notes below

<Note>
  **BaseURL**: The default BaseURL is `https://direct.evolink.ai`, which has better support for text models and long-lived connections. `https://api.evolink.ai` is the primary endpoint for multimodal services and serves as a fallback address for text models.
</Note>

<Note>
  **Server-side tools** (`web_search`, `code_interpreter`, `file_search`, `mcp`) run on the server, so results do not need to be sent back by the client, and they are only available on this API. The Chat Completions endpoint supports regular `function` tool calling only.
</Note>

<Note>
  **Note** This API supports synchronous and streaming modes only: the `background: true` asynchronous mode is not supported, and there are no endpoints for retrieving, cancelling or deleting a response by its ID. For long-running generations, use `stream: true` to keep the connection open.

  The `image_generation` tool is not available on this model series; for image generation, use the image series model APIs.
</Note>

<Note>
  **Multi-turn conversations**: pass the `id` returned by the previous turn as `previous_response_id` on the next turn to continue the context. Responses have a retention period; once it expires the ID is no longer valid and the request is handled as a new conversation. For scenarios with strict context-accuracy requirements, maintaining the full `input` history yourself is recommended.
</Note>


## OpenAPI

````yaml en/api-manual/language-series/gpt/responses/responses-reference.json POST /v1/responses
openapi: 3.1.0
info:
  title: GPT All-Model API - Responses Reference
  description: >-
    Full parameter reference for calling GPT series text models through the
    OpenAI-compatible Responses API (including server-side tools).
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://direct.evolink.ai
    description: Production (recommended)
  - url: https://api.evolink.ai
    description: Alternative URL
security:
  - bearerAuth: []
tags:
  - name: Responses
    description: OpenAI Responses API with server-side tools
paths:
  /v1/responses:
    post:
      tags:
        - Responses
      summary: GPT Responses (All Models, Full Parameters)
      description: >-
        - OpenAI-compatible Responses API for GPT series text models; select the
        specific model via `model` (see the comparison table on the `model`
        parameter for all allowed values)

        - The whole series consists of reasoning models, with reasoning depth
        controlled by `reasoning.effort`; reasoning tokens are billed as output
        tokens

        - Prompt caching applies automatically: cached input tokens are billed
        at the lower cached rate

        - Supports both synchronous and streaming (SSE) modes

        - Server-side tools: `web_search` (web search), `code_interpreter` (code
        execution), `file_search` (file search)

        - Plain `function` tools (client-side function calls) are supported as
        well

        - Multi-turn conversations can be chained with `previous_response_id`

        - **Note** Model support varies for some parameters; see the
        per-parameter notes below
      operationId: gptResponsesReference
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResponsesRequest'
      responses:
        '200':
          description: >-
            Response generated successfully (JSON object, or an SSE event stream
            ending with `response.completed` when `stream=true`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponsesResponse'
        '400':
          description: >-
            Invalid request parameters (including parameters not supported by
            the model; the error message indicates the specific parameter name)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 400
                  message: >-
                    Invalid value: '__bogus__'. Supported values are: 'auto' and
                    'disabled'.
                  type: invalid_request_error
                  param: truncation
        '401':
          description: Unauthorized, invalid or expired token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 401
                  message: Invalid or expired token
                  type: authentication_error
        '402':
          description: Insufficient quota
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 402
                  message: Insufficient quota
                  type: insufficient_quota_error
                  fallback_suggestion: https://evolink.ai/dashboard/billing
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 429
                  message: Rate limit exceeded
                  type: rate_limit_error
                  fallback_suggestion: retry after 60 seconds
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 500
                  message: Internal server error
                  type: internal_server_error
                  fallback_suggestion: try again later
        '503':
          description: Service temporarily unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 503
                  message: Service temporarily unavailable
                  type: service_unavailable_error
                  fallback_suggestion: retry after 30 seconds
components:
  schemas:
    ResponsesRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          description: >-
            Model to call:


            | Model ID | Context window | Positioning |

            |---|---|---|

            | `gpt-5.6-sol` | 1,050,000 | GPT-5.6 family, frontier reasoning |

            | `gpt-5.6-terra` | 1,050,000 | GPT-5.6 family, balanced production
            |

            | `gpt-5.6-luna` | 1,050,000 | GPT-5.6 family, high throughput and
            cost control |

            | `gpt-5.5` | 400,000 | General-purpose reasoning model |

            | `gpt-5.4` | 128,000 | General-purpose reasoning model |

            | `gpt-5.2` | 400,000 | General-purpose reasoning model |

            | `gpt-5.1` | 400,000 | General-purpose reasoning model |
          enum:
            - gpt-5.6-sol
            - gpt-5.6-terra
            - gpt-5.6-luna
            - gpt-5.5
            - gpt-5.4
            - gpt-5.2
            - gpt-5.1
          example: gpt-5.6-sol
        input:
          description: >-
            Model input: a plain string, or an array of input items.


            The `content` of an input item supports two block types:
            `input_text` (text) and `input_image` (image):


            ```json

            "input": [
              {
                "role": "user",
                "content": [
                  { "type": "input_text", "text": "What is in this image?" },
                  {
                    "type": "input_image",
                    "image_url": "https://example.com/photo.png",
                    "detail": "auto"
                  }
                ]
              }
            ]

            ```


            **Image**

            - Pass the public URL of the image in `image_url`

            - `image_url` must be a string; writing it as `{ "url": "..." }`
            returns `400`

            - `detail` is a sibling of `image_url` (not nested inside it):
            `auto` (default) / `low` / `high` / `original`

            - The image must be downloadable, otherwise `400` is returned


            **Tool results**

            - The array can also carry back tool result items from the previous
            turn, such as `function_call_output`


            **Note** The block types on this API differ from those on the Chat
            Completions API (which uses `text` / `image_url`). They cannot be
            mixed; using the wrong ones returns `400`.
          oneOf:
            - type: string
            - type: array
              items:
                $ref: '#/components/schemas/InputItem'
          example: >-
            Search for AI news from the past week and summarize it in three
            sentences.
        instructions:
          type: string
          description: >-
            System-level instructions, equivalent to inserting a system message
            at the very beginning of `input`. When continuing a conversation
            with `previous_response_id`, this parameter is not inherited from
            the previous turn and must be passed on every turn.
          example: You are a concise assistant. Answer in no more than three sentences.
        stream:
          type: boolean
          description: >-
            Whether to return a streaming response (SSE events, ending with
            `response.completed`). Default `false`.
          default: false
          example: false
        max_output_tokens:
          type: integer
          description: >-
            Maximum number of tokens to generate (including reasoning tokens).
            When the limit is reached, `status` is `incomplete`.
          example: 2048
        reasoning:
          type: object
          description: >-
            Reasoning control.


            **The allowed values of `effort` (reasoning depth) vary by model:**


            | Model | Allowed values |

            |---|---|

            | `gpt-5.6-sol` / `gpt-5.6-terra` / `gpt-5.6-luna` | `none`, `low`,
            `medium`, `high`, `xhigh`, `max` |

            | `gpt-5.5` / `gpt-5.4` / `gpt-5.2` | `none`, `low`, `medium`,
            `high`, `xhigh` |

            | `gpt-5.1` | `none`, `low`, `medium`, `high` |


            **`summary` (reasoning summary)**: `auto` / `concise` / `detailed`,
            available across the series. Once enabled, a `reasoning` item
            appears in `output`.


            **`mode` (reasoning mode)**: `standard` / `pro`, supported only by
            the `gpt-5.6` family.


            **`context` (reasoning context scope)**: `auto` / `current_turn` /
            `all_turns`, supported only by the `gpt-5.6` family.


            Reasoning tokens are billed as output tokens and counted in
            `usage.output_tokens_details.reasoning_tokens`.
          properties:
            effort:
              type: string
              enum:
                - none
                - low
                - medium
                - high
                - xhigh
                - max
              example: medium
            summary:
              type: string
              enum:
                - auto
                - concise
                - detailed
              example: auto
            mode:
              type: string
              enum:
                - standard
                - pro
              example: standard
            context:
              type: string
              enum:
                - auto
                - current_turn
                - all_turns
              example: current_turn
        text:
          type: object
          description: >-
            Output text control:


            - `format`: `{"type": "text"}` (default), `{"type": "json_object"}`,
            or `{"type": "json_schema", "name": "...", "schema": {...},
            "strict": true}` for structured output

            - `verbosity`: `low` / `medium` / `high`, controls how detailed the
            answer is
          properties:
            format:
              type: object
              description: Output format definition
            verbosity:
              type: string
              enum:
                - low
                - medium
                - high
              example: medium
        tools:
          type: array
          description: >-
            Tool declarations. Server-side tools run on the server, so results
            do not need to be sent back by the client:


            | Tool type | Capability |

            |---|---|

            | `web_search` | Searches the web and browses pages (alias
            `web_search_preview`) |

            | `code_interpreter` | Runs code in a sandbox; requires
            `"container": {"type": "auto"}` |

            | `file_search` | Searches an existing vector store; requires
            `vector_store_ids` |

            | `mcp` | Connects to a remote MCP service; requires `server_label`
            and `server_url` |


            Plain `function` tools (client-side function calls) are supported as
            well.


            **Note** `image_generation` is not available on this model series;
            use the image series model APIs instead.
          items:
            $ref: '#/components/schemas/Tool'
          example:
            - type: web_search
        tool_choice:
          description: >-
            Controls tool selection: `"auto"` (default) / `"none"` /
            `"required"`, or an object pinning a specific tool, e.g. `{"type":
            "web_search"}`.
          oneOf:
            - type: string
              enum:
                - none
                - auto
                - required
            - type: object
        max_tool_calls:
          type: integer
          description: Maximum total number of tool calls allowed in this response.
          example: 5
        parallel_tool_calls:
          type: boolean
          description: >-
            Whether the model may call multiple tools in parallel within one
            turn. Defaults to `true`.


            **Note** Only the `gpt-5.6` family and `gpt-5.5` support setting it
            to `false`; on `gpt-5.4` / `gpt-5.2` / `gpt-5.1` this parameter has
            no effect and always behaves as `true`.
          default: true
          example: true
        previous_response_id:
          type: string
          description: >-
            The `id` of the previous response, used to chain multi-turn
            conversations without re-uploading the history.


            **Note** Must be used together with `store: true` (the default).
            Responses have a retention period; once it expires the ID is no
            longer valid, and the request is handled as a new conversation
            without inheriting context. For scenarios with strict
            context-accuracy requirements, maintaining the full `input` history
            yourself is recommended.
          example: resp_0f5c2b2c20c39e8a006a7ef545443081979e478b10927984b5
        store:
          type: boolean
          description: >-
            Whether to store this response on the server; only stored responses
            can be referenced by `previous_response_id`. Defaults to `true`.


            **Note** Only the `gpt-5.6` family and `gpt-5.5` support setting it
            to `false`; on `gpt-5.4` / `gpt-5.2` / `gpt-5.1` this parameter has
            no effect and always behaves as `true`. If you do not want responses
            stored, choose a model that supports turning it off.
          default: true
          example: true
        include:
          type: array
          description: |-
            Additional content to return in the response. Allowed values:

            - `reasoning.encrypted_content`
            - `message.output_text.logprobs`
            - `web_search_call.results`
            - `web_search_call.action.sources`
            - `file_search_call.results`
            - `code_interpreter_call.outputs`
            - `message.input_image.image_url`
            - `computer_call_output.output.image_url`
          items:
            type: string
          example:
            - reasoning.encrypted_content
        temperature:
          type: number
          description: >-
            Sampling temperature, ranging from 0 to 2. Lower values make the
            output more deterministic.


            **Note** On `gpt-5.4` / `gpt-5.2` / `gpt-5.1` the value `0` has no
            effect (it is treated as unset and falls back to the default `1`);
            for more deterministic output, use a value greater than 0 such as
            `0.01`.
          minimum: 0
          maximum: 2
          example: 0.7
        top_p:
          type: number
          description: >-
            Nucleus sampling parameter, ranging from 0 to 1. Adjusting it
            together with `temperature` is not recommended.
          minimum: 0
          maximum: 1
          example: 0.9
        top_logprobs:
          type: integer
          description: >-
            Number of candidate tokens returned at each position, ranging from 0
            to 20; must be used together with `include:
            ["message.output_text.logprobs"]`.


            **Note** Supported only by the `gpt-5.6` family and `gpt-5.5`; other
            models do not support this parameter.
          minimum: 0
          maximum: 20
          example: 2
        frequency_penalty:
          type: number
          description: >-
            Frequency penalty, ranging from -2 to 2, reducing the likelihood of
            repeated content.


            **Note** Supported only by the `gpt-5.6` family; other models do not
            support this parameter.
          minimum: -2
          maximum: 2
          example: 0.5
        presence_penalty:
          type: number
          description: >-
            Presence penalty, ranging from -2 to 2, encouraging the model to
            talk about new topics.


            **Note** Supported only by the `gpt-5.6` family; other models do not
            support this parameter.
          minimum: -2
          maximum: 2
          example: 0.5
        truncation:
          type: string
          description: >-
            How to handle context that exceeds the window: `disabled` (default,
            returns an error) or `auto` (automatically truncates the middle of
            the context).
          enum:
            - auto
            - disabled
          default: disabled
          example: auto
        context_management:
          type: array
          description: >-
            Automatic compaction configuration for long conversations, for
            example `[{"type": "compaction", "compact_threshold": 100000}]`: the
            history is compacted automatically once the context exceeds the
            threshold.


            **Note** Supported only by the `gpt-5.6` family; other models do not
            support this parameter.
          items:
            type: object
        prompt_cache_key:
          type: string
          description: >-
            Cache grouping key. Passing the same value for requests that share
            the same prefix improves the prompt cache hit rate.
          example: app-agent-v1
        prompt_cache_retention:
          type: string
          description: >-
            Prompt cache retention policy: `in_memory` (default) or `24h`
            (extends how long the cache is retained).
          enum:
            - in_memory
            - 24h
          example: in_memory
        prompt:
          type: object
          description: >-
            References an already created prompt template, in the form `{"id":
            "pmpt_xxx", "version": "1", "variables": {...}}`.
          properties:
            id:
              type: string
            version:
              type: string
            variables:
              type: object
        metadata:
          type: object
          description: >-
            Custom key-value pairs returned as-is with the response, convenient
            for tagging on the business side. Both keys and values are strings.
          example:
            trace_id: abc-123
        safety_identifier:
          type: string
          description: >-
            Stable identifier of the end user, used for abuse tracking.


            **Note** Supported only by the `gpt-5.6` family; other models do not
            support this parameter.
          example: user-1024
        user:
          type: string
          description: End-user identifier, used to distinguish the source of calls.
          example: user-1024
    ResponsesResponse:
      type: object
      properties:
        id:
          type: string
          description: >-
            Unique ID of this response, which can be used as
            `previous_response_id` for the next turn
          example: resp_0f5c2b2c20c39e8a006a7ef545443081979e478b10927984b5
        object:
          type: string
          enum:
            - response
          description: Response type
          example: response
        status:
          type: string
          description: >-
            Response status: `completed` for a normal ending, `incomplete` when
            generation stopped early for reasons such as reaching
            `max_output_tokens`, `failed` when generation failed
          enum:
            - completed
            - incomplete
            - failed
          example: completed
        model:
          type: string
          description: Actual model name used
          example: gpt-5.6-sol
        created_at:
          type: integer
          description: Creation timestamp
          example: 1786705221
        output:
          type: array
          description: >-
            Output items in generation order: the `reasoning` item (reasoning
            summary / encrypted reasoning content), tool call items (such as
            `web_search_call` and `code_interpreter_call`), and finally the
            `message` item containing `output_text` content.
          items:
            $ref: '#/components/schemas/OutputItem'
        incomplete_details:
          type: object
          description: Explains the reason when `status` is `incomplete`
        usage:
          $ref: '#/components/schemas/Usage'
        metadata:
          type: object
          description: Custom key-value pairs passed in the request, returned as-is
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
              description: HTTP status error code
            message:
              type: string
              description: Error description
            type:
              type: string
              description: Error type
            param:
              type: string
              description: Related parameter name
            fallback_suggestion:
              type: string
              description: Suggestion when error occurs
    InputItem:
      type: object
      description: >-
        Input item: a message item (`role` + `content`), or a tool result item
        from the previous turn (such as `function_call_output`)


        To return a tool result:


        ```json

        {
          "type": "function_call_output",
          "call_id": "call_abc123",
          "output": "{\"temp_c\": 21}"
        }

        ```
      properties:
        role:
          type: string
          description: Message role
          enum:
            - system
            - developer
            - user
            - assistant
          example: user
        content:
          description: >-
            Input content: a string, or an array of content blocks (a mix of
            `input_text` / `input_image`)
          oneOf:
            - type: string
            - type: array
              items:
                $ref: '#/components/schemas/InputContentBlock'
        type:
          type: string
          description: >-
            Item type. Omit it for message items; use `function_call_output`
            when returning a tool result.
          enum:
            - function_call_output
          example: function_call_output
        call_id:
          type: string
          description: >-
            The `call_id` of the matching `function_call` output item from the
            previous turn (not its `id`). Required only for
            `function_call_output` items.
          example: call_abc123
        output:
          type: string
          description: >-
            The tool execution result as a string (serialize JSON results
            yourself). Required only for `function_call_output` items.
          example: '{"temp_c": 21}'
    Tool:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          description: Tool type
          enum:
            - web_search
            - web_search_preview
            - code_interpreter
            - file_search
            - mcp
            - function
          example: web_search
    OutputItem:
      type: object
      properties:
        id:
          type: string
          description: Output item identifier
        type:
          type: string
          description: Output item type
          enum:
            - reasoning
            - message
            - web_search_call
            - code_interpreter_call
            - file_search_call
            - mcp_call
            - function_call
          example: web_search_call
        status:
          type: string
          description: Output item status
          example: completed
        content:
          type: array
          description: Message content parts (`output_text`), present on `message` items
          items:
            type: object
        encrypted_content:
          type: string
          description: >-
            Encrypted reasoning content, present on the `reasoning` item;
            requires `include: ["reasoning.encrypted_content"]` in the request
    Usage:
      type: object
      description: >-
        Token usage statistics. Prompt caching applies automatically, and cached
        input tokens are billed at the lower cached rate.
      properties:
        input_tokens:
          type: integer
          description: Number of input tokens
          example: 18
        output_tokens:
          type: integer
          description: Number of output tokens (includes reasoning tokens)
          example: 42
        total_tokens:
          type: integer
          description: Total number of tokens
          example: 60
        input_tokens_details:
          type: object
          description: Detailed input token information
          properties:
            cached_tokens:
              type: integer
              description: Number of tokens served from cache
              example: 0
            cache_write_tokens:
              type: integer
              description: Number of tokens written to cache
              example: 0
        output_tokens_details:
          type: object
          description: Detailed output token information
          properties:
            reasoning_tokens:
              type: integer
              description: Number of reasoning tokens
              example: 16
    InputContentBlock:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          description: |-
            Content type

            - `input_text`: Text block
            - `input_image`: Image input
          enum:
            - input_text
            - input_image
          example: input_image
        text:
          type: string
          description: Text content when `type=input_text`
          example: What is in this image?
        image_url:
          type: string
          description: >-
            Public URL of the image (when `type=input_image`). It must be a
            string; writing it as `{ "url": "..." }` returns `400`. The image
            must be downloadable, otherwise `400` is returned as well.
          example: https://example.com/photo.png
        detail:
          type: string
          description: >-
            Image analysis fidelity, a sibling of `image_url` (not nested inside
            it)


            - `low`: Low fidelity, consumes fewer tokens

            - `high`: High fidelity, finer recognition

            - `original`: Analyzed at the original image size

            - `auto` (default): Decided automatically by the model
          enum:
            - auto
            - low
            - high
            - original
          default: auto
          example: auto
      description: >-
        Multimodal content block. Declare the type via `type` and fill in only
        the fields matching that type.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        ##All APIs require Bearer Token authentication##


        **Get API Key:**


        Visit [API Key Management Page](https://evolink.ai/dashboard/keys) to
        get your API Key


        **Add to request header:**

        ```

        Authorization: Bearer YOUR_API_KEY

        ```

````