> ## 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 - Chat Completions Reference

> - OpenAI-compatible Chat Completions 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
- Supports mixed text and image input, as well as `function` tool calls
- Server-side tools (web search, code execution, file search, MCP) are provided only on the [Responses API](../responses/responses-reference)
- **Note** Model support varies for the sampling parameters (`temperature`, `top_p`, `logprobs`, and so on); 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 execution, file search, MCP) are only available on the [Responses API](../responses/responses-reference). The Chat Completions endpoint supports regular `function` tool calling only.
</Note>

<Note>
  **Note** The whole series consists of reasoning models. `stop` (stop sequences) and `web_search_options` are not supported on any model and return `400` if passed; `logit_bias` does not apply to this model series.

  Model support varies for `temperature`, `top_p`, `frequency_penalty`, `presence_penalty`, `logprobs` and `verbosity` — refer to the notes on each parameter above.
</Note>


## OpenAPI

````yaml en/api-manual/language-series/gpt/chat-completions/chat-completions-reference.json POST /v1/chat/completions
openapi: 3.1.0
info:
  title: GPT All-Model API - Chat Completions Reference
  description: >-
    Full parameter reference for calling GPT series text models through the
    OpenAI-compatible Chat Completions API.
  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: Chat Completions
    description: OpenAI-compatible chat completions API
paths:
  /v1/chat/completions:
    post:
      tags:
        - Chat Completions
      summary: GPT Chat Completions (All Models, Full Parameters)
      description: >-
        - OpenAI-compatible Chat Completions 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

        - Supports mixed text and image input, as well as `function` tool calls

        - Server-side tools (web search, code execution, file search, MCP) are
        provided only on the [Responses API](../responses/responses-reference)

        - **Note** Model support varies for the sampling parameters
        (`temperature`, `top_p`, `logprobs`, and so on); see the per-parameter
        notes below
      operationId: gptChatCompletionsReference
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatCompletionRequest'
      responses:
        '200':
          description: >-
            Chat completion succeeded (a JSON object; when `stream=true`, an SSE
            event stream terminated by `data: [DONE]`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletionResponse'
        '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: >-
                    Unsupported parameter: 'stop' is not supported with this
                    model.
                  type: invalid_request_error
        '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:
    ChatCompletionRequest:
      type: object
      required:
        - model
        - messages
      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
        messages:
          type: array
          description: >-
            List of chat messages, supporting multi-turn context and multimodal
            input.


            `role` can be `system` / `developer` / `user` / `assistant` /
            `tool`.


            `content` can be a string or an array of content blocks. Two block
            types are supported: `text` (text) and `image_url` (image):


            ```json

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

            ```


            **Image**

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

            - `image_url` can also be written directly as a string, equivalent
            to `{ "url": "..." }`

            - `detail` controls image analysis fidelity: `auto` (default) /
            `low` / `high` / `original`

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


            **Note** The block types on this API differ from those on the
            Responses API (which uses `input_text` / `input_image`). They cannot
            be mixed; using the wrong ones returns `400`.
          items:
            $ref: '#/components/schemas/Message'
          example:
            - role: system
              content: You are a concise assistant.
            - role: user
              content: Explain quantum entanglement in one sentence.
        stream:
          type: boolean
          description: >-
            Whether to return the result as a stream (an SSE event stream
            terminated by `data: [DONE]`). Defaults to `false`.
          default: false
          example: false
        max_completion_tokens:
          type: integer
          description: >-
            Maximum number of tokens to generate (including reasoning tokens).


            **Note** This model series uses `max_completion_tokens`. For
            backward compatibility, passing only `max_tokens` is automatically
            treated as `max_completion_tokens`; however, **do not pass both
            fields at once** — on `gpt-5.1` / `gpt-5.2` / `gpt-5.4` passing both
            returns `400`.
          example: 2048
        reasoning_effort:
          type: string
          description: >-
            Reasoning depth control. The allowed values vary by model:


            | Model | Allowed values |

            |---|---|

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

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


            Reasoning tokens are billed as output tokens and counted in
            `usage.completion_tokens_details.reasoning_tokens`.
          enum:
            - none
            - low
            - medium
            - high
            - xhigh
          example: medium
        verbosity:
          type: string
          description: >-
            How detailed the answer should be: `low` / `medium` / `high`.


            **Note** Supported only by `gpt-5.6-sol` / `gpt-5.6-terra` /
            `gpt-5.6-luna` / `gpt-5.5`; other models do not support this
            parameter.
          enum:
            - low
            - medium
            - high
          example: low
        temperature:
          type: number
          description: >-
            Sampling temperature, ranging from 0 to 2. Lower values make the
            output more deterministic.


            **Note** Supported only by `gpt-5.5` / `gpt-5.4` / `gpt-5.2` /
            `gpt-5.1`. The `gpt-5.6` family accepts only the default value `1`;
            passing any other value returns `400`.
          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.


            **Note** Supported only by `gpt-5.5` / `gpt-5.4` / `gpt-5.2` /
            `gpt-5.1`; the `gpt-5.6` family does not support this parameter.
          minimum: 0
          maximum: 1
          example: 0.9
        frequency_penalty:
          type: number
          description: >-
            Frequency penalty, ranging from -2 to 2. Positive values penalize
            tokens by how often they have appeared, reducing repeated content.


            **Note** Supported only by `gpt-5.4` / `gpt-5.2` / `gpt-5.1`; the
            `gpt-5.6` family and `gpt-5.5` do not support this parameter.
          minimum: -2
          maximum: 2
          example: 0.5
        presence_penalty:
          type: number
          description: >-
            Presence penalty, ranging from -2 to 2. Positive values encourage
            the model to talk about new topics.


            **Note** Supported only by `gpt-5.4` / `gpt-5.2` / `gpt-5.1`; the
            `gpt-5.6` family and `gpt-5.5` do not support this parameter.
          minimum: -2
          maximum: 2
          example: 0.5
        logprobs:
          type: boolean
          description: >-
            Whether to return the log probabilities of each output token.


            **Note** Supported only by `gpt-5.4` / `gpt-5.2` / `gpt-5.1`; the
            `gpt-5.6` family and `gpt-5.5` do not support this parameter.
          default: false
          example: true
        top_logprobs:
          type: integer
          description: >-
            Number of candidate tokens returned at each position, ranging from 0
            to 5; must be used together with `logprobs: true`.


            **Note** Same model support as `logprobs`.
          minimum: 0
          maximum: 5
          example: 2
        'n':
          type: integer
          description: >-
            Number of candidate replies to generate, returned as multiple
            entries in the `choices` array. All tokens (including the output of
            every candidate) are billed.
          default: 1
          example: 1
        seed:
          type: integer
          description: >-
            Random seed. With the same seed and parameter combination, the model
            tries to return consistent results (best effort; full
            reproducibility is not guaranteed).
          example: 42
        response_format:
          type: object
          description: >-
            Output format control:


            - `{"type": "text"}`: free-form text, the default

            - `{"type": "json_object"}`: returns valid JSON, and **requires the
            word `json` to appear in `messages`**, otherwise `400` is returned

            - `{"type": "json_schema", "json_schema": {...}}`: returns
            structured output following the given JSON Schema; combine it with
            `"strict": true` to enforce conformance to the schema
          properties:
            type:
              type: string
              enum:
                - text
                - json_object
                - json_schema
              example: json_schema
            json_schema:
              type: object
              description: >-
                Required when `type` is `json_schema`; contains the `name`,
                `schema`, and `strict` fields
        tools:
          type: array
          description: >-
            Tool list, used for function calling (client-side function calls, no
            per-call fee).


            Server-side tools (web search, code execution, and so on) are not
            provided on this API; use the [Responses
            API](../responses/responses-reference) instead.
          items:
            $ref: '#/components/schemas/FunctionTool'
        tool_choice:
          description: >-
            Tool choice control: `"auto"` (default) / `"none"` / `"required"`,
            or an object naming a specific function, such as `{"type":
            "function", "function": {"name": "get_weather"}}`.
          oneOf:
            - type: string
              enum:
                - none
                - auto
                - required
            - type: object
        parallel_tool_calls:
          type: boolean
          description: >-
            Whether the model may call multiple tools in parallel within one
            turn. Defaults to `true`; set it to `false` to force calls one at a
            time.
          default: true
          example: true
        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-chat-v1
        user:
          type: string
          description: End-user identifier, used to distinguish the source of calls.
          example: user-1024
    ChatCompletionResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for this conversation
          example: chatcmpl-CvJ2p8mQxK7nR4wS
        object:
          type: string
          enum:
            - chat.completion
          description: Response type
          example: chat.completion
        created:
          type: integer
          description: Creation timestamp
          example: 1786705221
        model:
          type: string
          description: Actual model name used
          example: gpt-5.6-sol
        choices:
          type: array
          description: List of generated results (length equals `n` in the request)
          items:
            $ref: '#/components/schemas/Choice'
        usage:
          $ref: '#/components/schemas/Usage'
    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
    Message:
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          description: Message role
          enum:
            - system
            - developer
            - user
            - assistant
            - tool
          example: user
        content:
          description: >-
            Message content: a string, or an array of content blocks (a mix of
            `text` / `image_url`).
          oneOf:
            - type: string
            - type: array
              items:
                $ref: '#/components/schemas/ContentBlock'
          example: Explain quantum entanglement in one sentence.
    FunctionTool:
      type: object
      required:
        - type
        - function
      properties:
        type:
          type: string
          enum:
            - function
          example: function
        function:
          type: object
          description: Function definition
          properties:
            name:
              type: string
              example: get_weather
            description:
              type: string
              example: Get the weather for a specified city
            parameters:
              type: object
              description: Parameter definition in JSON Schema format
    Choice:
      type: object
      properties:
        index:
          type: integer
          description: Result index
          example: 0
        message:
          $ref: '#/components/schemas/AssistantMessage'
        logprobs:
          type: object
          description: >-
            Log probability information, returned only when `logprobs` is
            enabled in the request
        finish_reason:
          type: string
          description: >-
            Finish reason: `stop` for a normal ending, `length` when the maximum
            token limit is reached, `tool_calls` when a tool call is required
          enum:
            - stop
            - length
            - tool_calls
          example: stop
    Usage:
      type: object
      description: >-
        Token usage statistics. Prompt caching applies automatically, and cached
        input tokens are billed at the lower cached rate.
      properties:
        prompt_tokens:
          type: integer
          description: Number of input tokens
          example: 18
        completion_tokens:
          type: integer
          description: Number of output tokens (includes reasoning tokens)
          example: 42
        total_tokens:
          type: integer
          description: Total number of tokens
          example: 60
        prompt_tokens_details:
          type: object
          description: Detailed input token information
          properties:
            cached_tokens:
              type: integer
              description: Number of tokens served from cache
              example: 0
        completion_tokens_details:
          type: object
          description: Detailed output token information
          properties:
            reasoning_tokens:
              type: integer
              description: Number of reasoning tokens
              example: 16
    ContentBlock:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          description: |-
            Content type

            - `text`: Text block
            - `image_url`: Image input
          enum:
            - text
            - image_url
          example: image_url
        text:
          type: string
          description: Text content when `type=text`
          example: What is in this image?
        image_url:
          type: object
          description: >-
            Image input (when `type=image_url`). It can also be written directly
            as an image URL string, equivalent to `{ "url": "..." }`.
          required:
            - url
          properties:
            url:
              type: string
              description: >-
                Public URL of the image. It must be downloadable, otherwise
                `400` is returned
              example: https://example.com/photo.png
            detail:
              type: string
              description: |-
                Image analysis fidelity

                - `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.
    AssistantMessage:
      type: object
      properties:
        role:
          type: string
          enum:
            - assistant
          example: assistant
        content:
          type: string
          description: >-
            Text content generated by the model; can be `null` when a tool call
            is triggered
          example: >-
            Quantum entanglement means the states of two particles are
            correlated, so measuring one instantly determines the state of the
            other.
        tool_calls:
          type: array
          description: Tools the model requested to call
          items:
            type: object
  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

        ```

````