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

# qwen3.7-plus Chat Completions

> Applicable to the qwen3.7-plus model in the Ali channel.

Supported fields: `model`, `messages`, `stream`, `temperature`, `top_p`, `top_k`, `repetition_penalty`, `presence_penalty`, `max_completion_tokens`, `max_tokens`, `stop`, `seed`, `tools`, `tool_choice`, `parallel_tool_calls`, `enable_search`, `search_options`, `response_format`, `enable_thinking`, `thinking_budget`, `reasoning_effort`, `tool_stream`, `enable_code_interpreter`, `vl_high_resolution_images`, `n`, `logprobs`, `top_logprobs`, `preserve_thinking`, `skill`, `clear_thinking`.



## OpenAPI

````yaml api-reference/en/zmodelChat/ali/qwen3.7-plus.json POST /v1/chat/completions
openapi: 3.0.1
info:
  title: qwen3.7-plus Chat Completions
  version: 1.0.0
  description: >-
    Ali chat capability documentation. The unified API endpoint is
    /v1/chat/completions.
  license:
    name: Project License
    url: https://github.com/QuantumNous/new-api/blob/main/LICENSE
servers:
  - url: https://baze-api.powerbuyin.top
    description: Baze API endpoint
security: []
tags:
  - name: Qwen Chat
    description: Qwen series chat and multimodal capabilities
paths:
  /v1/chat/completions:
    post:
      tags:
        - Qwen Chat
      summary: qwen3.7-plus Chat Completions
      description: >-
        Applicable to the qwen3.7-plus model in the Ali channel.


        Supported fields: `model`, `messages`, `stream`, `temperature`, `top_p`,
        `top_k`, `repetition_penalty`, `presence_penalty`,
        `max_completion_tokens`, `max_tokens`, `stop`, `seed`, `tools`,
        `tool_choice`, `parallel_tool_calls`, `enable_search`, `search_options`,
        `response_format`, `enable_thinking`, `thinking_budget`,
        `reasoning_effort`, `tool_stream`, `enable_code_interpreter`,
        `vl_high_resolution_images`, `n`, `logprobs`, `top_logprobs`,
        `preserve_thinking`, `skill`, `clear_thinking`.
      operationId: aliChatCompletions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatCompletionRequest'
            examples:
              Text input:
                summary: Text input
                value:
                  model: qwen3.7-plus
                  messages:
                    - role: system
                      content: You are a helpful assistant.
                    - role: user
                      content: Who are you?
              Streaming output:
                summary: Streaming output
                value:
                  model: qwen3.7-plus
                  messages:
                    - role: system
                      content: You are a helpful assistant.
                    - role: user
                      content: Who are you?
                  stream: true
                  stream_options:
                    include_usage: true
              Image input:
                summary: Image input
                value:
                  model: qwen-vl-plus
                  messages:
                    - role: user
                      content:
                        - type: image_url
                          image_url:
                            url: >-
                              https://dashscope.oss-cn-beijing.aliyuncs.com/images/dog_and_girl.jpeg
                        - type: text
                          text: What is this?
              Video input:
                summary: Video input
                value:
                  model: qwen-vl-max
                  messages:
                    - role: user
                      content:
                        - type: video
                          video:
                            - >-
                              https://img.alicdn.com/imgextra/i3/O1CN01K3SgGo1eqmlUgeE9b_!!6000000003923-0-tps-3840-2160.jpg
                            - >-
                              https://img.alicdn.com/imgextra/i4/O1CN01BjZvwg1Y23CF5qIRB_!!6000000003000-0-tps-3840-2160.jpg
                            - >-
                              https://img.alicdn.com/imgextra/i4/O1CN01Ib0clU27vTgBdbVLQ_!!6000000007859-0-tps-3840-2160.jpg
                            - >-
                              https://img.alicdn.com/imgextra/i1/O1CN01aygPLW1s3EXCdSN4X_!!6000000005710-0-tps-3840-2160.jpg
                        - type: text
                          text: Describe this video in detail.
              Tool calling:
                summary: Tool calling
                value:
                  model: qwen-plus
                  messages:
                    - role: system
                      content: You are a helpful assistant.
                    - role: user
                      content: How is the weather in Hangzhou?
                  tools:
                    - type: function
                      function:
                        name: get_current_time
                        description: Useful when you want to know the current time.
                        parameters: {}
                    - type: function
                      function:
                        name: get_current_weather
                        description: >-
                          Useful when you want to query the weather for a
                          specific city.
                        parameters:
                          type: object
                          properties:
                            location:
                              type: string
                              description: >-
                                City or district, e.g., Beijing, Hangzhou,
                                Yuhang District.
                          required:
                            - location
              Web search:
                summary: Web search
                value:
                  model: qwen-plus
                  messages:
                    - role: system
                      content: You are a helpful assistant.
                    - role: user
                      content: >-
                        How many gold medals did China win at the Paris
                        Olympics?
                  enable_search: true
              Document understanding:
                summary: Document understanding
                value:
                  model: qwen-long
                  messages:
                    - role: system
                      content: You are a helpful assistant.
                    - role: system
                      content: fileid://file-fe-xxx
                    - role: user
                      content: What is this article about?
                  stream: true
                  stream_options:
                    include_usage: true
              PPT generation:
                summary: PPT generation
                value:
                  model: qwen-doc-turbo
                  messages:
                    - role: system
                      content: you are a helpful assistant.
                    - role: system
                      content: Your document content
                    - role: user
                      content: Generate a 10-20 page PPT
                  skill:
                    - type: ppt
                      mode: general
                      template_id: news_01
                  stream: true
                  stream_options:
                    include_usage: true
      responses:
        '200':
          description: Success. Returns chat completions. Streaming returns SSE.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ChatCompletionResponse'
                    title: Chat response object (non-streaming)
                  - $ref: '#/components/schemas/ChatCompletionChunkResponse'
                    title: Chat response chunk object (streaming)
              examples:
                Non-streaming response example:
                  summary: Non-streaming response example
                  value:
                    choices:
                      - message:
                          role: assistant
                          content: >-
                            I am a large-scale language model developed by
                            Alibaba Cloud. My name is Qianwen.
                        finish_reason: stop
                        index: 0
                        logprobs: null
                    object: chat.completion
                    usage:
                      prompt_tokens: 3019
                      completion_tokens: 104
                      total_tokens: 3123
                      prompt_tokens_details:
                        cached_tokens: 2048
                    created: 1735120033
                    system_fingerprint: null
                    model: qwen-plus
                    id: chatcmpl-6ada9ed2-7f33-9de2-8bb0-78bd4035025a
                Streaming response example (multi-chunk, SSE):
                  summary: Streaming response example (multi-chunk, SSE)
                  value:
                    - id: chatcmpl-e30f5ae7-3063-93c4-90fe-beb5f900bd57
                      choices:
                        - delta:
                            content: ''
                            function_call: null
                            refusal: null
                            role: assistant
                            tool_calls: null
                          finish_reason: null
                          index: 0
                          logprobs: null
                      created: 1735113344
                      model: qwen-plus
                      object: chat.completion.chunk
                      service_tier: null
                      system_fingerprint: null
                      usage: null
                    - id: chatcmpl-e30f5ae7-3063-93c4-90fe-beb5f900bd57
                      choices:
                        - delta:
                            content: 我是
                            function_call: null
                            refusal: null
                            role: null
                            tool_calls: null
                          finish_reason: null
                          index: 0
                          logprobs: null
                      created: 1735113344
                      model: qwen-plus
                      object: chat.completion.chunk
                      service_tier: null
                      system_fingerprint: null
                      usage: null
                    - id: chatcmpl-e30f5ae7-3063-93c4-90fe-beb5f900bd57
                      choices:
                        - delta:
                            content: 来自
                            function_call: null
                            refusal: null
                            role: null
                            tool_calls: null
                          finish_reason: null
                          index: 0
                          logprobs: null
                      created: 1735113344
                      model: qwen-plus
                      object: chat.completion.chunk
                      service_tier: null
                      system_fingerprint: null
                      usage: null
                    - id: chatcmpl-e30f5ae7-3063-93c4-90fe-beb5f900bd57
                      choices:
                        - delta:
                            content: 阿里
                            function_call: null
                            refusal: null
                            role: null
                            tool_calls: null
                          finish_reason: null
                          index: 0
                          logprobs: null
                      created: 1735113344
                      model: qwen-plus
                      object: chat.completion.chunk
                      service_tier: null
                      system_fingerprint: null
                      usage: null
                    - id: chatcmpl-e30f5ae7-3063-93c4-90fe-beb5f900bd57
                      choices:
                        - delta:
                            content: 云的超大规模
                            function_call: null
                            refusal: null
                            role: null
                            tool_calls: null
                          finish_reason: null
                          index: 0
                          logprobs: null
                      created: 1735113344
                      model: qwen-plus
                      object: chat.completion.chunk
                      service_tier: null
                      system_fingerprint: null
                      usage: null
                    - id: chatcmpl-e30f5ae7-3063-93c4-90fe-beb5f900bd57
                      choices:
                        - delta:
                            content: 语言模型，我
                            function_call: null
                            refusal: null
                            role: null
                            tool_calls: null
                          finish_reason: null
                          index: 0
                          logprobs: null
                      created: 1735113344
                      model: qwen-plus
                      object: chat.completion.chunk
                      service_tier: null
                      system_fingerprint: null
                      usage: null
                    - id: chatcmpl-e30f5ae7-3063-93c4-90fe-beb5f900bd57
                      choices:
                        - delta:
                            content: 叫千问千
                            function_call: null
                            refusal: null
                            role: null
                            tool_calls: null
                          finish_reason: null
                          index: 0
                          logprobs: null
                      created: 1735113344
                      model: qwen-plus
                      object: chat.completion.chunk
                      service_tier: null
                      system_fingerprint: null
                      usage: null
                    - id: chatcmpl-e30f5ae7-3063-93c4-90fe-beb5f900bd57
                      choices:
                        - delta:
                            content: 问。
                            function_call: null
                            refusal: null
                            role: null
                            tool_calls: null
                          finish_reason: null
                          index: 0
                          logprobs: null
                      created: 1735113344
                      model: qwen-plus
                      object: chat.completion.chunk
                      service_tier: null
                      system_fingerprint: null
                      usage: null
                    - id: chatcmpl-e30f5ae7-3063-93c4-90fe-beb5f900bd57
                      choices:
                        - delta:
                            content: ''
                            function_call: null
                            refusal: null
                            role: null
                            tool_calls: null
                          finish_reason: stop
                          index: 0
                          logprobs: null
                      created: 1735113344
                      model: qwen-plus
                      object: chat.completion.chunk
                      service_tier: null
                      system_fingerprint: null
                      usage: null
                    - id: chatcmpl-e30f5ae7-3063-93c4-90fe-beb5f900bd57
                      choices: []
                      created: 1735113344
                      model: qwen-plus
                      object: chat.completion.chunk
                      service_tier: null
                      system_fingerprint: null
                      usage:
                        completion_tokens: 17
                        prompt_tokens: 22
                        total_tokens: 39
                        completion_tokens_details: null
                        prompt_tokens_details:
                          audio_tokens: null
                          cached_tokens: 0
        '400':
          description: Invalid request parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid_request:
                  summary: 参数错误
                  value:
                    error:
                      message: messages is required
                      type: invalid_request_error
                      code: bad_request_body
                      param: messages
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unauthorized:
                  summary: 未授权
                  value:
                    error:
                      message: Invalid token
                      type: api_error
                      code: access_denied
                      param: ''
          description: Authentication failed.
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                quota_exceeded:
                  summary: 额度不足或速率受限
                  value:
                    error:
                      message: Rate limit exceeded
                      type: api_error
                      code: insufficient_user_quota
                      param: ''
          description: Rate limit exceeded or quota exhausted.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                internal_error:
                  summary: 内部处理失败
                  value:
                    error:
                      message: Internal server error
                      type: api_error
                      code: gen_relay_info_failed
                      param: ''
          description: Internal server error.
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                bad_gateway:
                  summary: 上游响应异常
                  value:
                    error:
                      message: Invalid upstream response
                      type: api_error
                      code: bad_response_status_code
                      param: ''
          description: Upstream response error.
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                service_unavailable:
                  summary: 服务暂不可用
                  value:
                    error:
                      message: Service temporarily unavailable
                      type: api_error
                      code: get_channel_failed
                      param: ''
          description: Upstream service unavailable.
      security:
        - BearerAuth: []
components:
  schemas:
    ChatCompletionRequest:
      type: object
      required:
        - model
        - messages
      properties:
        model:
          type: string
          enum:
            - qwen3.7-plus
          description: >-
            Model name. Only publicly available chat models in the current Ali
            channel's final whitelist are supported.
          example: qwen3.7-plus
        messages:
          type: array
          description: >-
            Context passed to the model, arranged in conversation order.
            Supports four message types: System Message, User Message, Assistant
            Message, and Tool Message. Supports plain text, multimodal
            (image/video/audio) content, and explicit caching.
          items:
            oneOf:
              - $ref: '#/components/schemas/SystemMessage'
                title: System Message object (optional)
              - $ref: '#/components/schemas/UserMessage'
                title: User Message object (required)
              - $ref: '#/components/schemas/AssistantMessage'
                title: Assistant Message object (optional)
              - $ref: '#/components/schemas/ToolMessage'
                title: Tool Message object (optional)
        stream:
          type: boolean
          description: >-
            Whether to stream the response.

            Values:

            - false: Returns the entire content at once after generation
            completes;

            - true: Streams output as it is generated, returning each chunk as
            it becomes available. Chunks must be read in real time and
            concatenated to assemble the full response.


            Recommended to set to true for better reading experience and lower
            timeout risk.


            Note: Non-streaming calls that do not complete within 300 seconds
            will be interrupted and return the already generated content (not an
            error). Streaming is strongly recommended for longer outputs.
          default: false
        stream_options:
          type: object
          description: Stream output configuration. Only effective when stream is true.
          properties:
            include_usage:
              type: boolean
              description: >-
                Whether to include token usage information in the last chunk of
                the response. Values: true (include), false (do not include).
                When streaming, token usage information only appears in the last
                chunk of the response.
              default: false
        temperature:
          type: number
          description: >-
            Sampling temperature, controlling the diversity of generated text.
            Higher temperature produces more diverse output; lower temperature
            produces more deterministic output. Range: [0, 2). temperature and
            top_p both control text diversity; it is recommended to set only one
            of them.
          minimum: 0
          maximum: 2
          default: 0.7
        top_p:
          type: number
          description: >-
            Nucleus sampling probability threshold, controlling text diversity.
            Higher top_p produces more diverse output; lower top_p produces more
            deterministic output. Range: (0, 1.0]. temperature and top_p both
            control text diversity; it is recommended to set only one of them.
          minimum: 0
          maximum: 1
          default: 0.95
        stop:
          oneOf:
            - type: string
              description: Stop sequence string.
            - type: array
              items:
                type: string
              description: List of stop sequences.
          description: >-
            Used to specify stop sequences. When the text generated by the model
            contains a string specified by stop, generation will terminate
            immediately.


            Sensitive words can be passed to control model output.


            When stop is an array, token_id and strings cannot be mixed as
            elements. For example, specifying ["hello", 104307] is not allowed.
        seed:
          type: integer
          description: >-
            Random seed. Used to ensure reproducible results with the same input
            and parameters. If called with the same seed and other parameters
            unchanged, the model will return the same results as much as
            possible.


            Range: [0, 2^31−1].


            Seed defaults:

            - qwen-vl-max, qvq-max series: 3407;

            - qwen-vl-max-2024-02-01, qwen-vl-plus: no default;

            - All other models: 1234.
          minimum: 0
          maximum: 2147483647
        tools:
          type: array
          description: >-
            An array of one or more tool objects for the model to call in
            Function Calling.


            When tools is set and the model determines a tool call is needed,
            the response returns tool information through tool_calls.


            Properties:

            - type (required): Tool type, currently only supports function.

            - function (required): Tool and parameter information.
              - name (required): Tool name. Only allows letters, numbers, underscores (_) and dashes (-), up to 64 tokens.
              - description (required): Tool description to help the model determine when and how to call the tool.
              - parameters (optional, default {}): Tool parameter description, must be a valid JSON Schema. If parameters is empty, the tool has no input parameters (e.g., time query tool). It is recommended to pass parameters to improve tool call accuracy.
          items:
            $ref: '#/components/schemas/Tool'
        tool_choice:
          oneOf:
            - type: string
              enum:
                - auto
                - none
                - required
              description: >-
                Tool choice strategy: auto (model decides), none (disable
                tools), required (must call at least one tool).
            - type: object
              properties:
                type:
                  type: string
                function:
                  type: object
                  properties:
                    name:
                      type: string
              description: >-
                Force specific tool:
                {"type":"function","function":{"name":"the_function_to_call"}}.
                Thinking models do not support forcing a specific tool.
          description: >-
            Tool selection strategy. Default: auto. To force a specific tool
            call method for a type of question (e.g., always use a tool or
            disable all tools), set this parameter.


            Values:

            - auto: The model autonomously selects the tool strategy;

            - none: If you do not want tool calls, set tool_choice to none;

            - {"type": "function", "function": {"name":
            "the_function_to_call"}}: If you want to force a specific tool call,
            set this parameter where the_function_to_call is the specified tool
            function name.


            Thinking models do not support forcing a specific tool call.
          default: auto
        enable_search:
          type: boolean
          description: >-
            Whether to enable web search.  Default: false.


            Values:

            - true: Enabled. If web search is not triggered after enabling,
            optimize the prompt or set forced_search in search_options to force
            search;

            - false: Disabled.


            Enabling web search may increase token consumption.


            This parameter is not an OpenAI standard parameter. When calling
            through the Python SDK, place it in the extra_body object:
            extra_body={"enable_search": True}.
          default: false
        response_format:
          type: object
          description: >-
            Format of the response. Values:

            - {"type": "text"}: Returns text response;

            - {"type": "json_object"}: Returns a standard JSON string.


            Related doc: Structured Output.


            If set to {"type": "json_object"}, you must explicitly instruct the
            model to output JSON in the prompt, e.g., "Please output in JSON
            format", otherwise an error will occur.
          properties:
            type:
              type: string
              enum:
                - text
                - json_object
              description: 'Response format type. Values: text, json_object.'
        top_k:
          type: integer
          description: >-
            Specifies the number of candidate tokens for sampling during
            generation. Higher values produce more random output; lower values
            produce more deterministic output. If set to null or greater than
            100, the top_k strategy is disabled and only the top_p strategy
            takes effect. The value must be an integer greater than or equal to
            0. Default: 20.


            This parameter is not an OpenAI standard parameter. When calling
            through the Python SDK, place it in the extra_body object:
            extra_body={"top_k":xxx}.
          minimum: 0
          default: 20
        repetition_penalty:
          type: number
          description: >-
            Controls the repetition degree in continuous sequences during model
            generation. Increasing repetition_penalty reduces repetition; 1.0
            means no penalty. No strict value range, as long as it is greater
            than 0.


            repetition_penalty defaults:

            - qwen-max, qwen-math, qwen-vl-max, qwen-audio-turbo, QVQ, QwQ,
            Qwen3-VL: 1.0;

            - qwen-coder, qwen2-1.5b-instruct, qwen2-0.5b-instruct,
            qwen2.5-omni-7b: 1.1;

            - qwen-vl-plus: 1.2;

            - All other models: 1.05.


            This parameter is not an OpenAI standard parameter. When calling
            through the Python SDK, place it in the extra_body object:
            extra_body={"repetition_penalty":xxx}.
          minimum: 0
          default: 1.05
        presence_penalty:
          type: number
          description: >-
            Controls content repetition during model generation.


            Range: [-2.0, 2.0]. Positive values reduce repetition; negative
            values increase repetition.


            For creative writing or brainstorming scenarios requiring diversity,
            fun, or creativity, it is recommended to increase this value; for
            technical documentation or formal text requiring consistency and
            terminology accuracy, it is recommended to decrease this value.


            presence_penalty defaults:

            - Qwen3.7 (non-thinking), Qwen3.6 (non-thinking), Qwen3.5-Omni,
            Qwen3.5 (non-thinking), qwen3-max-preview (thinking), Qwen3
            (non-thinking), Qwen3-Instruct 1.7b/4b (thinking), QVQ, qwen-max,
            qwen2.5-vl, qwen-vl-max, qwen-vl-plus, Qwen3-VL (non-thinking): 1.5;

            - qwen3-8b/14b/32b/30b-a3b/235b-a22b (thinking),
            qwen-plus/qwen-plus-latest/2025-04-28 (thinking),
            qwen-turbo/qwen-turbo/2025-04-28 (thinking): 0.5;

            - All others: 0.0.


            Principle: When the parameter is positive, the model imposes a
            penalty on tokens already present in the current text (independent
            of frequency), reducing the probability of repeated occurrences,
            thereby reducing content repetition and increasing vocabulary
            diversity.
          minimum: -2
          maximum: 2
          default: 1.5
        max_completion_tokens:
          type: integer
          description: >-
            Maximum length of model output, including thinking content and model
            response. Generation stops early when this value is exceeded, with
            finish_reason set to length.


            Default and maximum values are the model's maximum output length.


            Difference from max_tokens: max_completion_tokens limits the full
            model output (thinking + response), while max_tokens limits only the
            response portion. Thinking models recommend using
            max_completion_tokens.


            Supported models:

            - Qianwen Max: Qwen3.7-Max and later models

            - Qianwen Plus: Qwen3.5-Plus and later models


            The actual output token count may have an error of up to 10 tokens
            from the set max_completion_tokens value.
          minimum: 1
        parallel_tool_calls:
          type: boolean
          description: |-
            Whether to enable parallel tool calls.  Default: false.

            Values:
            - true: Enabled;
            - false: Disabled.
          default: false
        search_options:
          type: object
          description: >-
            Strategy for web search.


            This parameter is not an OpenAI standard parameter. When calling
            through the Python SDK, place it in the extra_body object:
            extra_body={"search_options": xxx}.
        enable_thinking:
          type: boolean
          description: >-
            When using mixed-thinking models (which can think or not think
            before responding), controls whether to enable thinking mode.
            Applies to Qwen3.7, Qwen3.6, Qwen3.5, Qwen3, Qwen3-Omni-Flash,
            Qwen3-VL models, and DeepSeek-V4-Pro/V4-Flash series (Aliyun direct
            supply), DeepSeek-V3.2/V3.2-exp/V3.1 series (Aliyun direct supply,
            SiliconFlow direct supply, Kuaishou Wanqing direct supply),
            Kimi-K2.7-code (thinking-only model), Kimi-K2.6/K2.5 series (Aliyun
            direct supply, Moonshot direct supply), GLM series. DeepSeek-V4
            series enables thinking by default, adjustable via reasoning_effort.


            Values:

            - true: Enabled. When enabled, thinking content is returned via the
            reasoning_content field.

            - false: Disabled.


            Default values vary by supported model.


            This parameter is not an OpenAI standard parameter. When calling
            through the Python SDK, place it in the extra_body object:
            extra_body={"enable_thinking": xxx}.


            If not using the OpenAI SDK but calling directly via HTTP (such as
            curl), no extra_body is needed. Instead, place enable_thinking at
            the top level of the request body alongside model, messages, and
            other parameters, e.g., "enable_thinking": true.
        thinking_budget:
          type: integer
          description: >-
            Maximum number of tokens in the thinking process. Applies to
            Qwen3.7, Qwen3.6, Qwen3.5, Qwen3-VL, Qwen3, GLM (Aliyun direct
            supply), Kimi (Aliyun direct supply) series models. Related doc:
            Limiting Thinking Length.


            Default value is the model's maximum thinking chain length. Refer
            to: Model List.


            This parameter is not an OpenAI standard parameter. When calling
            through the Python SDK, place it in the extra_body object:
            extra_body={"thinking_budget": xxx}.
          minimum: 1
        reasoning_effort:
          type: string
          description: >-
            Controls the model's reasoning effort. Different models support
            different values and defaults.


            DeepSeek-V4, GLM series and kimi/kimi-k3 (default: high):

            - Values: high (high reasoning effort), max (maximum reasoning
            effort). low and medium map to high, xhigh maps to max.

            - Applies to glm-5.2, glm-5.1, glm-5, deepseek-v4-pro,
            deepseek-v4-flash (Aliyun direct supply), kimi/kimi-k3 (Moonshot
            direct supply, max only).


            qwen3.8-max-preview model (default: xhigh):

            - Values: xhigh (high reasoning effort), medium (medium reasoning
            effort), low (low reasoning effort). max maps to xhigh, high maps to
            xhigh, minimal maps to low, none maps to enable_thinking=False.
            Setting values other than these options and mappings will cause an
            error.


            Important: qwen3.8-max-preview does not support setting
            reasoning_effort and thinking_budget simultaneously; setting both
            will cause an error. However, they support mutual conversion:

            - When thinking_budget is not set, reasoning_effort levels
            automatically map to thinking_budget: low corresponds to 4096,
            medium to 16384, xhigh to 262144.

            - When reasoning_effort is not set, thinking_budget automatically
            maps back to reasoning_effort: 0~4096 corresponds to low, 4097~16384
            to medium, 16385~262144 to xhigh.

            - When neither is set, the default thinking_budget (131072) and
            default reasoning_effort (xhigh) are used.


            This parameter is not an OpenAI standard parameter. When calling
            through the Python SDK, place it in the extra_body object:
            extra_body={"reasoning_effort": "high"}.
          enum:
            - low
            - medium
            - high
            - max
            - xhigh
        tool_stream:
          type: boolean
          description: >-
            Only takes effect when stream=true. Currently only Qwen and GLM
            series support this. Default: false.


            Qwen series support list:

            - qwen-max series: text modality of qwen3.7-max series;

            - qwen-plus series: text modality of qwen3.7-plus and qwen3.6-plus
            series, and full modality of qwen3.5-plus series;

            - qwen-flash series: full modality of qwen3.7-flash, qwen3.6-flash,
            and qwen3.5-flash series.


            Qwen series usage reference: tool_stream only affects complex tool
            parameters. Simple tool parameters will stream output as long as
            stream=true is enabled. Complex tools are tools where some parameter
            types are array or object.

            - tool_stream=false: Complex tool parameters are output at once,
            default behavior, complex format is more accurate;

            - tool_stream=true: Complex tool parameters are streamed output, no
            timeout risk for complex format.


            This parameter is not an OpenAI standard parameter. When calling
            through the Python SDK, place it in the extra_body object:
            extra_body={"tool_stream": true}.
          default: false
        enable_code_interpreter:
          type: boolean
          description: >-
            Whether to enable the code interpreter feature.  Default: false.


            Values:

            - true: Enabled;

            - false: Disabled.


            This parameter is not an OpenAI standard parameter. When calling
            through the Python SDK, place it in the extra_body object:
            extra_body={"enable_code_interpreter": xxx}.
          default: false
        vl_high_resolution_images:
          type: boolean
          description: >-
            Whether to increase the input image pixel limit to the pixel value
            corresponding to 16384 tokens. Related doc: Processing
            High-Resolution Images. Default: false.


            When vl_high_resolution_images is true: Uses a fixed resolution
            strategy, ignoring the max_pixels setting. When the resolution is
            exceeded, the total image pixels are scaled down to this limit.


            When vl_high_resolution_images is true, different models have
            different pixel limits:

            - Qwen3.7, Qwen3.6, Qwen3.5, Qwen3-VL series, qwen-vl-max,
            qwen-vl-max-0813, qwen-vl-plus, qwen-vl-plus-0815,
            qwen-vl-plus-0710: 16777216 (each token corresponds to 32×32 pixels,
            i.e., 16384×32×32);

            - QVQ series and other Qwen2.5-VL models: 12845056 (each token
            corresponds to 28×28 pixels, i.e., 16384×28×28).


            When vl_high_resolution_images is false: The pixel limit is
            determined by max_pixels. When input image pixels exceed max_pixels,
            the image is scaled down to within max_pixels. The default pixel
            limit for each model is the default value of max_pixels.


            This parameter is not an OpenAI standard parameter. When calling
            through the Python SDK, place it in the extra_body object:
            extra_body={"vl_high_resolution_images":xxx}.
          default: false
        'n':
          type: integer
          description: >-
            Number of responses, range 1-4. Only supported by certain models.
            Default: 1.
          minimum: 1
          maximum: 4
          default: 1
        logprobs:
          type: boolean
          description: >-
            Whether to return log probabilities of output tokens. Default:
            false.


            Values:

            - true: Return;

            - false: Do not return.


            Content generated during the thinking phase (reasoning_content) does
            not return log probabilities.


            Supported models:

            - Snapshot models of qwen-plus series (excluding stable models);

            - Snapshot models of qwen-turbo series (excluding stable models);

            - qwen3-vl-plus series models (including stable models);

            - qwen3-vl-flash series models (including stable models);

            - Qwen3 open-source models.
          default: false
        top_logprobs:
          type: integer
          description: >-
            Specifies the number of candidate tokens with the highest
            probability for the model to return at each generation step.
            Default: 0.


            Range: [0, 5].


            Only takes effect when logprobs is true.
          minimum: 0
          maximum: 5
          default: 0
        preserve_thinking:
          type: boolean
          description: >-
            Whether to concatenate historical assistant reasoning_content into
            model input. Suitable for scenarios requiring the model to reference
            historical thinking processes. Default: false.


            Currently supported: qwen3.8-max-preview (enabled by default),
            qwen3.7-max, qwen3.7-max-2026-05-20 and later snapshots,
            qwen3.6-max-preview, qwen3.7-plus, qwen3.7-plus-2026-05-26,
            qwen3.6-plus, qwen3.6-plus-2026-04-02, qwen3.7-flash,
            qwen3.7-flash-2026-07-15, qwen3.6-flash, qwen3.6-flash-2026-04-16,
            kimi-k2.6 (Aliyun Bailian deployment), kimi-k2.7-code (Aliyun
            Bailian deployment, enabled by default),
            kimi/kimi-k2.7-code-highspeed (Moonshot direct supply, enabled by
            default), kimi/kimi-k2.7-code (Moonshot direct supply, enabled by
            default).


            Important: When using qwen3.8-max-preview, preserve_thinking
            defaults to true and all historical reasoning_content must be passed
            back completely. Concatenating reasoning_content into the content
            field for playback is not supported. If historical messages do not
            contain reasoning_content, enabling this parameter will not cause
            errors and is compatible.


            When enabled, historical reasoning_content counts toward input
            tokens and is billed accordingly.


            This parameter is not an OpenAI standard parameter. When calling
            through the Python SDK, place it in the extra_body object:
            extra_body={"preserve_thinking": True}.
          default: false
        thinking:
          type: object
          description: >-
            Controls thinking mode for MiniMax/MiniMax-M3 (supplied by 稀宇科技).
            Default: {"type":"adaptive"}. Non-standard parameter, use
            extra_body.
          properties:
            type:
              type: string
              enum:
                - adaptive
                - disabled
              description: >-
                Thinking type. Values: adaptive (model decides), disabled
                (direct answer).
        skill:
          type: array
          description: >-
            Skill parameter for enabling specific generation skills (e.g., PPT
            generation). Only supported by qwen-doc-turbo model.  Default: [].


            This parameter is not an OpenAI standard parameter. When calling
            through the Python SDK, place it in the extra_body object:
            extra_body={"skill": [...]}. When using skill, stream must be set to
            true.


            Properties:

            - type (required): Skill type. Currently supports: ppt (PPT
            generation).

            - mode (optional): PPT generation mode. Values: general (default,
            template mode, requires template_id, generates HTML format PPT),
            creative (creative mode, no template needed, generates image-based
            PPT with each page as an image).

            - template_id (optional): PPT template ID. Used with mode=general or
            when mode is not set. Values: news_01 (news template), summary_01
            (summary template), internet_01 (internet template), thesis_01
            (thesis template).
          items:
            type: object
            properties:
              type:
                type: string
                description: 技能类型。当前支持：ppt（PPT 生成）。
              mode:
                type: string
                enum:
                  - general
                  - creative
                description: >-
                  PPT 生成模式。可选值：general（默认，模板模式，需配合 template_id 使用，生成 HTML 格式的
                  PPT）、creative（创意模式，无需模板，生成图版 PPT）。
              template_id:
                type: string
                description: >-
                  PPT 模板
                  ID。可选值：news_01（新闻模板）、summary_01（总结模板）、internet_01（互联网模板）、thesis_01（论文模板）。
        clear_thinking:
          type: boolean
          description: >-
            Controls whether historical reasoning_content (thinking process) is
            used as context input to the model in multi-turn conversations. Only
            supported by GLM series glm-5.2, glm-5.1, glm-5, glm-4.7 models.
            Default: false.


            This parameter is not an OpenAI standard parameter. When calling
            through the Python SDK, place it in the extra_body object:
            extra_body={"enable_thinking": True,"clear_thinking": True}.


            - true: Ignores historical reasoning_content and uses only
            non-reasoning content such as visible text, tool calls and results
            as context input, which can reduce context length and cost;

            - false (default): Preserves historical reasoning_content and
            provides it to the model along with context. If Preserved Thinking
            is to be enabled, historical reasoning_content must be passed
            through completely, unmodified, and in original order in messages.
            Missing, truncation, rewriting, or reordering will cause degraded or
            ineffective results.
          default: false
        X-DashScope-DataInspection:
          type: string
          description: >-
            Based on the content security capability of the Qianwen API, whether
            to further identify violations in input and output content. Values:

            - {"input":"cip","output":"cip"}: Further identification;

            - Not set: No further identification.


            When calling via HTTP, place in the request header: -H
            "X-DashScope-DataInspection: {\"input\": \"cip\", \"output\":
            \"cip\"}";


            When calling through the Python SDK, configure via extra_headers:
            extra_headers={'X-DashScope-DataInspection':
            '{"input":"cip","output":"cip"}'}.


            Not supported via Node.js SDK.
    ChatCompletionResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for this call.
        object:
          type: string
          example: chat.completion
          description: Always chat.completion.
        created:
          type: integer
          format: int64
          description: Unix timestamp (seconds).
        model:
          type: string
          description: Model used for this request.
        choices:
          type: array
          items:
            $ref: '#/components/schemas/Choice'
          description: Array of generated responses.
        usage:
          $ref: '#/components/schemas/Usage'
          description: Token usage information.
        service_tier:
          type: string
          nullable: true
          description: Currently fixed to null.
        system_fingerprint:
          type: string
          nullable: true
          description: Currently fixed to null.
    ChatCompletionChunkResponse:
      type: object
      description: Chunk object structure for streaming responses.
      properties:
        id:
          type: string
          description: Unique identifier for this call. Each chunk object has the same id.
        choices:
          type: array
          description: >-
            Array of generated content. If include_usage is true, choices is an
            empty array in the last chunk.
          items:
            $ref: '#/components/schemas/ChunkChoice'
        created:
          type: integer
          format: int64
          description: Timestamp when this request was created.
        model:
          type: string
          description: Model used for this request.
        object:
          type: string
          example: chat.completion.chunk
          description: Always chat.completion.chunk.
        service_tier:
          type: string
          nullable: true
          description: Currently fixed to null.
        system_fingerprint:
          type: string
          nullable: true
          description: Currently fixed to null.
        usage:
          $ref: '#/components/schemas/Usage'
          description: Token usage. Only shown in last chunk when include_usage is true.
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            type:
              type: string
              description: 错误类型，例如 `invalid_request_error`、`api_error` 或上游兼容错误类型。
            code:
              type: string
    SystemMessage:
      type: object
      required:
        - role
        - content
      description: >-
        System message. Used to set the model's role, tone, task goals, or
        constraints. Typically placed first in the messages array.
      properties:
        role:
          type: string
          enum:
            - system
          description: 'System message role. Fixed value: system.'
        content:
          type: string
          description: >-
            System instruction. Used to define the model's role, behavior,
            response style, and task constraints.
      title: System Message object (optional)
    UserMessage:
      type: object
      required:
        - role
        - content
      description: >-
        User message. Used to pass questions, instructions, or context to the
        model.
      properties:
        role:
          type: string
          enum:
            - user
          description: 'User message role. Fixed value: user.'
        content:
          anyOf:
            - type: string
              description: Plain text content.
            - type: array
              description: Multimodal content list (image/video/audio).
              items:
                $ref: '#/components/schemas/ContentItem'
          description: >-
            Message content. string for plain text; array for multimodal content
            or explicit caching.
      title: User Message object (required)
    AssistantMessage:
      type: object
      required:
        - role
      description: Model response. Typically used as context for multi-turn conversations.
      properties:
        role:
          type: string
          enum:
            - assistant
          description: 'Assistant message role. Fixed value: assistant.'
        content:
          type: string
          description: >-
            Model's text response. Can be empty when tool_calls is present;
            otherwise required.
        tool_calls:
          type: array
          description: Tool call information returned by the model after Function Calling.
          items:
            $ref: '#/components/schemas/ToolCall'
        partial:
          type: boolean
          description: 'Whether to enable prefix continuation. Default: false.'
          default: false
        reasoning_content:
          type: string
          description: Model thinking content.
      title: Assistant Message object (optional)
    ToolMessage:
      type: object
      required:
        - role
        - content
        - tool_call_id
      description: Tool output message.
      properties:
        role:
          type: string
          enum:
            - tool
          description: 'Fixed value: tool.'
        content:
          type: string
          description: Tool function output. Must be a string.
        tool_call_id:
          type: string
          description: >-
            ID returned after Function Calling, used to associate the Tool
            Message with the corresponding tool.
      title: Tool Message object (optional)
    Tool:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - function
          description: Tool type. Currently only function.
        function:
          type: object
          required:
            - name
            - description
          description: Tool information.
          properties:
            name:
              type: string
              description: >-
                Tool name. Allows letters, numbers, underscores, hyphens. Max 64
                tokens.
            description:
              type: string
              description: >-
                Tool description to help the model determine when and how to
                call.
            parameters:
              type: object
              description: >-
                Tool parameter definition. Must be a valid JSON Schema. Empty
                means no input parameters.
              default: {}
    Choice:
      type: object
      properties:
        index:
          type: integer
          description: The index of this object in the choices array.
        message:
          $ref: '#/components/schemas/Message'
        finish_reason:
          type: string
          description: >-
            The reason why the model stopped generating. Three cases: stop
            (triggered by the stop parameter or natural stop), length (output
            too long), tool_calls (tool call required).
        logprobs:
          type: object
          nullable: true
          description: Token probability information output by the model.
          properties:
            content:
              type: array
              description: An array containing each Token and its log probability.
              items:
                description: Each Token and its log probability array element.
                type: object
                properties:
                  token:
                    type: string
                    description: The text of the current Token.
                  bytes:
                    type: array
                    description: >-
                      The raw UTF‑8 byte list of the current Token, used to
                      accurately restore output content (e.g. emojis or Chinese
                      characters).
                    items:
                      type: integer
                  logprob:
                    type: number
                    format: float
                    description: >-
                      The log probability of the current Token. A return value
                      of null indicates very low probability.
                    nullable: true
                  top_logprobs:
                    type: array
                    description: >-
                      The most likely candidate Tokens at the current Token
                      position, the count is consistent with the request
                      parameter top_logprobs.
                    items:
                      type: object
                      description: Candidate Token and its log probability.
                      properties:
                        token:
                          type: string
                          description: Candidate Token text.
                        bytes:
                          type: array
                          description: >-
                            The raw UTF‑8 byte list of the current Token, used
                            to accurately restore output content (e.g. emojis or
                            Chinese characters).
                          items:
                            type: integer
                        logprob:
                          type: number
                          format: float
                          description: >-
                            The log probability of this candidate Token. A
                            return value of null indicates very low probability.
                          nullable: true
    Usage:
      type: object
      properties:
        prompt_tokens:
          type: integer
          description: Number of input tokens.
        completion_tokens:
          type: integer
          description: Number of output tokens.
        total_tokens:
          type: integer
          description: Total tokens consumed, sum of prompt_tokens and completion_tokens.
        completion_tokens_details:
          type: object
          nullable: true
          description: Output token details.
          properties:
            audio_tokens:
              type: integer
              description: Number of output audio tokens.
            reasoning_tokens:
              type: integer
              description: Number of thinking process tokens.
            text_tokens:
              type: integer
              description: Number of output text tokens.
        prompt_tokens_details:
          type: object
          nullable: true
          properties:
            cached_tokens:
              type: integer
              description: >-
                The number of Tokens that hit the Cache. See Context Cache for
                details.
            text_tokens:
              type: integer
              description: The number of input text Tokens.
            image_tokens:
              type: integer
              description: The number of input image Tokens.
            video_tokens:
              type: integer
              description: The number of input video file or image list Tokens.
            audio_tokens:
              type: integer
              description: This parameter is currently fixed to null.
            cache_creation:
              type: object
              description: Explicit cache creation information.
              properties:
                ephemeral_5m_input_tokens:
                  type: integer
                  description: Tokens used to create explicit cache.
            cache_creation_input_tokens:
              type: integer
              description: Tokens used to create explicit cache.
            cache_type:
              type: string
              description: >-
                ephemeral when using explicit cache, otherwise this parameter
                does not exist.
    ChunkChoice:
      type: object
      properties:
        delta:
          $ref: '#/components/schemas/Delta'
          description: Incremental delta object.
        finish_reason:
          type: string
          nullable: true
          description: >-
            The reason why the model stopped generating. Four cases: stop
            (triggered by the stop parameter or natural stop), null (generation
            not finished), length (output too long), tool_calls (tool call
            required).
        index:
          type: integer
          description: Index in choices array. Use when n > 1.
        logprobs:
          $ref: '#/components/schemas/LogProbs'
          description: Probability information.
    ContentItem:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - text
            - image_url
            - input_audio
            - video
            - video_url
          description: >-
            Set to text for text input; image_url for image input; input_audio
            for audio input; video for image-list video input; video_url for
            video file input.
        text:
          type: string
          description: Text content. Required when type=text.
        image_url:
          type: object
          description: Image information. Required when type=image_url.
          properties:
            url:
              type: string
              description: Image URL or Base64 Data URL.
        video_url:
          type: object
          description: Video file information. Required when type=video_url.
          properties:
            url:
              type: string
              description: Video file URL or Base64 Data URL.
        input_audio:
          type: object
          description: Audio information. Required when type=input_audio.
          properties:
            data:
              type: string
              description: Audio URL or Base64 Data URL.
            format:
              type: string
              description: Audio format, e.g., mp3, wav.
        video:
          type: array
          description: |-
            Image list for video. Required when type=video.

            Example value:
            [
                "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20241108/xzsgiz/football1.jpg",
                "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20241108/tdescd/football2.jpg",
                "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20241108/zefdja/football3.jpg",
                "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20241108/aedbqh/football4.jpg"
              ]
          items:
            type: string
        cache_control:
          type: object
          description: Explicit cache control.
          properties:
            type:
              type: string
              enum:
                - ephemeral
        fps:
          type: number
          description: >-
            Frames per second for video extraction. Valid range [0.1, 10],
            default 2.0. For MiniMax/MiniMax-M3, range [0.2, 5], default 1.


            fps serves two purposes:

            1. Controls frame extraction frequency when inputting a video file —
            one frame is extracted every 1/fps seconds. Applies to Qwen-VL,
            MiniMax/MiniMax-M3 and QVQ models.

            2. Informs the model about the time interval between adjacent frames
            to better understand video temporal dynamics. Applies to both video
            files and image lists. Supported by Qwen3.7, Qwen3.6, Qwen3.5,
            Qwen3-VL, Qwen2.5-VL, Qwen3.5-Omni and QVQ models.


            Higher fps values are suitable for fast-moving scenes (e.g. sports,
            action movies), while lower values are suitable for long videos or
            static content.


            Example values:

            - Image list input:
            {"video":["https://xx1.jpg",...,"https://xxn.jpg"],"fps":2}

            - Video file input: {"video_url": {"url":
            "https://xx1.mp4"},"fps":2}
        min_pixels:
          type: integer
          description: >-
            Sets the minimum pixel threshold for input images or video frames.
            When the pixel count of an input image or video frame is below
            min_pixels, it will be scaled up until the total pixel count exceeds
            min_pixels. Applies to Qwen-VL and QVQ models.


            Value range:

            - For input images: Qwen3.7, Qwen3.6, Qwen3.5, Qwen3-VL have a
            default and minimum value of 65536.

            - For input video files or image lists: Qwen3.7, Qwen3.6, Qwen3.5,
            Qwen3.5-Omni, Qwen3-VL (commercial and open-source), qwen-vl-max,
            qwen-vl-max-0813, qwen-vl-plus, qwen-vl-plus-0815, qwen-vl-plus-0710
            have a default of 65536 and a minimum of 4096.


            Example values:

            - Image input: {"type": "image_url","image_url":
            {"url":"https://xxxx.jpg"},"min_pixels": 65536}

            - Video file input: {"type": "video_url","video_url":
            {"url":"https://xxxx.mp4"},"min_pixels": 65536}

            - Image list input: {"type": "video","video":
            ["https://xx1.jpg",...,"https://xxn.jpg"],"min_pixels": 65536}
        max_pixels:
          type: integer
          description: >-
            Sets the maximum pixel threshold for input images or video frames.
            When the pixel count falls within [min_pixels, max_pixels], the
            model recognizes the original image as-is. When the pixel count
            exceeds max_pixels, the image is scaled down until the total pixel
            count falls below max_pixels. Applies to Qwen-VL and QVQ models.


            Value range:

            - For input images:
              - When vl_high_resolution_images is False: Qwen3.7, Qwen3.6, Qwen3.5, Qwen3-VL default to 2621440, maximum 16777216.
              - When vl_high_resolution_images is True: max_pixels is ignored for Qwen3.7, Qwen3.6, Qwen3.5-Omni, Qwen3.5, Qwen3-VL, qwen-vl-max, qwen-vl-max-0813, qwen-vl-plus, qwen-vl-plus-0815, qwen-vl-plus-0710; the maximum pixel count is fixed at 16777216.
            - For input video files or image lists: Qwen3.7, Qwen3.6, Qwen3.5
            series, Qwen3.5-Omni, Qwen3-VL closed-source series,
            qwen3-vl-235b-a22b-thinking, qwen3-vl-235b-a22b-instruct default to
            655360, maximum 2048000.


            Example values:

            - Image input: {"type": "image_url","image_url":
            {"url":"https://xxxx.jpg"},"max_pixels": 8388608}

            - Video file input: {"type": "video_url","video_url":
            {"url":"https://xxxx.mp4"},"max_pixels": 655360}

            - Image list input: {"type": "video","video":
            ["https://xx1.jpg",...,"https://xxn.jpg"],"max_pixels": 655360}
        total_pixels:
          type: integer
          description: >-
            Limits the total pixels of all frames extracted from a video
            (single-frame pixels × total frame count). If the total exceeds this
            limit, the system scales the frames while keeping each frame's pixel
            count within [min_pixels, max_pixels]. Applies to Qwen-VL and QVQ
            models.


            For long videos with many extracted frames, lowering this value can
            reduce token consumption and processing time, but may result in loss
            of image details.


            Value range: Qwen3.7, Qwen3.6 and Qwen3.5 series have a default and
            maximum of 819200000, corresponding to 800000 image tokens (each
            32×32 pixels corresponds to 1 image token).


            Example values:

            - Video file input: {"type": "video_url","video_url":
            {"url":"https://xxxx.mp4"},"total_pixels": 134217728}

            - Image list input: {"type": "video","video":
            ["https://xx1.jpg",...,"https://xxn.jpg"],"total_pixels": 134217728}
    ToolCall:
      type: object
      required:
        - id
        - type
        - function
        - index
      description: Tool call information returned by the model after Function Calling.
      properties:
        id:
          type: string
          description: Tool response ID.
        type:
          type: string
          enum:
            - function
          description: Tool type. Currently only function.
        function:
          type: object
          required:
            - name
            - arguments
          description: Tool and input information.
          properties:
            name:
              type: string
              description: Tool name.
            arguments:
              type: string
              description: Function arguments in JSON format string.
        index:
          type: integer
          description: Index in the tool_calls array.
    Message:
      type: object
      required:
        - role
      properties:
        role:
          type: string
          enum:
            - system
            - user
            - assistant
            - tool
          description: >-
            The role of the message. Possible values: system, user, assistant,
            tool.
        content:
          anyOf:
            - type: string
              description: Text content.
            - type: array
              description: Multimodal content list (for image understanding).
              items:
                $ref: '#/components/schemas/ContentItem'
          description: >-
            Message content. System Message: content is string (system
            instruction). User Message: content is string (plain text) or array
            (multimodal content). Assistant Message: content is string
            (optional, can be empty when tool_calls present). Tool Message:
            content is string (tool function output, must be a string. If the
            tool returns structured data such as JSON, it must be serialized to
            a string).
        reasoning_content:
          type: string
          description: The model's chain of thought content.
          nullable: true
        refusal:
          type: string
          description: This parameter is currently fixed to null.
          nullable: true
        audio:
          type: object
          description: This parameter is currently fixed to null.
          nullable: true
        function_call:
          type: object
          description: >-
            This value is fixed to null. Please refer to the tool_calls
            parameter.
          nullable: true
        tool_calls:
          type: array
          description: >-
            After initiating Function Calling, the tool and input parameter
            information generated by the model.
          items:
            $ref: '#/components/schemas/ToolCall'
        partial:
          type: boolean
          description: >-
            Whether to enable prefix continuation. Only valid when
            role=assistant. Default: false.
          default: false
        tool_call_id:
          type: string
          description: >-
            ID returned after Function Calling, obtained via
            completion.choices[0].message.tool_calls[$index].id, used to
            associate Tool Message with the corresponding tool. Required only
            when role=tool.
    Delta:
      type: object
      description: Incremental message object in streaming.
      properties:
        content:
          type: string
          nullable: true
          description: Incremental message content.
        reasoning_content:
          type: string
          nullable: true
          description: Incremental thinking content.
        function_call:
          type: object
          nullable: true
          description: Default null. Refer to tool_calls.
        audio:
          type: object
          nullable: true
          description: Response when using Qwen-Omni model.
        refusal:
          type: object
          nullable: true
          description: Currently fixed to null.
        role:
          type: string
          description: Role. Only present in first chunk.
        tool_calls:
          type: array
          description: Tool call information after Function Calling.
          items:
            $ref: '#/components/schemas/ToolCallDelta'
    LogProbs:
      type: object
      nullable: true
      description: Probability information.
      properties:
        content:
          type: array
          description: Array of tokens with log probabilities.
          items:
            $ref: '#/components/schemas/LogProbContent'
    ToolCallDelta:
      type: object
      properties:
        index:
          type: integer
          description: Index in tool_calls array.
        id:
          type: string
          description: Unique identifier for this tool response.
        type:
          type: string
          enum:
            - function
          description: Tool type. Only function.
        function:
          type: object
          description: Tool information being called.
          properties:
            arguments:
              type: string
              description: >-
                Incremental input parameter information. All chunks' arguments
                concatenated form the complete input parameters. Due to model
                randomness, the output parameters may not conform to the
                function signature. Please validate parameter effectiveness
                before calling.
            name:
              type: string
              description: Tool name. Only in first chunk.
    LogProbContent:
      type: object
      properties:
        token:
          type: string
          description: Current token.
        bytes:
          type: array
          items:
            type: integer
          description: UTF-8 raw bytes.
        logprob:
          type: number
          format: float
          nullable: true
          description: Log probability. null means very low.
        top_logprobs:
          type: array
          description: Most likely tokens and log probabilities.
          items:
            $ref: '#/components/schemas/TopLogProb'
    TopLogProb:
      type: object
      properties:
        token:
          type: string
          description: Candidate token.
        bytes:
          type: array
          items:
            type: integer
          description: >-
            The raw UTF-8 byte list of the current Token, used to accurately
            restore output content (e.g. emojis or Chinese characters).
        logprob:
          type: number
          format: float
          nullable: true
          description: Log probability. null means very low.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Pass Authorization: Bearer <token> header.'

````