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

# mimo-v2.5-pro Chat Completions

> Invoke MIMO chat completions capability



## OpenAPI

````yaml api-reference/en/zmodelChat/mimo/mimo-v2.5-pro.json POST /v1/chat/completions
openapi: 3.0.1
info:
  title: mimo-v2.5-pro
  version: 1.0.0
  description: MIMO Chat Completions documentation
  license:
    name: Project License
    url: https://github.com/QuantumNous/new-api/blob/main/LICENSE
servers:
  - url: https://api.powertokens.ai
    description: Baze API server endpoint
security: []
tags:
  - name: MIMO Chat
    description: MIMO text chat
paths:
  /v1/chat/completions:
    post:
      tags:
        - MIMO Chat
      summary: mimo-v2.5-pro
      description: Invoke MIMO chat completions capability
      operationId: mimoChatCompletions_mimo_v2_5_pro_en
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatCompletionRequest'
            examples:
              Basic Call:
                summary: Basic text chat
                value:
                  model: mimo-v2.5-pro
                  messages:
                    - role: system
                      content: >-
                        You are MiMo, an AI assistant developed by Xiaomi. Today
                        is date: Tuesday, December 16, 2025. Your knowledge
                        cutoff date is December 2024.
                    - role: user
                      content: please introduce yourself
                  max_completion_tokens: 1024
                  temperature: 1
                  top_p: 0.95
                  stream: false
                  stop: null
                  frequency_penalty: 0
                  presence_penalty: 0
                  thinking:
                    type: disabled
              Streaming Response:
                summary: Streaming chat response
                value:
                  model: mimo-v2.5-pro
                  messages:
                    - role: system
                      content: >-
                        You are MiMo, an AI assistant developed by Xiaomi. Today
                        is date: Tuesday, December 16, 2025. Your knowledge
                        cutoff date is December 2024.
                    - role: user
                      content:
                        - type: text
                          text: please introduce yourself
                  max_completion_tokens: 1024
                  stream: true
              Function Call:
                summary: Chat with function calling
                value:
                  model: mimo-v2.5-pro
                  messages:
                    - role: system
                      content: >-
                        You are MiMo, an AI assistant developed by Xiaomi. Today
                        is date: Tuesday, December 16, 2025. Your knowledge
                        cutoff date is December 2024.
                    - role: user
                      content: What is the weather like in Boston today?
                  max_completion_tokens: 1024
                  tools:
                    - type: function
                      function:
                        name: get_current_weather
                        description: Get the current weather in a given location
                        parameters:
                          type: object
                          properties:
                            location:
                              type: string
                              description: The city and state, e.g. San Francisco, CA
                            unit:
                              type: string
                              enum:
                                - celsius
                                - fahrenheit
                          required:
                            - location
                  tool_choice: auto
              Structured Output:
                summary: Chat with structured output (JSON mode)
                value:
                  model: mimo-v2.5-pro
                  messages:
                    - role: system
                      content: >-
                        You are MiMo, an AI assistant developed by Xiaomi. Today
                        is date: Tuesday, December 16, 2025. Your knowledge
                        cutoff date is December 2024.
                    - role: user
                      content: >-
                        My name is Zhang San, I am 28 years old, my email
                        address is zhangsan@test.com, and my birthday is May 12,
                        1996. Please return the results in the following JSON
                        format. Note: The birthday must be in YYYY-MM-DD format.
                        {"name": "string or null", "age": "int or null",
                        "email": "string or null", "birthday": "string or null"}
                  max_completion_tokens: 1024
                  response_format:
                    type: json_object
              Deep Thinking:
                summary: Chat with deep thinking mode
                value:
                  model: mimo-v2.5-pro
                  messages:
                    - role: system
                      content: >-
                        You are MiMo, an AI assistant developed by Xiaomi. Today
                        is date: Tuesday, December 16, 2025. Your knowledge
                        cutoff date is December 2024.
                    - role: user
                      content: Introduce machine learning in three sentences.
                  max_completion_tokens: 1024
                  thinking:
                    type: enabled
      responses:
        '200':
          description: >-
            Success. Returns JSON in non-streaming mode; returns an SSE event
            stream in streaming mode.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletionResponse'
              examples:
                Basic Call:
                  summary: Non-streaming success response
                  value:
                    id: 8b51f9e0515949cb8207fbd35ea6ea5c
                    choices:
                      - finish_reason: stop
                        index: 0
                        message:
                          content: >-
                            Hello! I'm MiMo, Xiaomi's AI assistant created by
                            the Xiaomi LLM-Core team. I'm here to chat, help
                            answer questions, and assist with various
                            tasks—whether it's providing information,
                            brainstorming ideas, or just having a friendly
                            conversation. Feel free to ask me anything, and I'll
                            do my best to help! 😊
                          role: assistant
                          tool_calls: null
                    created: 1776848906
                    model: mimo-v2.5-pro
                    object: chat.completion
                    usage:
                      completion_tokens: 72
                      prompt_tokens: 57
                      total_tokens: 129
                      completion_tokens_details:
                        reasoning_tokens: 0
                      prompt_tokens_details: null
                Function Call:
                  summary: Function calling response
                  value:
                    id: 8778784df68043e39a2df03258ddeaa5
                    choices:
                      - finish_reason: tool_calls
                        index: 0
                        message:
                          content: ''
                          role: assistant
                          tool_calls:
                            - id: call_b837e211b7764dab9b56f4d8
                              function:
                                arguments: '{"location": "Boston, MA", "unit": "celsius"}'
                                name: get_current_weather
                              type: function
                          reasoning_content: >-
                            The user is asking about the current weather in
                            Boston. I should use the get_current_weather
                            function to get this information. Boston could refer
                            to Boston, MA. I'll call the function with location
                            "Boston, MA" and use celsius as the unit since
                            that's more commonly used in many places, but
                            actually the user didn't specify a unit. Looking at
                            the function parameters, I can choose celsius or
                            fahrenheit. Since Boston is in the US, maybe
                            fahrenheit would be more appropriate? Actually, I
                            should just pick a default or ask. But the
                            instructions say not to ask about optional
                            parameters if there are defaults. There's no default
                            specified in the schema, so I should choose one.
                            I'll go with celsius as it's more standard
                            internationally. Let me call the function.
                    created: 1776849125
                    model: mimo-v2.5-pro
                    object: chat.completion
                    usage:
                      completion_tokens: 196
                      prompt_tokens: 349
                      total_tokens: 545
                      completion_tokens_details:
                        reasoning_tokens: 161
                      prompt_tokens_details: null
                Structured Output:
                  summary: Structured output response
                  value:
                    id: f88d3e6c6b0043b09871487b5c52e4b4
                    choices:
                      - finish_reason: stop
                        index: 0
                        message:
                          content: >-
                            {"name": "Zhang San", "age": 28, "email":
                            "zhangsan@test.com", "birthday": "1996-05-12"}
                          role: assistant
                          tool_calls: null
                    created: 1776850034
                    model: mimo-v2.5-pro
                    object: chat.completion
                    usage:
                      completion_tokens: 41
                      prompt_tokens: 145
                      total_tokens: 186
                      completion_tokens_details:
                        reasoning_tokens: 0
                      prompt_tokens_details: null
                Deep Thinking:
                  summary: Deep thinking response
                  value:
                    id: 7f2cc80f34b541c49f5fcd40ad34bc73
                    choices:
                      - finish_reason: stop
                        index: 0
                        message:
                          content: >-
                            Machine learning is a field of artificial
                            intelligence that enables computers to learn from
                            data and improve their performance without being
                            explicitly programmed for every task. It uses
                            algorithms to identify patterns and make decisions
                            or predictions based on input information. This
                            approach powers everything from personalized
                            recommendations to advanced medical diagnostics.
                          role: assistant
                          tool_calls: null
                          reasoning_content: >-
                            Hmm, the user is asking for a concise introduction
                            to machine learning in exactly three sentences. This
                            seems straightforward but requires careful wording
                            to cover the core concepts without oversimplifying
                            or overcomplicating.


                            I should start with the basic definition, then
                            mention how it learns from data, and end with its
                            purpose and real-world relevance. The response
                            should flow naturally from "what it is" to "how it
                            works" to "why it matters."


                            Keeping it neutral and factual works best here—no
                            need for examples or jargon. Just three clear,
                            standalone sentences that collectively give a solid
                            overview.
                    created: 1776850089
                    model: mimo-v2.5-pro
                    object: chat.completion
                    usage:
                      completion_tokens: 179
                      prompt_tokens: 60
                      total_tokens: 239
                      completion_tokens_details:
                        reasoning_tokens: 121
                      prompt_tokens_details: null
            text/event-stream:
              schema:
                $ref: '#/components/schemas/ChatCompletionChunk'
              examples:
                Streaming Response:
                  summary: Streaming response with SSE events
                  value: >-
                    data:
                    {"id":"7ccecae1cc6445f395e0d41c85115663","object":"chat.completion.chunk","created":1776849042,"model":"mimo-v2.5-pro","choices":[{"index":0,"delta":{"role":"assistant","content":"","reasoning_content":null,"tool_calls":null},"logprobs":null,"finish_reason":null,"matched_stop":null}],"usage":null}


                    data:
                    {"id":"7ccecae1cc6445f395e0d41c85115663","choices":[{"delta":{"content":null,"role":null,"tool_calls":null,"reasoning_content":"Okay,
                    the
                    user"},"finish_reason":null,"index":0}],"created":1776849042,"model":"mimo-v2.5-pro","object":"chat.completion.chunk","usage":null}


                    data:
                    {"id":"7ccecae1cc6445f395e0d41c85115663","choices":[{"delta":{"content":null,"role":null,"tool_calls":null,"reasoning_content":"
                    is
                    asking"},"finish_reason":null,"index":0}],"created":1776849042,"model":"mimo-v2.5-pro","object":"chat.completion.chunk","usage":null}


                    data:
                    {"id":"7ccecae1cc6445f395e0d41c85115663","choices":[{"delta":{"content":null,"role":null,"tool_calls":null,"reasoning_content":"
                    me"},"finish_reason":null,"index":0}],"created":1776849042,"model":"mimo-v2.5-pro","object":"chat.completion.chunk","usage":null}


                    ...


                    data:
                    {"id":"7ccecae1cc6445f395e0d41c85115663","choices":[{"delta":{"content":"'m
                    ready","role":null,"tool_calls":null,"reasoning_content":null},"finish_reason":null,"index":0}],"created":1776849044,"model":"mimo-v2.5-pro","object":"chat.completion.chunk","usage":null}


                    data:
                    {"id":"7ccecae1cc6445f395e0d41c85115663","choices":[{"delta":{"content":"
                    to
                    help!","role":null,"tool_calls":null,"reasoning_content":null},"finish_reason":null,"index":0}],"created":1776849044,"model":"mimo-v2.5-pro","object":"chat.completion.chunk","usage":null}


                    data:
                    {"id":"7ccecae1cc6445f395e0d41c85115663","object":"chat.completion.chunk","created":1776849044,"model":"mimo-v2.5-pro","choices":[{"index":0,"delta":{"role":null,"content":null,"reasoning_content":null,"tool_calls":null},"logprobs":null,"finish_reason":"stop","matched_stop":151645}],"usage":null}


                    data:
                    {"id":"7ccecae1cc6445f395e0d41c85115663","choices":[],"created":1776849044,"model":"mimo-v2.5-pro","object":"chat.completion.chunk","usage":{"completion_tokens":123,"prompt_tokens":55,"total_tokens":178,"completion_tokens_details":{"reasoning_tokens":71},"prompt_tokens_details":null}}


                    data: [DONE]
        '400':
          description: Invalid request parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid_request:
                  summary: Parameter error
                  value:
                    error:
                      message: messages is required
                      type: invalid_request_error
                      param: messages
                      code: bad_request_body
        '401':
          description: Authentication failed, e.g. missing or invalid token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unauthorized:
                  summary: Unauthorized
                  value:
                    error:
                      message: Invalid token
                      type: api_error
                      code: access_denied
                      param: ''
        '429':
          description: Rate limit triggered or insufficient account quota.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                quota_exceeded:
                  summary: Insufficient quota or rate limited
                  value:
                    error:
                      message: Insufficient account quota, please retry later
                      type: api_error
                      code: insufficient_user_quota
                      param: ''
        '500':
          description: Internal server error while processing the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                internal_error:
                  summary: Internal processing failure
                  value:
                    error:
                      message: Internal processing failed, please retry later
                      type: api_error
                      code: gen_relay_info_failed
                      param: ''
      security:
        - BearerAuth: []
components:
  schemas:
    ChatCompletionRequest:
      type: object
      required:
        - model
        - messages
      description: MIMO chat completions request body.
      properties:
        model:
          type: string
          description: Model ID to use
          enum:
            - mimo-v2.5-pro
          example: mimo-v2.5-pro
        messages:
          type: array
          description: A list of messages comprising the conversation so far.
          minItems: 1
          items:
            $ref: '#/components/schemas/Message'
        frequency_penalty:
          type: number
          nullable: true
          default: 0
          minimum: -2
          maximum: 2
          description: >-
            A value between -2.0 and 2.0. Positive values penalize new tokens
            based on their existing frequency in the text so far, reducing the
            model's likelihood of repeating the same content.
        presence_penalty:
          type: number
          nullable: true
          default: 0
          minimum: -2
          maximum: 2
          description: >-
            Number between -2.0 and 2.0. Positive values penalize new tokens
            based on whether they have appeared in the text so far, increasing
            the model's likelihood to talk about new topics.
        max_completion_tokens:
          type: integer
          nullable: true
          description: >-
            The upper limit of tokens that can be generated in the chat
            completion, including visible output tokens and reasoning tokens.
            Default is 131072 for mimo-v2.5-pro. Range: [1, 131072]
        response_format:
          $ref: '#/components/schemas/ResponseFormat'
        stop:
          description: >-
            Up to 4 sequences where the API will stop generating further tokens
            when any of them is encountered. The returned text will not contain
            the stop sequences.
          nullable: true
          default: null
          oneOf:
            - type: string
            - type: array
              items:
                type: string
              maxItems: 4
        stream:
          type: boolean
          nullable: true
          default: false
          description: >-
            If set to true, the model's response data will be streamed to the
            client via SSE (server-sent events) during generation.
        thinking:
          $ref: '#/components/schemas/ThinkingConfig'
        temperature:
          type: number
          minimum: 0
          maximum: 1.5
          default: 1
          description: >-
            Sampling temperature to use, between 0 and 1.5. Higher values (e.g.,
            0.8) make the output more random, while lower values (e.g., 0.2)
            make it more focused and deterministic. We generally recommend
            altering this or top_p but not both. In thinking mode, mimo-v2.5-pro
            and mimo-v2.5 do not support custom temperature. Even if passed, the
            model will force the recommended default value of 1.0.
        tool_choice:
          $ref: '#/components/schemas/ToolChoice'
        top_p:
          type: number
          default: 0.95
          minimum: 0.01
          maximum: 1
          description: >-
            Probability threshold for nucleus sampling, controlling the
            diversity of text generation. Higher top_p values produce more
            diverse text; lower values produce more deterministic text. Since
            both temperature and top_p control text diversity, it is recommended
            to adjust only one of them. In thinking mode, mimo-v2.5-pro and
            mimo-v2.5 do not support custom top_p. Even if passed, the model
            will force the recommended default value of 0.95.
        tools:
          type: array
          description: >-
            A list of tools the model may call. Currently, both function tools
            and web_search tools are supported. Note: In multi-round tool calls
            under thinking mode, the model returns the reasoning_content field
            along with tool_calls. To continue the conversation, it is
            recommended to retain all historical reasoning_content in the
            messages array of each subsequent request for optimal performance.
          items:
            $ref: '#/components/schemas/ToolDefinition'
    ChatCompletionResponse:
      type: object
      description: Chat response object (non-streaming output).
      properties:
        id:
          type: string
          description: A unique identifier for the response.
        object:
          type: string
          description: The type of the object, which is chat.completion.
        created:
          type: integer
          description: >-
            The Unix timestamp (in seconds) when the chat completion was
            created.
        model:
          type: string
          description: The name of the model that generated the completion.
        choices:
          type: array
          description: A list of completions generated by the model.
          items:
            $ref: '#/components/schemas/ChatCompletionChoice'
        usage:
          $ref: '#/components/schemas/Usage'
    ChatCompletionChunk:
      type: object
      description: >-
        Chat response chunk object (streaming output). Each `data:` event in the
        SSE stream corresponds to a ChatCompletionChunk. The stream typically
        ends with `data: [DONE]`.
      properties:
        id:
          type: string
          description: >-
            Unique identifier for the chat completion object. Each data block
            uses the same ID.
        object:
          type: string
          enum:
            - chat.completion.chunk
          description: The object type, which is always chat.completion.chunk.
        created:
          type: integer
          description: >-
            Unix timestamp (in seconds) when the chat completion object was
            created. Each data block uses the same timestamp.
        model:
          type: string
          description: The model used to generate the response.
        choices:
          type: array
          description: List of generated reply options.
          items:
            $ref: '#/components/schemas/ChatCompletionChunkChoice'
        usage:
          description: Usage information for the chat completion request.
          allOf:
            - $ref: '#/components/schemas/Usage'
          nullable: true
    ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ErrorObject'
    Message:
      description: >-
        A single message in the conversation. Depending on the role, it is
        divided into five message types: developer, system, user, assistant, and
        tool.
      oneOf:
        - $ref: '#/components/schemas/DeveloperMessage'
        - $ref: '#/components/schemas/SystemMessage'
        - $ref: '#/components/schemas/UserMessage'
        - $ref: '#/components/schemas/AssistantRequestMessage'
        - $ref: '#/components/schemas/ToolMessage'
    ResponseFormat:
      type: object
      description: An object specifying the format that the model must output.
      oneOf:
        - type: object
          title: Text
          description: Default response format. Used for generating text responses.
          properties:
            type:
              type: string
              enum:
                - text
              description: The type of response format. Must be text.
          required:
            - type
        - type: object
          title: JSON object
          description: >-
            JSON object response format. Note: The model will not output JSON
            formatted content unless instructed to generate JSON in the system
            or user messages.
          properties:
            type:
              type: string
              enum:
                - json_object
              description: The type of response format. Must be json_object.
          required:
            - type
    ThinkingConfig:
      type: object
      description: >-
        Controls whether the model enables chain-of-thought (thinking) mode.
        Note: In multi-round tool calls under thinking mode, the model returns
        the reasoning_content field along with tool_calls. To continue the
        conversation, it is recommended to retain all historical
        reasoning_content in the messages array of each subsequent request for
        optimal performance. In thinking mode, mimo-v2.5-pro and mimo-v2.5 do
        not support custom temperature and top_p parameters. Even if passed, the
        model will force the recommended default values of 1.0 and 0.95
        respectively.
      properties:
        type:
          type: string
          enum:
            - enabled
            - disabled
          default: enabled
          description: >-
            Whether to enable chain-of-thought. For mimo-v2.5-pro and mimo-v2.5,
            the default value is enabled. Allowed values: enabled, disabled
      required:
        - type
    ToolChoice:
      oneOf:
        - type: string
          enum:
            - auto
      description: >-
        Controls how the model selects tools. Note: When tool_choice is set to a
        non-auto value, the backend will remove this field by default, and the
        model's response behavior will still be equivalent to auto mode (this
        logic may be subject to adjustment). Allowed values: auto
    ToolDefinition:
      oneOf:
        - type: object
          title: Function tool
          required:
            - type
            - function
          description: Function tool definition.
          properties:
            type:
              type: string
              enum:
                - function
              description: The type of the tool. Currently function is supported.
            function:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  description: >-
                    The name of the function to call. Must consist of a-z, A-Z,
                    0-9 characters, or include underscores (_) and hyphens (-),
                    with a maximum length of 64 characters.
                description:
                  type: string
                  description: >-
                    A description of what the function does, used by the model
                    to understand when and how to call it.
                parameters:
                  type: object
                  description: >-
                    The input parameters of the function, described as a JSON
                    Schema object. Omitting parameters defines a function with
                    an empty parameter list.
                  additionalProperties: true
                strict:
                  type: boolean
                  default: false
                  description: >-
                    Whether to enable strict schema adherence when generating
                    function calls. If set to true, the model will strictly
                    follow the exact schema defined in the parameters field.
                    When strict is true, only a subset of JSON Schema is
                    supported.
        - $ref: '#/components/schemas/WebSearchTool'
    ChatCompletionChoice:
      type: object
      properties:
        index:
          type: integer
          description: The index of this completion in the list of choices.
        message:
          $ref: '#/components/schemas/AssistantResponseMessage'
        finish_reason:
          type: string
          description: >-
            The reason the model stopped generating tokens. stop if the model
            reached a natural stop point or a provided stop sequence; length if
            the maximum number of tokens specified in the request was reached;
            tool_calls if the model called a tool; content_filter if the content
            was blocked due to a filtering policy; repetition_truncation if the
            model detected repetition.
    Usage:
      type: object
      description: Usage information for this chat completion request.
      properties:
        prompt_tokens:
          type: integer
          description: Number of tokens used by the prompt.
        completion_tokens:
          type: integer
          description: Number of tokens used by the model output.
        total_tokens:
          type: integer
          description: Total number of tokens used in the request (prompt + completion).
        completion_tokens_details:
          type: object
          description: Breakdown of tokens used in the completion.
          properties:
            reasoning_tokens:
              type: integer
              description: Number of tokens generated by the model for reasoning.
        prompt_tokens_details:
          type: object
          description: Breakdown of tokens used in the prompt.
          properties:
            cached_tokens:
              type: integer
              description: Number of tokens that hit the cache.
            audio_tokens:
              type: integer
              description: Number of audio input tokens present in the prompt.
            image_tokens:
              type: integer
              description: Number of image input tokens present in the prompt.
            video_tokens:
              type: integer
              description: Number of video input tokens present in the prompt.
        web_search_usage:
          type: object
          description: Usage details for the web search API.
          properties:
            tool_usage:
              type: integer
              description: Number of web search API calls.
            page_usage:
              type: integer
              description: Number of web pages returned by the web search API.
    ChatCompletionChunkChoice:
      type: object
      description: Chat response chunk object (streaming).
      properties:
        index:
          type: integer
          description: The index of this completion in the list of choices.
        delta:
          type: object
          description: The chat completion delta generated by the model in streaming mode.
          properties:
            role:
              type: string
              description: The role of the message author.
            content:
              type: string
              description: The content of the chunk message.
            reasoning_content:
              type: string
              description: >-
                The reasoning content in the assistant message, preceding the
                final answer.
            tool_calls:
              type: array
              description: >-
                After the function call is initiated, the model returns the
                tools to be called and the parameters required for the call.
                This parameter may contain one or more tool response objects.
              items:
                type: object
                properties:
                  index:
                    type: integer
                    description: >-
                      The index of the tool call in the tool_calls list,
                      starting from 0.
                  id:
                    type: string
                    description: The ID of the tool call.
                  type:
                    type: string
                    enum:
                      - function
                    description: >-
                      The type of the tool. Currently only function is
                      supported.
                  function:
                    type: object
                    description: The function being called.
                    properties:
                      name:
                        type: string
                        description: The name of the function to call.
                      arguments:
                        type: string
                        description: >-
                          Model-generated arguments for calling the function,
                          formatted as JSON. Note that the model-generated
                          content is not always guaranteed to be valid JSON and
                          may fabricate parameters not defined in the function
                          schema. Before calling the function, validate these
                          parameters in your code.
            annotations:
              type: array
              description: >-
                After web search, the model returns annotations for all cited
                URLs.
              items:
                $ref: '#/components/schemas/Annotation'
            error_message:
              type: string
              description: Error message for the web search chain.
        finish_reason:
          type: string
          nullable: true
          description: >-
            The reason the model stopped generating tokens. stop if the model
            reached a natural stop point or a provided stop sequence; length if
            the maximum number of tokens specified in the request was reached;
            tool_calls if the model called a tool; content_filter if the content
            was blocked due to a filtering policy; repetition_truncation if the
            model detected repetition.
    ErrorObject:
      type: object
      properties:
        message:
          type: string
          description: Error description.
        type:
          type: string
          description: Error type.
        param:
          type: string
          description: Associated field name.
        code:
          type: string
          description: Error code.
    DeveloperMessage:
      type: object
      title: Developer message · object
      required:
        - role
        - content
      description: >-
        Developer message. Instructions provided by the developer that the model
        should follow, regardless of the messages sent by the user.
      properties:
        role:
          type: string
          enum:
            - developer
          description: The role of the message author, which is developer.
        content:
          description: The content of the developer message.
          oneOf:
            - type: string
              description: Plain text content.
            - $ref: '#/components/schemas/TextContentPartArray'
        name:
          type: string
          description: >-
            An optional name for the participant, provided to the model to
            distinguish between participants of the same role.
    SystemMessage:
      title: System message · object
      type: object
      required:
        - role
        - content
      description: System message. The role of this message is system.
      properties:
        content:
          description: The content of the system message.
          oneOf:
            - type: string
              description: Plain text content.
            - $ref: '#/components/schemas/TextContentPartArray'
        role:
          type: string
          enum:
            - system
          description: The role of the message author, which is system.
        name:
          type: string
          description: >-
            An optional name for the participant, provided to the model to
            distinguish between participants of the same role.
    UserMessage:
      title: User message · object
      type: object
      required:
        - role
        - content
      description: User message. The role of this message is user.
      properties:
        content:
          type: string
          description: The content of the user message.
        role:
          type: string
          enum:
            - user
          description: The role of the message author, which is user.
        name:
          type: string
          description: >-
            An optional name for the participant, provided to the model to
            distinguish between participants of the same role.
    AssistantRequestMessage:
      title: Assistant message · object
      type: object
      required:
        - role
      description: Assistant message. The role of this message is assistant.
      properties:
        content:
          description: >-
            The content of the assistant message. Required unless tool_calls is
            specified.
          oneOf:
            - type: string
              nullable: true
              description: Plain text content.
            - $ref: '#/components/schemas/TextContentPartArray'
        role:
          type: string
          enum:
            - assistant
          description: The role of the message author, which is assistant.
        name:
          type: string
          description: >-
            An optional name for the participant, provided to the model to
            distinguish between participants of the same role.
        tool_calls:
          type: array
          description: The tool calls generated by the model, such as function calls.
          items:
            $ref: '#/components/schemas/ToolCallMessage'
    ToolMessage:
      title: Tool message · object
      type: object
      required:
        - role
        - content
        - tool_call_id
      description: Tool message. The role of this message is tool.
      properties:
        role:
          type: string
          enum:
            - tool
          description: The role of the message author, which is tool.
        content:
          description: The content of the tool message.
          oneOf:
            - type: string
              description: Plain text content.
            - $ref: '#/components/schemas/TextContentPartArray'
        tool_call_id:
          type: string
          description: The ID of the tool call that this message is responding to.
    WebSearchTool:
      type: object
      required:
        - type
      description: >-
        Web search tool object. For details, please refer to the web search
        documentation. Note: Web search tools are not supported at this time.
      properties:
        user_location:
          $ref: '#/components/schemas/WebSearchUserLocation'
        type:
          type: string
          enum:
            - web_search
          description: The type of the tool. Must be web_search.
        force_search:
          type: string
          default: 'false'
          description: >-
            Whether to force search. true forces search, false lets the model
            decide whether search is needed.
        max_keyword:
          type: integer
          default: 5
          minimum: 1
          maximum: 50
          description: >-
            Limits the maximum number of keywords that can be used in a single
            search turn.
        limit:
          type: integer
          default: 5
          minimum: 1
          maximum: 50
          description: >-
            Limits the maximum number of results returned per single search
            operation.
      title: Web search tool
    AssistantResponseMessage:
      type: object
      description: The chat completion message generated by the model.
      properties:
        role:
          type: string
          description: The role of the message author.
        content:
          type: string
          description: The content of the message.
        reasoning_content:
          type: string
          description: >-
            The reasoning content in the assistant message, preceding the final
            answer.
        tool_calls:
          type: array
          description: >-
            After a function call is initiated, the model returns the tools to
            be called along with the parameters required. This parameter may
            contain one or more tool response objects.
          items:
            oneOf:
              - $ref: '#/components/schemas/ToolCallMessage'
        annotations:
          type: array
          description: After web search, the model returns annotations for all cited URLs.
          items:
            $ref: '#/components/schemas/Annotation'
        error_message:
          type: string
          description: Error message for web search.
        audio:
          $ref: '#/components/schemas/AudioResponse'
        final_text_preview:
          type: string
          description: >-
            The final text after intelligent optimization and polishing for
            audio broadcasting. Only returned when the request parameter
            optimize_text_preview is set to true.
    Annotation:
      type: object
      description: Annotations returned by web search, containing citation URLs.
      properties:
        logo_url:
          type: string
          description: Logo URL.
        publish_time:
          type: string
          description: Publish time.
        site_name:
          type: string
          description: Website name.
        summary:
          type: string
          description: Summary.
        title:
          type: string
          description: Title.
        type:
          type: string
          description: Type.
        url:
          type: string
          description: URL.
    TextContentPartArray:
      type: array
      description: An array of plain text content parts within a message.
      items:
        $ref: '#/components/schemas/TextContentPart'
      title: Array of content parts · array
    ToolCallMessage:
      type: object
      description: Tool call object within a message.
      properties:
        id:
          type: string
          description: The ID of the tool call.
        type:
          type: string
          enum:
            - function
          description: The type of the tool. Currently only function is supported.
        function:
          type: object
          description: The function the model called.
          properties:
            name:
              type: string
              description: The name of the function the model called.
            arguments:
              type: string
              description: >-
                The arguments to call the function with, generated by the model
                as a JSON string. Note that the model does not always generate
                valid JSON, and may hallucinate parameters not defined in your
                function schema. Validate these arguments in your code before
                calling the function.
      title: Function tool call · object
    WebSearchUserLocation:
      type: object
      required:
        - type
        - country
      description: User geographical location for optimizing model output.
      properties:
        type:
          type: string
          enum:
            - approximate
          description: Location type, must be approximate.
        country:
          type: string
          description: Country
        region:
          type: string
          description: Region/State
        city:
          type: string
          description: City
        district:
          type: string
          description: District
        longitude:
          type: number
          format: double
          description: Longitude
        latitude:
          type: number
          format: double
          description: Latitude
    AudioResponse:
      type: object
      description: >-
        If audio output is requested, this object contains data about the
        model's audio response.
      properties:
        id:
          type: string
          description: Unique identifier for this audio response.
        data:
          type: string
          description: >-
            Base64-encoded audio generated by the model, in the format specified
            in the request.
        expires_at:
          type: number
          nullable: true
          description: >-
            Unix timestamp (in seconds) when this audio response expires.
            Currently null.
        transcript:
          type: string
          nullable: true
          description: Transcript of the generated audio. Currently null.
    TextContentPart:
      type: object
      title: Text content part · object
      required:
        - type
        - text
      description: A plain text content part within a message.
      properties:
        type:
          type: string
          enum:
            - text
          description: The type of the content part, which is text.
        text:
          type: string
          description: The text content.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Token
      description: 'Pass `Authorization: Bearer <token>` in the request header.'

````