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

# Doubao Seed 2.0 Responses API - Complete API Reference

> - Use Responses API format to call Doubao Seed 2.0 series models
- **Server-side context storage**: Implement multi-turn conversations via `previous_response_id`, no need to manually pass conversation history
- **Multimodal input**: Supports text + image + video + file (PDF) mixed input
- **Deep thinking**: Supports thinking chain-of-thought mode
- **Tool calling**: Supports Function Calling, web search, image processing, MCP tools, private knowledge base, Doubao App
- **Context caching**: Supports caching mechanism to reduce costs
- **Structured output**: Supports JSON Object / JSON Schema format
- **Context management**: Supports context_management strategy
- Quick start? Check out the [Quick Start Guide](./doubao-seed-2.0-responses-quickstart)

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


## OpenAPI

````yaml /en/api-manual/language-series/doubao-seed-2.0/doubao-seed-2.0-responses-reference.json POST /v1/responses
openapi: 3.1.0
info:
  title: Doubao Seed 2.0 Responses API Complete Parameter Documentation
  description: >-
    Doubao Seed 2.0 Responses API complete reference, including all parameters
    and advanced features
  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 API
    description: Responses API chat generation interface
paths:
  /v1/responses:
    post:
      tags:
        - Responses API
      summary: Doubao Seed 2.0 Responses API
      description: >-
        - Use Responses API format to call Doubao Seed 2.0 series models

        - **Server-side context storage**: Implement multi-turn conversations
        via `previous_response_id`, no need to manually pass conversation
        history

        - **Multimodal input**: Supports text + image + video + file (PDF) mixed
        input

        - **Deep thinking**: Supports thinking chain-of-thought mode

        - **Tool calling**: Supports Function Calling, web search, image
        processing, MCP tools, private knowledge base, Doubao App

        - **Context caching**: Supports caching mechanism to reduce costs

        - **Structured output**: Supports JSON Object / JSON Schema format

        - **Context management**: Supports context_management strategy

        - Quick start? Check out the [Quick Start
        Guide](./doubao-seed-2.0-responses-quickstart)
      operationId: createResponseDoubaoSeed20
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResponseRequest'
            examples:
              simple_text:
                summary: Plain text input
                value:
                  model: doubao-seed-2.0-pro
                  input: Please introduce yourself
              multi_turn:
                summary: Multi-turn conversation (via previous_response_id)
                value:
                  model: doubao-seed-2.0-pro
                  input: What are its advantages?
                  previous_response_id: resp_0217****
              message_array:
                summary: Message list input
                value:
                  model: doubao-seed-2.0-pro
                  input:
                    - role: system
                      type: message
                      content: You are a professional Python programming assistant.
                    - role: user
                      type: message
                      content: How to read a file?
              thinking_mode:
                summary: Enable deep thinking mode
                value:
                  model: doubao-seed-2.0-pro
                  input: Prove that sqrt(2) is irrational
                  thinking:
                    type: enabled
              web_search:
                summary: Web search
                value:
                  model: doubao-seed-2.0-pro
                  input: What's the weather like in Beijing today?
                  tools:
                    - type: web_search
      responses:
        '200':
          description: Response generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseObject'
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 400
                  message: Invalid request parameters
                  type: invalid_request_error
        '401':
          description: Unauthenticated, token invalid or expired
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 401
                  message: Invalid or expired token
                  type: authentication_error
        '402':
          description: Insufficient quota, payment required
          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
        '403':
          description: Access denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 403
                  message: Access denied for this model
                  type: permission_error
                  param: model
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 404
                  message: Specified model not found
                  type: not_found_error
                  param: model
                  fallback_suggestion: doubao-seed-2.0-pro
        '413':
          description: Request body too large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 413
                  message: File too large
                  type: request_too_large_error
                  fallback_suggestion: compress file to under 50MB
        '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
        '502':
          description: Upstream service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: 502
                  message: Upstream AI service unavailable
                  type: upstream_error
                  fallback_suggestion: try different model
        '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:
    ResponseRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          description: |-
            Chat model name

            - `doubao-seed-2.0-pro`: Flagship, strongest overall capability
            - `doubao-seed-2.0-lite`: Lightweight, faster speed
            - `doubao-seed-2.0-mini`: Ultra-fast, quickest response
            - `doubao-seed-2.0-code`: Code-specialized
          enum:
            - doubao-seed-2.0-pro
            - doubao-seed-2.0-lite
            - doubao-seed-2.0-mini
            - doubao-seed-2.0-code
          default: doubao-seed-2.0-pro
          example: doubao-seed-2.0-pro
        input:
          description: >-
            Input content. Supports two formats:


            **1. Plain text string**: Equivalent to text input from the user
            role


            **2. Element list (array)**: Contains multiple input types including
            messages, context, tool calls, etc.
          oneOf:
            - type: string
              description: Plain text input
            - type: array
              description: Input element list
              items:
                $ref: '#/components/schemas/InputItem'
        instructions:
          type: string
          nullable: true
          description: >-
            Insert a system message or developer instruction as the first
            instruction in the model context


            **Note**:

            - When used with previous_response_id, instructions from the
            previous response are not inherited

            - Cannot be used together with caching
        previous_response_id:
          type: string
          nullable: true
          description: >-
            Unique identifier of the previous model response, used to implement
            multi-turn conversations


            **Note**:

            - When provided, it will include the input and response content from
            the previous round, and the input tokens for the current request
            will increase accordingly

            - In continuous multi-turn conversations, it is recommended to add
            approximately 100ms delay between each request
        expire_at:
          type: integer
          description: >-
            Storage expiration time, UTC Unix timestamp (seconds)


            **Note**:

            - Value range: (creation time, creation time + 604800], i.e.,
            maximum retention of 7 days

            - Default: creation time + 259200 (3 days)

            - Applies to both store and caching

            - Cache storage is billed by time, less than 1 hour is counted as 1
            hour
        max_output_tokens:
          type: integer
          nullable: true
          description: >-
            Maximum number of output tokens from the model, including model
            response and chain-of-thought content
          example: 32768
        thinking:
          type: object
          description: Controls whether the model enables deep thinking mode
          properties:
            type:
              type: string
              description: >-
                Thinking mode


                - `enabled`: Enable thinking mode, model must think before
                answering

                - `disabled`: Disable thinking mode, model answers directly

                - `auto`: Auto thinking mode, model decides whether to think
              enum:
                - enabled
                - disabled
                - auto
          required:
            - type
        reasoning:
          type: object
          description: >-
            Limit deep thinking workload, reducing it can make responses faster
            and use fewer tokens
          properties:
            effort:
              type: string
              description: |-
                Thinking depth

                - `minimal`: Disable thinking, answer directly
                - `low`: Lightweight thinking, focused on fast response
                - `medium`: Balanced mode, balancing speed and depth
                - `high`: Deep analysis, handles complex problems
              enum:
                - minimal
                - low
                - medium
                - high
              default: medium
        caching:
          type: object
          description: >-
            Whether to enable context caching


            **Note**: Cannot be used together with instructions field or tools
            field (except Function Calling)
          properties:
            type:
              type: string
              description: |-
                Cache toggle

                - `enabled`: Enable caching
                - `disabled`: Disable caching
              enum:
                - enabled
                - disabled
              default: disabled
            prefix:
              type: boolean
              description: >-
                Whether to only create a common prefix cache (model does not
                respond)


                - `true`: Only create common prefix cache

                - `false`: Do not create common prefix cache
              default: false
          required:
            - type
        store:
          type: boolean
          nullable: true
          description: >-
            Whether to store the generated model response for later retrieval
            via API


            - `true`: Store the current model response

            - `false`: Do not store
          default: true
        stream:
          type: boolean
          nullable: true
          description: >-
            Whether to stream the response content


            - `false`: Return all content at once after the model finishes
            generating

            - `true`: Return chunks progressively via SSE protocol, ending with
            a `data: [DONE]` message
          default: false
        temperature:
          type: number
          nullable: true
          description: >-
            Sampling temperature, controls output randomness


            - Value range: [0, 2]

            - Lower values are more deterministic, higher values are more random

            - It is recommended to adjust only one of temperature or top_p


            **Note**: doubao-seed-2.0-pro and doubao-seed-2.0-lite are fixed at
            1, manual specification will be ignored
          minimum: 0
          maximum: 2
          default: 1
        top_p:
          type: number
          nullable: true
          description: >-
            Nucleus sampling probability threshold


            - Value range: [0, 1]

            - It is recommended to adjust only one of temperature or top_p


            **Note**: doubao-seed-2.0-pro and doubao-seed-2.0-lite are fixed at
            0.95, manual specification will be ignored
          minimum: 0
          maximum: 1
          default: 0.7
        text:
          type: object
          description: Format definition for model text output
          properties:
            format:
              type: object
              description: Specify the model text output format
              properties:
                type:
                  type: string
                  description: |-
                    Format type

                    - `text`: Natural language (default)
                    - `json_object`: JSON object format
                    - `json_schema`: JSON format following a schema definition
                  enum:
                    - text
                    - json_object
                    - json_schema
                  default: text
                name:
                  type: string
                  description: JSON structure name (required when type is json_schema)
                schema:
                  type: object
                  description: >-
                    JSON Schema format definition (required when type is
                    json_schema)
                description:
                  type: string
                  nullable: true
                  description: Description of the response purpose
                strict:
                  type: boolean
                  nullable: true
                  description: Whether to enable strict adherence mode
                  default: false
              required:
                - type
        tools:
          type: array
          description: |-
            List of tools the model can call

            Supported tool types:
            - `function`: Custom function (Function Calling)
            - `web_search`: Web search
            - `doubao_app`: Doubao App
            - `image_process`: Image processing
            - `mcp`: MCP tools
            - `knowledge_search`: Private knowledge base search
          items:
            $ref: '#/components/schemas/Tool'
        tool_choice:
          description: |-
            Controls whether the model calls tools

            **String mode**:
            - `none`: Do not call tools
            - `required`: Must call tools
            - `auto`: Model decides (default)

            **Object mode**: Specify a particular tool to call
          oneOf:
            - type: string
              enum:
                - none
                - auto
                - required
            - $ref: '#/components/schemas/ToolChoiceObject'
        max_tool_calls:
          type: integer
          description: >-
            Maximum number of tool call rounds (unlimited calls per round)


            - Value range: [1, 10]

            - Web Search default: 3

            - Image Process default: 10 (modification not supported)

            - Knowledge Search default: 3


            **Note**: This parameter operates on a best-effort basis; the actual
            number of calls is influenced by model inference performance and
            other factors
          minimum: 1
          maximum: 10
        context_management:
          type: object
          description: >-
            Context management strategy to help the model effectively utilize
            the context window
          properties:
            edits:
              type: array
              description: Context edit strategy list
              items:
                $ref: '#/components/schemas/ContextEdit'
    ResponseObject:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for this response
          example: resp_02177148667427813c33c36521378d02b2c8389204fa8c3e2f63e
        object:
          type: string
          description: Object type, fixed as response
          enum:
            - response
          example: response
        created_at:
          type: number
          description: Unix timestamp (seconds) of creation time
          example: 1771486674
        model:
          type: string
          description: Actual model name and version used
          example: doubao-seed-2-0-code-preview-260215
        status:
          type: string
          description: |-
            Response status

            - `completed`: Generation completed
            - `in_progress`: Generation in progress
            - `incomplete`: Incomplete
            - `failed`: Failed
          enum:
            - completed
            - in_progress
            - incomplete
            - failed
          example: completed
        output:
          type: array
          description: >-
            Model output content list, including chain-of-thought output,
            message output, tool call output, etc.
          items:
            $ref: '#/components/schemas/OutputItem'
        service_tier:
          type: string
          description: |-
            Service tier for this request

            - `default`: Default service tier
            - `scale`: Used guaranteed package quota
          example: default
        instructions:
          type: string
          nullable: true
          description: System instructions used for this request
        previous_response_id:
          type: string
          nullable: true
          description: Referenced previous response ID
        max_output_tokens:
          type: integer
          description: Maximum number of output tokens from the model
          example: 32768
        temperature:
          type: number
          nullable: true
          description: Sampling temperature used
        top_p:
          type: number
          nullable: true
          description: top_p value used
        thinking:
          type: object
          nullable: true
          description: Thinking mode configuration used
        tools:
          type: array
          nullable: true
          description: List of tools used
        tool_choice:
          nullable: true
          description: Tool choice configuration used
        parallel_tool_calls:
          type: boolean
          nullable: true
          description: Whether parallel tool calls are allowed
        text:
          type: object
          nullable: true
          description: Text output format configuration
        usage:
          $ref: '#/components/schemas/Usage'
        caching:
          type: object
          description: Caching configuration
          properties:
            type:
              type: string
              enum:
                - enabled
                - disabled
        store:
          type: boolean
          description: Whether the response was stored
        expire_at:
          type: integer
          description: Storage expiration time (Unix timestamp)
          example: 1756539922
        error:
          type: object
          nullable: true
          description: Error information, null on success
        incomplete_details:
          type: object
          nullable: true
          description: Detailed reason for incompleteness
    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 on error
    InputItem:
      type: object
      description: >-
        Input element, can be a message, tool call information, tool return
        information, or chain-of-thought information
      properties:
        type:
          type: string
          description: |-
            Input type

            - `message`: Message input
            - `function_call`: Tool function call information
            - `function_call_output`: Tool return information
            - `reasoning`: Chain-of-thought information
          enum:
            - message
            - function_call
            - function_call_output
            - reasoning
        role:
          type: string
          description: |-
            Message role (when type is message)

            - `user`: User message
            - `system`: System message
            - `assistant`: Assistant message
            - `developer`: Developer message (higher priority than user)
          enum:
            - user
            - system
            - assistant
            - developer
        content:
          description: >-
            Message content, supports plain text string or content object array
            (text, image, video, file)
          oneOf:
            - type: string
            - type: array
              items:
                $ref: '#/components/schemas/InputContentPart'
        partial:
          type: boolean
          description: >-
            Continuation mode (assistant role only)


            Set the last assistant message's partial to true, and the model will
            continue writing based on the content
        status:
          type: string
          description: Item status
          enum:
            - in_progress
            - completed
            - incomplete
        arguments:
          type: string
          description: >-
            JSON string of function arguments (required when type is
            function_call)
        call_id:
          type: string
          description: >-
            Unique ID of the function tool call (required when type is
            function_call/function_call_output)
        name:
          type: string
          description: Function name (required when type is function_call)
        output:
          type: string
          description: Tool output result (required when type is function_call_output)
        id:
          type: string
          description: >-
            Unique identifier for chain-of-thought information (when type is
            reasoning)
        summary:
          type: array
          description: Chain-of-thought content (when type is reasoning)
          items:
            type: object
            properties:
              text:
                type: string
                description: Chain-of-thought text
              type:
                type: string
                description: Type, fixed as summary_text
                enum:
                  - summary_text
    Tool:
      type: object
      description: Tool definition. Select different tool types based on the type field
      required:
        - type
      properties:
        type:
          type: string
          description: |-
            Tool type

            - `function`: Custom function
            - `web_search`: Web search
            - `doubao_app`: Doubao App
            - `image_process`: Image processing
            - `mcp`: MCP tools
            - `knowledge_search`: Private knowledge base search
          enum:
            - function
            - web_search
            - doubao_app
            - image_process
            - mcp
            - knowledge_search
        name:
          type: string
          description: Function name (required when type is function)
        description:
          type: string
          description: Function description / knowledge base description
        parameters:
          type: object
          description: Function parameters, in JSON Schema format (when type is function)
        strict:
          type: boolean
          description: >-
            Whether to enforce strict parameter validation (when type is
            function)
          default: true
        feature:
          type: object
          description: Doubao App sub-features (when type is doubao_app)
          properties:
            chat:
              type: object
              description: Daily chat feature
              properties:
                type:
                  type: string
                  enum:
                    - enabled
                    - disabled
                  default: disabled
                role_description:
                  type: string
                  description: >-
                    Role setting (mutually exclusive with system prompt /
                    instructions)
            deep_chat:
              type: object
              description: Deep chat feature
              properties:
                type:
                  type: string
                  enum:
                    - enabled
                    - disabled
                  default: disabled
                role_description:
                  type: string
                  description: Role setting
            ai_search:
              type: object
              description: Web search feature
              properties:
                type:
                  type: string
                  enum:
                    - enabled
                    - disabled
                  default: disabled
                role_description:
                  type: string
                  description: Role setting
            reasoning_search:
              type: object
              description: Think-and-search feature
              properties:
                type:
                  type: string
                  enum:
                    - enabled
                    - disabled
                  default: disabled
                role_description:
                  type: string
                  description: Role setting
        user_location:
          type: object
          description: User geographic location (when type is doubao_app / web_search)
          properties:
            type:
              type: string
              description: Location type
              default: approximate
            country:
              type: string
              description: Country
            region:
              type: string
              description: Province/Region
            city:
              type: string
              description: City
        sources:
          type: array
          description: |-
            Additional content sources for web search (when type is web_search)

            - `toutiao`: Toutiao articles
            - `douyin`: Douyin encyclopedia
            - `moji`: Moji Weather
          items:
            type: string
            enum:
              - toutiao
              - douyin
              - moji
        limit:
          type: integer
          description: |-
            Maximum number of retrieved results

            - web_search: [1, 50], default 10
            - knowledge_search: [1, 200], default 10
        max_keyword:
          type: integer
          description: >-
            Maximum number of parallel search keywords, value range [1, 50]
            (web_search / knowledge_search)
        point:
          type: object
          description: Point/line drawing feature (when type is image_process)
          properties:
            type:
              type: string
              enum:
                - enabled
                - disabled
              default: enabled
        grounding:
          type: object
          description: Box selection/cropping feature (when type is image_process)
          properties:
            type:
              type: string
              enum:
                - enabled
                - disabled
              default: enabled
        zoom:
          type: object
          description: Zoom feature (when type is image_process)
          properties:
            type:
              type: string
              enum:
                - enabled
                - disabled
              default: enabled
        rotate:
          type: object
          description: Rotation feature (when type is image_process)
          properties:
            type:
              type: string
              enum:
                - enabled
                - disabled
              default: enabled
        server_label:
          type: string
          description: MCP Server label (required when type is mcp)
        server_url:
          type: string
          description: MCP Server access URL (required when type is mcp)
        headers:
          type: object
          description: MCP server HTTP request headers (when type is mcp)
          additionalProperties:
            type: string
        require_approval:
          description: >-
            MCP tool approval settings (when type is mcp)


            **String mode**: `always` (all require confirmation) / `never` (no
            confirmation needed)


            **Object mode**: Specify which tools require/do not require approval
          oneOf:
            - type: string
              enum:
                - always
                - never
            - type: object
              properties:
                always:
                  type: object
                  properties:
                    tool_names:
                      type: array
                      items:
                        type: string
                      description: List of tool names that require confirmation
                never:
                  type: object
                  properties:
                    tool_names:
                      type: array
                      items:
                        type: string
                      description: List of tool names that do not require confirmation
        allowed_tools:
          description: |-
            MCP tool loading scope (when type is mcp)

            **Array mode**: List of allowed tool names to load

            **Object mode**: Specify via tool_names
          oneOf:
            - type: array
              items:
                type: string
            - type: object
              properties:
                tool_names:
                  type: array
                  items:
                    type: string
        knowledge_resource_id:
          type: string
          description: Private knowledge base ID (required when type is knowledge_search)
        doc_filters:
          type: object
          description: >-
            Knowledge base retrieval filter conditions (when type is
            knowledge_search)
        dense_weight:
          type: number
          description: >-
            Dense vector weight (when type is knowledge_search)


            - Value range: [0.2, 1]

            - 1 means pure dense retrieval, approaching 0 means pure lexical
            retrieval

            - Only effective in hybrid retrieval (hnsw_hybrid) mode
          minimum: 0.2
          maximum: 1
          default: 0.5
        ranking_options:
          type: object
          description: >-
            Knowledge base retrieval post-processing options (when type is
            knowledge_search)
          properties:
            rerank_switch:
              type: boolean
              description: Whether to enable automatic reranking
              default: false
            retrieve_count:
              type: integer
              description: >-
                Number of chunks entering reranking (effective when
                rerank_switch is true)
              default: 25
            get_attachment_link:
              type: boolean
              description: Whether to get temporary download links for images in chunks
              default: false
            chunk_diffusion_count:
              type: integer
              description: |-
                Return neighboring chunks around the matched chunk

                Value range: [0, 5], 0 means no chunk diffusion
              minimum: 0
              maximum: 5
              default: 0
            chunk_group:
              type: boolean
              description: >-
                Text aggregation, re-aggregate and sort chunks by document and
                order
              default: false
            rerank_model:
              type: string
              description: >-
                Rerank model selection


                - `base-multilingual-rerank` (recommended): Fast, long text, 70+
                languages

                - `m3-v2-rerank`: General text, 100+ languages
              enum:
                - base-multilingual-rerank
                - m3-v2-rerank
              default: base-multilingual-rerank
            rerank_only_chunk:
              type: boolean
              description: |-
                Whether to calculate rerank score based on chunk content only

                - `true`: Based on chunk content only
                - `false`: Based on chunk title + content
              default: false
    ToolChoiceObject:
      type: object
      required:
        - type
      description: Specify a particular tool to call
      properties:
        type:
          type: string
          description: |-
            Tool type

            - `function`: Custom function, requires the name field
            - Other built-in tool names
        name:
          type: string
          description: Name of the tool to call (required when type is function)
    ContextEdit:
      type: object
      description: Context edit strategy
      properties:
        type:
          type: string
          description: |-
            Strategy type

            - `clear_thinking`: Thinking block clear
            - `clear_tool_uses`: Tool call content clear
          enum:
            - clear_thinking
            - clear_tool_uses
        keep:
          description: |-
            Content retention strategy

            **String mode**: `all` (retain all chain-of-thought)

            **Object mode**: Specify retention strategy
          oneOf:
            - type: string
              enum:
                - all
            - type: object
              properties:
                type:
                  type: string
                  description: >-
                    Retention strategy type


                    - `thinking_turns`: Retain the most recent N rounds of
                    chain-of-thought

                    - `tool_uses`: Retain the most recent N rounds of tool calls
                  enum:
                    - thinking_turns
                    - tool_uses
                value:
                  type: integer
                  description: Number of rounds to retain
                  default: 1
        exclude_tools:
          type: array
          description: >-
            List of tool names that will not be cleared (when type is
            clear_tool_uses)
          items:
            type: string
        clear_tool_input:
          type: boolean
          description: Whether to clear tool call arguments (when type is clear_tool_uses)
          default: false
        trigger:
          type: object
          description: >-
            Threshold to trigger the clear strategy (when type is
            clear_tool_uses)
          properties:
            type:
              type: string
              description: Trigger type
              enum:
                - tool_uses
            value:
              type: integer
              description: Trigger clearing when tool calls reach N rounds
    OutputItem:
      oneOf:
        - $ref: '#/components/schemas/ReasoningOutput'
        - $ref: '#/components/schemas/MessageOutput'
        - $ref: '#/components/schemas/FunctionCallOutput'
    Usage:
      type: object
      description: Token usage statistics
      properties:
        input_tokens:
          type: integer
          description: Number of input tokens
          example: 88
        input_tokens_details:
          type: object
          description: Input token details
          properties:
            cached_tokens:
              type: integer
              description: Number of cached tokens
              example: 0
        output_tokens:
          type: integer
          description: Number of output tokens
          example: 230
        output_tokens_details:
          type: object
          description: Output token details
          properties:
            reasoning_tokens:
              type: integer
              description: Number of reasoning/chain-of-thought tokens
              example: 211
        total_tokens:
          type: integer
          description: Total number of tokens
          example: 318
    InputContentPart:
      oneOf:
        - $ref: '#/components/schemas/InputText'
        - $ref: '#/components/schemas/InputImage'
        - $ref: '#/components/schemas/InputVideo'
        - $ref: '#/components/schemas/InputFile'
    ReasoningOutput:
      title: Chain-of-thought output
      type: object
      properties:
        id:
          type: string
          description: Output item ID
          example: rs_0217****404a
        type:
          type: string
          description: Output type
          enum:
            - reasoning
        summary:
          type: array
          description: Chain-of-thought content
          items:
            type: object
            properties:
              text:
                type: string
                description: Chain-of-thought text
              type:
                type: string
                enum:
                  - summary_text
        status:
          type: string
          enum:
            - in_progress
            - completed
            - incomplete
          example: completed
    MessageOutput:
      title: Message output
      type: object
      properties:
        id:
          type: string
          description: Output item ID
          example: msg_0217****a93c
        type:
          type: string
          enum:
            - message
        role:
          type: string
          enum:
            - assistant
        content:
          type: array
          description: Message content list
          items:
            type: object
            properties:
              text:
                type: string
                description: Text content
              type:
                type: string
                description: Content type
                enum:
                  - output_text
              annotations:
                type: array
                nullable: true
                description: Annotation information (web search sources, etc.)
        status:
          type: string
          enum:
            - in_progress
            - completed
            - incomplete
          example: completed
    FunctionCallOutput:
      title: Tool call output
      type: object
      properties:
        id:
          type: string
          description: Output item ID
        type:
          type: string
          enum:
            - function_call
        call_id:
          type: string
          description: Call ID
        name:
          type: string
          description: Function name
        arguments:
          type: string
          description: Function arguments JSON string
        status:
          type: string
          enum:
            - in_progress
            - completed
            - incomplete
    InputText:
      title: Text input
      type: object
      required:
        - type
        - text
      properties:
        type:
          type: string
          enum:
            - input_text
          description: Input type, fixed as input_text
        text:
          type: string
          description: Input text content
    InputImage:
      title: Image input
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - input_image
          description: Input type, fixed as input_image
        image_url:
          type: string
          description: Image URL or Base64-encoded data URL
        file_id:
          type: string
          description: File ID returned after uploading via the Files API
        detail:
          type: string
          description: |-
            Image understanding detail level

            - `low`: Low detail
            - `high`: High detail
            - `xhigh`: Ultra-high detail
          enum:
            - low
            - high
            - xhigh
        image_pixel_limit:
          type: object
          nullable: true
          description: >-
            Image pixel range limit


            Takes priority over the detail field. Pixel range must be within
            [196, 36000000]
          properties:
            max_pixels:
              type: integer
              description: |-
                Maximum pixel limit

                - Before doubao-seed-1.8: (min_pixels, 4014080]
                - doubao-seed-2.0: (min_pixels, 9031680]
            min_pixels:
              type: integer
              description: |-
                Minimum pixel limit

                - Before doubao-seed-1.8: [3136, max_pixels)
                - doubao-seed-2.0: [1764, max_pixels)
    InputVideo:
      title: Video input
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - input_video
          description: Input type, fixed as input_video
        video_url:
          type: string
          description: Video URL or Base64-encoded data URL
        file_id:
          type: string
          description: |-
            File ID returned after uploading via the Files API

            **Note**: When using file_id, the fps parameter is ignored
        fps:
          type: number
          description: |-
            Frame extraction rate

            - Value range: [0.2, 5]
            - Higher values are more sensitive to visual changes
            - Lower values use fewer tokens and are faster
          minimum: 0.2
          maximum: 5
    InputFile:
      title: File input
      type: object
      required:
        - type
      description: Currently only supports PDF files
      properties:
        type:
          type: string
          enum:
            - input_file
          description: Input type, fixed as input_file
        file_id:
          type: string
          description: File ID returned after uploading via the Files API
        file_data:
          type: string
          description: Base64-encoded file content (single file must not exceed 50MB)
        filename:
          type: string
          description: File name (required when using file_data)
        file_url:
          type: string
          description: Accessible URL of the file (file must not exceed 50MB)
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        ## All APIs require Bearer Token authentication ##


        **Get API Key:**


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


        **Add to request headers:**

        ```

        Authorization: Bearer YOUR_API_KEY

        ```

````