> ## 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.

# MiniMax Responses API reference

> - OpenAI Responses (`MiniMax-M4`, `MiniMax-M3.1-Flash`). Select the model with `model`.
- **Input**: `input` accepts plain text or an array of input items (messages, function calls, and function results)
- **Multimodal input**: combine `input_text`, `input_image`, and `input_video` blocks in message `content`
- **System instructions**: use `instructions`, equivalent to an initial system message
- **Reasoning**: always enabled; adjust depth with `reasoning.effort`. Reasoning is returned as `reasoning` output items
- **Streaming**: semantic SSE events ending with `response.completed`, without a `[DONE]` marker
- **Tool calling**: Function Calling
- **Context caching**: matching prefixes are cached automatically; cached tokens are reported in `usage.input_tokens_details.cached_tokens`

**Stateless requests**: Responses are not stored and `previous_response_id` is not supported. For each turn, append every item from the previous `output` to `input` in its original order, preserving all fields, including `content`, `summary`, and `encrypted_content` in reasoning items. After executing a tool, append a `function_call_output` item with the same `call_id` as the function call.

**Streaming events**: `response.created`, `response.in_progress`, `response.output_item.added`, `response.content_part.added`, `response.reasoning_text.delta` / `response.reasoning_text.done`, `response.output_text.delta` / `response.output_text.done`, `response.content_part.done`, and `response.output_item.done`, ending with `response.completed`. Each event includes a `sequence_number` for ordering.

> [!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]
>
> Only `MiniMax-M4` and `MiniMax-M3.1-Flash` support Responses. For `MiniMax-M3` and `MiniMax-M2.5`, use [Chat Completions](https://evolink.ai/docs/en/api-manual/language-series/minimax/chat-completions/chat-completions-quickstart.md) or [Messages](https://evolink.ai/docs/en/api-manual/language-series/minimax/messages/messages-quickstart.md). `MiniMax-M4` and `MiniMax-M3.1-Flash` always use reasoning. Adjust reasoning depth with `reasoning.effort`. **Maximum output (including reasoning tokens)** — `MiniMax-M4` 262,144, `MiniMax-M3.1-Flash` 524,288.


## OpenAPI

````yaml en/api-manual/language-series/minimax/responses/responses-reference.json POST /v1/responses
openapi: 3.1.0
info:
  title: MiniMax Responses API reference
  description: >-
    MiniMax Responses API reference. Only `MiniMax-M4` and `MiniMax-M3.1-Flash`
    support Responses. For `MiniMax-M3` and `MiniMax-M2.5`, use [Chat
    Completions](/en/api-manual/language-series/minimax/chat-completions/chat-completions-quickstart)
    or
    [Messages](/en/api-manual/language-series/minimax/messages/messages-quickstart).
    `MiniMax-M4` and `MiniMax-M3.1-Flash` always use reasoning. Adjust reasoning
    depth with `reasoning.effort` (default `max`). **Maximum output (including
    reasoning tokens)** — `MiniMax-M4` 262,144, `MiniMax-M3.1-Flash` 524,288.


    Supports tool calls, streaming, and text, image or video input. Matching
    prefixes are cached automatically. Cached tokens appear in
    `usage.input_tokens_details.cached_tokens` and are billed at the cache-hit
    rate. Responses are stateless. Include the complete conversation history
    with every turn.
  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 Completion
    description: AI chat completion related endpoints
paths:
  /v1/responses:
    post:
      tags:
        - Chat Completion
      summary: MiniMax Responses API reference (OpenAI-compatible)
      description: >-
        - OpenAI Responses (`MiniMax-M4`, `MiniMax-M3.1-Flash`). Select the
        model with `model`.

        - **Input**: `input` accepts plain text or an array of input items
        (messages, function calls, and function results)

        - **Multimodal input**: combine `input_text`, `input_image`, and
        `input_video` blocks in message `content`

        - **System instructions**: use `instructions`, equivalent to an initial
        system message

        - **Reasoning**: always enabled; adjust depth with `reasoning.effort`.
        Reasoning is returned as `reasoning` output items

        - **Streaming**: semantic SSE events ending with `response.completed`,
        without a `[DONE]` marker

        - **Tool calling**: Function Calling

        - **Context caching**: matching prefixes are cached automatically;
        cached tokens are reported in `usage.input_tokens_details.cached_tokens`


        **Stateless requests**: Responses are not stored and
        `previous_response_id` is not supported. For each turn, append every
        item from the previous `output` to `input` in its original order,
        preserving all fields, including `content`, `summary`, and
        `encrypted_content` in reasoning items. After executing a tool, append a
        `function_call_output` item with the same `call_id` as the function
        call.


        **Streaming events**: `response.created`, `response.in_progress`,
        `response.output_item.added`, `response.content_part.added`,
        `response.reasoning_text.delta` / `response.reasoning_text.done`,
        `response.output_text.delta` / `response.output_text.done`,
        `response.content_part.done`, and `response.output_item.done`, ending
        with `response.completed`. Each event includes a `sequence_number` for
        ordering.
      operationId: createResponseMiniMax
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResponsesRequest'
            examples:
              simple_text:
                summary: Single-turn text conversation
                value:
                  model: MiniMax-M4
                  input: Explain recursion in one sentence.
                  max_output_tokens: 131072
              with_instructions:
                summary: Using system instructions
                value:
                  model: MiniMax-M4
                  instructions: >-
                    You are a technical documentation assistant. Keep your
                    answers concise.
                  input: Explain how context caching works.
                  max_output_tokens: 131072
              multi_turn:
                summary: Multi-turn conversation (input item array)
                value:
                  model: MiniMax-M4
                  input:
                    - type: message
                      role: user
                      content: Suggest three names for a note-taking app.
                    - type: message
                      role: assistant
                      content: NoteFlow, ClearPage, QuickNote.
                    - type: message
                      role: user
                      content: Suggest five alternatives to the second name.
                  max_output_tokens: 131072
              reasoning_effort:
                summary: Adjust reasoning depth
                value:
                  model: MiniMax-M4
                  input: >-
                    A bat and a ball cost 1.10 in total. The bat costs 1.00 more
                    than the ball. How much does the ball cost?
                  reasoning:
                    effort: high
                  max_output_tokens: 131072
              vision_url:
                summary: Image understanding
                value:
                  model: MiniMax-M4
                  input:
                    - type: message
                      role: user
                      content:
                        - type: input_text
                          text: Describe this image.
                        - type: input_image
                          image_url: https://example.com/photo.jpg
                  max_output_tokens: 131072
              video_url:
                summary: Video understanding
                value:
                  model: MiniMax-M4
                  input:
                    - type: message
                      role: user
                      content:
                        - type: input_text
                          text: Summarize this video.
                        - type: input_video
                          video_url:
                            url: https://example.com/video.mp4
                            fps: 1
                            detail: default
                  max_output_tokens: 131072
              function_calling:
                summary: Function Calling (tool invocation)
                value:
                  model: MiniMax-M4
                  input: Check the stock for product demo-item-001.
                  tools:
                    - type: function
                      name: get_product_stock
                      description: Get the current stock level for a product.
                      parameters:
                        type: object
                        properties:
                          product_id:
                            type: string
                            description: Product identifier.
                        required:
                          - product_id
                  max_output_tokens: 131072
              function_result:
                summary: Continue with a tool execution result
                value:
                  model: MiniMax-M4
                  reasoning:
                    effort: medium
                  max_output_tokens: 131072
                  input:
                    - type: message
                      role: user
                      content: >-
                        Use get_product_stock to check product demo-item-001.
                        After receiving the tool result, report whether it is in
                        stock and its quantity. Do not guess the stock level.
                    - id: example_2ab00b_msg
                      type: message
                      status: completed
                      role: assistant
                      content:
                        - type: output_text
                          text: I'll check the stock level for that product now.
                          annotations: []
                    - id: example_2ab00b_fc_0
                      type: function_call
                      status: completed
                      call_id: call_example_1
                      name: get_product_stock
                      arguments: '{"product_id": "demo-item-001"}'
                    - type: function_call_output
                      call_id: call_example_1
                      output: >-
                        {"product_id": "demo-item-001", "in_stock": true,
                        "quantity": 24}
                  tools:
                    - type: function
                      name: get_product_stock
                      description: Get the current stock level for a product.
                      parameters:
                        type: object
                        properties:
                          product_id:
                            type: string
                            description: Product identifier.
                        required:
                          - product_id
                  tool_choice: auto
              streaming:
                summary: Streaming output
                value:
                  model: MiniMax-M4
                  input: Write a short poem about autumn.
                  stream: true
                  max_output_tokens: 131072
              reasoning_history:
                summary: Continue with complete reasoning history
                value:
                  model: MiniMax-M4
                  reasoning:
                    effort: medium
                  max_output_tokens: 131072
                  input:
                    - type: message
                      role: user
                      content: >-
                        Find the smallest positive integer n such that n mod 7 =
                        3, n mod 11 = 5, and n mod 13 = 7. Return only n.
                    - id: example_ae5b7d_rs
                      type: reasoning
                      status: completed
                      summary: []
                      content:
                        - type: reasoning_text
                          text: >-
                            We need solve CRT. Need only n. Compute. n=3 mod7, 5
                            mod11,7 mod13. Product 1001. Let's solve.


                            Use n=3+7a. mod11: 3+7a=5 =>7a=2 mod11. inverse7=8
                            (56=1), a=16=5 mod11. a=5+11b. n=38+77b. mod13:
                            38+77b = 12+12b mod13 (77=12,38=12) equals7
                            =>12b=-5=8 mod13. inverse12=12, b=96 mod13 =5? 91
                            remainder5. n=38+385=423. Check 423 mod7 3 (420),
                            mod11 5 (418), mod13 7 (416). Smallest positive 423.
                            Only n.
                      encrypted_content: EXAMPLE_ENCRYPTED_CONTENT
                    - id: example_ae5b7d_msg
                      type: message
                      status: completed
                      role: assistant
                      content:
                        - type: output_text
                          text: '423'
                          annotations: []
                    - type: message
                      role: user
                      content: Add one to that result. Return only the new integer.
              flash:
                summary: Call MiniMax-M3.1-Flash
                value:
                  model: MiniMax-M3.1-Flash
                  input: Explain recursion in one sentence.
                  max_output_tokens: 131072
      responses:
        '200':
          description: Generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponsesResponse'
              examples:
                with_reasoning:
                  summary: Response with reasoning
                  value:
                    id: example_ae5b7d
                    object: response
                    created_at: 1792405562
                    model: MiniMax-M3.1-Flash
                    status: completed
                    output:
                      - id: example_ae5b7d_rs
                        type: reasoning
                        status: completed
                        summary: []
                        content:
                          - type: reasoning_text
                            text: >-
                              We need solve CRT. Need only n. Compute. n=3 mod7,
                              5 mod11,7 mod13. Product 1001. Let's solve.


                              Use n=3+7a. mod11: 3+7a=5 =>7a=2 mod11. inverse7=8
                              (56=1), a=16=5 mod11. a=5+11b. n=38+77b. mod13:
                              38+77b = 12+12b mod13 (77=12,38=12) equals7
                              =>12b=-5=8 mod13. inverse12=12, b=96 mod13 =5? 91
                              remainder5. n=38+385=423. Check 423 mod7 3 (420),
                              mod11 5 (418), mod13 7 (416). Smallest positive
                              423. Only n.
                        encrypted_content: EXAMPLE_ENCRYPTED_CONTENT
                      - id: example_ae5b7d_msg
                        type: message
                        status: completed
                        role: assistant
                        content:
                          - type: output_text
                            text: '423'
                            annotations: []
                    output_text: '423'
                    usage:
                      input_tokens: 239
                      output_tokens: 190
                      total_tokens: 429
                      input_tokens_details:
                        cached_tokens: 174
                      output_tokens_details:
                        reasoning_tokens: 189
                    error: null
                    incomplete_details: null
                function_call:
                  summary: Tool call
                  value:
                    id: example_2ab00b
                    object: response
                    created_at: 1792405566
                    model: MiniMax-M3.1-Flash
                    status: completed
                    output:
                      - id: example_2ab00b_msg
                        type: message
                        status: completed
                        role: assistant
                        content:
                          - type: output_text
                            text: I'll check the stock level for that product now.
                            annotations: []
                      - id: example_2ab00b_fc_0
                        type: function_call
                        status: completed
                        call_id: call_example_1
                        name: get_product_stock
                        arguments: '{"product_id": "demo-item-001"}'
                    output_text: I'll check the stock level for that product now.
                    usage:
                      input_tokens: 479
                      output_tokens: 43
                      total_tokens: 522
                      input_tokens_details:
                        cached_tokens: 174
                    error: null
                    incomplete_details: null
                incomplete:
                  summary: Output limit reached (status=incomplete)
                  value:
                    id: example_de610c
                    object: response
                    created_at: 1792401719
                    model: MiniMax-M3.1-Flash
                    status: incomplete
                    output:
                      - id: example_de610c_rs
                        type: reasoning
                        status: completed
                        summary: []
                        content:
                          - type: reasoning_text
                            text: I need to explain the process step by step.
                        encrypted_content: EXAMPLE_ENCRYPTED_CONTENT
                    output_text: null
                    usage:
                      input_tokens: 211
                      output_tokens: 8
                      total_tokens: 219
                      input_tokens_details:
                        cached_tokens: 195
                      output_tokens_details:
                        reasoning_tokens: 8
                    error: null
                    incomplete_details:
                      reason: max_output_tokens
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: invalid_prompt
                  message: Invalid request parameters
                  type: invalid_request_error
        '401':
          description: Unauthenticated, invalid or expired token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 401
                  message: Invalid authentication credentials
                  type: authentication_error
        '402':
          description: Insufficient quota, recharge required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 402
                  message: Insufficient quota
                  type: insufficient_quota
        '403':
          description: Access denied for this model
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 403
                  message: Model access denied
                  type: permission_error
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 404
                  message: Model not found
                  type: not_found_error
        '413':
          description: Request body too large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 413
                  message: Request entity too large
                  type: invalid_request_error
        '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
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 500
                  message: Internal server error
                  type: server_error
        '502':
          description: Bad gateway
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 502
                  message: Bad gateway
                  type: server_error
        '503':
          description: Service temporarily unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 503
                  message: Service temporarily unavailable
                  type: server_error
components:
  schemas:
    ResponsesRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          description: >-
            | Model | Context (tokens) | Maximum output (tokens) |

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

            | `MiniMax-M4` | 1,000,000 | 262,144 |

            | `MiniMax-M3.1-Flash` | 1,000,000 | 524,288 |


            Only `MiniMax-M4` and `MiniMax-M3.1-Flash` support Responses. For
            `MiniMax-M3` and `MiniMax-M2.5`, use [Chat
            Completions](/en/api-manual/language-series/minimax/chat-completions/chat-completions-quickstart)
            or
            [Messages](/en/api-manual/language-series/minimax/messages/messages-quickstart).
            `MiniMax-M4` and `MiniMax-M3.1-Flash` always use reasoning. Adjust
            reasoning depth with `reasoning.effort`. Both models accept images
            and video.
          enum:
            - MiniMax-M4
            - MiniMax-M3.1-Flash
          example: MiniMax-M4
        input:
          type:
            - string
            - array
          description: >-
            Model input.


            - **String**: treated as a single `user` message

            - **Array**: input items of type `message`, `function_call`,
            `function_call_output`, or `reasoning`


            **Multimodal input**: combine `input_text`, `input_image`, and
            `input_video` blocks in message `content`.


            **Conversation history**: requests are stateless. Include the
            complete history in the array for each turn.
          items:
            $ref: '#/components/schemas/InputItem'
          example: Explain recursion in one sentence.
        instructions:
          type: string
          description: >-
            System-level instructions, equivalent to a system message inserted
            at the very front; used to set the role, tone and output
            constraints.
          example: >-
            You are a technical documentation assistant. Keep your answers
            concise.
        stream:
          type: boolean
          description: >-
            Whether to stream the response.


            - `false` (default): return the complete response at once

            - `true`: send semantic SSE events ending with `response.completed`,
            without a `[DONE]` marker
          default: false
          example: false
        max_output_tokens:
          type: integer
          description: >-
            Maximum output (including reasoning tokens)


            | Model | Suggested output | Maximum output |

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

            | `MiniMax-M4` | 131,072 | 262,144 |

            | `MiniMax-M3.1-Flash` | 131,072 | 524,288 |


            Start with an output budget of at least 1,024 tokens. If reasoning
            uses the entire budget, the response may contain no answer text. If
            `status="incomplete"` and
            `incomplete_details.reason="max_output_tokens"`, raise the output
            limit.
          minimum: 1
          maximum: 524288
          example: 131072
        reasoning:
          type: object
          description: >-
            `MiniMax-M4` and `MiniMax-M3.1-Flash` always use reasoning. In
            Responses, reasoning is returned as `reasoning` output items.
            Reasoning tokens count towards the output limit and are billed at
            the output rate.
          properties:
            effort:
              type: string
              description: >-
                Reasoning effort: `low`, `medium`, `high`, `xhigh` or `max`
                (default). `none` returns HTTP 400. Higher effort typically uses
                more reasoning tokens and increases latency.
              enum:
                - low
                - medium
                - high
                - xhigh
                - max
              default: max
              example: high
        temperature:
          type: number
          description: Temperature is fixed at 1. Other values have no effect.
          enum:
            - 1
          default: 1
          example: 1
        top_p:
          type: number
          description: Fixed at 0.95. If supplied, use a value in (0, 1].
          exclusiveMinimum: 0
          maximum: 1
          default: 0.95
          example: 0.95
        tools:
          type: array
          description: >-
            Tools available to the model. Only `function` tools are supported.
            Execute the function on the client and return its result as a
            `function_call_output` input item.
          items:
            $ref: '#/components/schemas/Tool'
        tool_choice:
          type: string
          description: >-
            Tool selection strategy. Only `auto` is supported; the model decides
            whether to call a tool.
          enum:
            - auto
          default: auto
          example: auto
        text:
          type: object
          description: >-
            Text output format configuration. `format.type` only supports
            `text`.
          properties:
            format:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - text
                  default: text
                  description: Output format type
    ResponsesResponse:
      type: object
      description: >-
        Responses API response object. In addition to the fields below, the
        response includes the request configuration, such as `tools`,
        `tool_choice`, `temperature`, `top_p`, `text`, `reasoning`, and
        `max_output_tokens`.
      properties:
        id:
          type: string
          description: Unique identifier for this response
          example: resp_example
        object:
          type: string
          description: Object type, always `response`
          example: response
        created_at:
          type: integer
          description: Creation time as a Unix timestamp (seconds)
          example: 1792401878
        status:
          type: string
          description: |-
            Response status.

            - `completed`: generation completed
            - `incomplete`: generation was truncated; see `incomplete_details`
            - `failed`: generation failed; see `error`
          enum:
            - completed
            - incomplete
            - failed
          example: completed
        model:
          type: string
          description: ID of the model that actually generated this response
          example: MiniMax-M4
        output:
          type: array
          description: >-
            Output items in generation order:


            - `reasoning`: reasoning content, with an ID such as `<id>_rs`,
            `content` (`reasoning_text` blocks), `summary` (an empty array), and
            `encrypted_content`

            - `message`: final answer, with an ID such as `<id>_msg` and
            `content` (`output_text` blocks)

            - `function_call`: a function call, with an ID such as
            `<id>_fc_<index>`, `call_id`, `name`, and `arguments`. Execute it on
            the client and return a `function_call_output` item
          items:
            type: object
        output_text:
          type:
            - string
            - 'null'
          description: >-
            Convenience field containing all `output_text` blocks concatenated.
            `null` when there is no text output.
        error:
          type:
            - object
            - 'null'
          description: Failure reason; `null` on success
        incomplete_details:
          type:
            - object
            - 'null'
          description: >-
            Truncation details, or `null` if generation was not truncated.
            `reason` is `max_output_tokens` (output limit reached) or
            `content_filter` (content safety).
        usage:
          $ref: '#/components/schemas/Usage'
    ErrorResponse:
      type: object
      description: Error response
      properties:
        error:
          type: object
          properties:
            code:
              type:
                - integer
                - string
                - 'null'
              description: Error code
              example: invalid_prompt
            message:
              type: string
              description: Error description
              example: Invalid request parameters
            type:
              type: string
              description: Error type
              example: invalid_request_error
    InputItem:
      title: Input item
      description: >-
        Input item: a message, reasoning history, function call, or function
        result.
      oneOf:
        - $ref: '#/components/schemas/MessageItem'
        - $ref: '#/components/schemas/ReasoningItem'
        - $ref: '#/components/schemas/FunctionCallItem'
        - $ref: '#/components/schemas/FunctionCallOutputItem'
    Tool:
      type: object
      title: Tool definition
      required:
        - type
        - name
      properties:
        type:
          type: string
          description: Tool type. Only `function` is supported.
          enum:
            - function
          example: function
        name:
          type: string
          description: Function name
          example: get_product_stock
        description:
          type: string
          description: Function description to help the model decide when to call it.
          example: Get the current stock level for a product.
        parameters:
          type: object
          description: Parameter definition in JSON Schema format.
          example:
            type: object
            properties:
              product_id:
                type: string
                description: Product identifier.
            required:
              - product_id
    Usage:
      type: object
      description: Token usage statistics, including caching and reasoning details.
      properties:
        input_tokens:
          type: integer
          description: Total input tokens, including cached tokens.
          example: 207
        input_tokens_details:
          type: object
          description: Detailed breakdown of input tokens
          properties:
            cached_tokens:
              type: integer
              description: >-
                Number of cached input tokens.


                Cached tokens are billed at the cache-hit rate. Uncached tokens
                (`input_tokens - cached_tokens`) are billed at the standard
                input rate.
              example: 174
        output_tokens:
          type: integer
          description: Number of output tokens (including the thinking portion)
          example: 32
        output_tokens_details:
          type: object
          description: Detailed breakdown of output tokens
          properties:
            reasoning_tokens:
              type: integer
              description: Reasoning tokens, already included in `output_tokens`.
              example: 9
        total_tokens:
          type: integer
          description: Total tokens = input_tokens + output_tokens
          example: 239
    MessageItem:
      type: object
      title: Message item
      description: >-
        A conversation message. Preserve every returned field when sending
        assistant history.
      required:
        - role
        - content
      properties:
        type:
          type: string
          enum:
            - message
          default: message
        id:
          type: string
          description: Output item ID. Preserve it in conversation history.
        status:
          type: string
          description: Output item status. Preserve it in conversation history.
        role:
          type: string
          description: >-
            Message role, used only with `type: message`. `developer` is treated
            as `system`.
          enum:
            - user
            - assistant
            - system
            - developer
          example: user
        content:
          type:
            - string
            - array
          description: >-
            For `type: message`, pass plain text or an array of content blocks.
            Use `input_text` with `text`, `input_image` with `image_url`, or
            `input_video` with `video_url`. Previous assistant replies use
            `output_text`. Each request, including history, accepts up to 200
            images and 20 videos. Maximum body size: 64 MB.
          items:
            $ref: '#/components/schemas/ContentPart'
          example: Explain recursion in one sentence.
    ReasoningItem:
      type: object
      title: Reasoning item
      description: >-
        Reasoning returned in the previous turn. Preserve the complete item,
        including `id`, `status`, `summary`, `content`, and `encrypted_content`,
        when continuing the conversation.
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - reasoning
        id:
          type: string
          description: Output item ID. Preserve it in conversation history.
        status:
          type: string
          description: Output item status. Preserve it in conversation history.
        summary:
          type: array
          description: >-
            Reasoning summary. Preserve it unchanged when passing conversation
            history.
          items:
            type: object
        content:
          type: array
          description: Reasoning content blocks. Preserve them in conversation history.
          items:
            $ref: '#/components/schemas/ReasoningContentPart'
        encrypted_content:
          type: string
          description: >-
            Opaque reasoning data. Preserve it in conversation history. The
            example uses a placeholder for `encrypted_content`. When sending the
            next request, use the complete value from your previous response.
    FunctionCallItem:
      type: object
      title: Function call item
      description: >-
        A function call returned by the model, paired with a
        `function_call_output` item through `call_id`.
      required:
        - type
        - call_id
        - name
        - arguments
      properties:
        type:
          type: string
          enum:
            - function_call
        id:
          type: string
          description: Output item ID. Preserve it in conversation history.
        status:
          type: string
          description: Output item status. Preserve it in conversation history.
        call_id:
          type: string
          description: >-
            Function call identifier; `function_call` and `function_call_output`
            are paired through it.
        name:
          type: string
          description: 'Name of the called function, used only with `type: function_call`.'
        arguments:
          type: string
          description: >-
            Function call arguments as a JSON string, used only with `type:
            function_call`.
    FunctionCallOutputItem:
      type: object
      title: Function result item
      description: >-
        The result of a function executed by the client, paired with its
        function call through `call_id`.
      required:
        - type
        - call_id
        - output
      properties:
        type:
          type: string
          enum:
            - function_call_output
        call_id:
          type: string
          description: >-
            Function call identifier; `function_call` and `function_call_output`
            are paired through it.
        output:
          type: string
          description: >-
            Function execution result, used only with `type:
            function_call_output`.
    ContentPart:
      type: object
      title: Content block
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - input_text
            - input_image
            - input_video
            - output_text
          description: Content block type.
        text:
          type: string
          description: Text content (`input_text` / `output_text`).
        image_url:
          description: >-
            Image input for `type: input_image`. Accepts a URL / Base64 data URL
            string, or an object such as `{"url": "...", "detail": "low |
            default | high"}` to control resolution. Higher resolution increases
            detail and token usage. Supports JPEG / PNG / GIF / WEBP, up to 10
            MB per image.
          oneOf:
            - type: string
            - type: object
              required:
                - url
              properties:
                url:
                  type: string
                  description: Image URL or Base64 data URL.
                detail:
                  type: string
                  enum:
                    - low
                    - default
                    - high
                  default: default
                  description: Resolution level.
        video_url:
          description: >-
            For `type: input_video`, pass a URL, a Base64 data URL or an object
            such as `{"url": "...", "fps": 2, "detail": "default",
            "max_long_side_pixel": ...}`. Frame sampling rate in frames per
            second. Default 2, range [0.2, 5]. Higher values capture more motion
            and consume more tokens. Video formats: MP4, AVI, MOV and MKV. Each
            video can be up to 50 MB and 30 minutes long.
          oneOf:
            - type: string
            - type: object
              required:
                - url
              properties:
                url:
                  type: string
                  description: Video URL or Base64 data URL
                fps:
                  type: number
                  minimum: 0.2
                  maximum: 5
                  default: 2
                  description: Frame sampling rate.
                detail:
                  type: string
                  enum:
                    - low
                    - default
                    - high
                  default: default
                  description: Resolution level.
                max_long_side_pixel:
                  type: integer
                  minimum: 1
                  description: Maximum length of a video frame's longest side, in pixels.
    ReasoningContentPart:
      type: object
      title: Reasoning content block
      required:
        - type
        - text
      properties:
        type:
          type: string
          enum:
            - reasoning_text
        text:
          type: string
          description: Reasoning text.
  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

        ```

````

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