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

# qwen3.8-flash

> Qwen 模型 Qwen3.8-Flash — 请求与响应字段.



## OpenAPI

````yaml api-reference/model-api/alibaba/openapi/qwen3.8-flash/openapi.yaml POST /v1/chat/completions
openapi: 3.1.0
info:
  title: Qwen3.8-Flash
  description: 通过 AnyFast OpenAI 兼容 Chat Completions 接口调用 Qwen3.8-Flash。
  version: 1.0.0
servers:
  - url: https://www.anyfast.com.cn
security:
  - bearerAuth: []
paths:
  /v1/chat/completions:
    post:
      summary: 对话补全
      description: 使用准确的模型 ID `qwen3.8-flash` 创建对话补全。
      operationId: createChatCompletionQwen38Flash
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatCompletionRequest'
            example:
              model: qwen3.8-flash
              messages:
                - role: user
                  content: 请只回复 OK。
              max_completion_tokens: 1024
              enable_thinking: false
      responses:
        '200':
          description: 请求成功。非流式返回完整响应；流式返回 Server-Sent Events。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletion'
              example:
                id: chatcmpl-example
                object: chat.completion
                created: 1790000000
                model: qwen3.8-flash
                choices:
                  - index: 0
                    message:
                      role: assistant
                      content: OK
                    finish_reason: stop
                    logprobs: null
                usage:
                  prompt_tokens: 40
                  total_tokens: 51
                  completion_tokens: 11
                  prompt_tokens_details:
                    cached_tokens: 0
                    text_tokens: 40
            text/event-stream:
              schema:
                type: string
                description: SSE 数据帧包含 ChatCompletionChunk 对象，以 [DONE] 结束。
        '400':
          description: 请求参数无效
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: 未授权
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: 无权访问
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: 请求频率超限
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ChatCompletionRequest:
      type: object
      required:
        - model
        - messages
      properties:
        model:
          type: string
          const: qwen3.8-flash
          description: 准确的 AnyFast 公共模型 ID。
        messages:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/Message'
        max_completion_tokens:
          type: integer
          minimum: 1
          maximum: 131072
          description: 上游最大输出长度；实际可用输出长度还受上下文占用影响。
        enable_thinking:
          type: boolean
          default: true
          description: 控制思考模式。使用 OpenAI SDK 时通过 extra_body 传递。
        stream:
          type: boolean
          default: false
        stream_options:
          type: object
          description: 仅在 stream 为 true 时生效的流式选项。
          properties:
            include_usage:
              type: boolean
              default: false
              description: 在最后一个 SSE 数据块中包含 Token 用量。
        response_format:
          type: object
          description: 关闭思考模式后，已通过 AnyFast 国内站验证 JSON 对象输出。
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - json_object
        tools:
          type: array
          items:
            $ref: '#/components/schemas/Tool'
        tool_choice:
          type: string
          enum:
            - none
            - auto
            - required
          description: 控制是否必须调用函数。
    ChatCompletion:
      type: object
      required:
        - id
        - object
        - created
        - model
        - choices
        - usage
      properties:
        id:
          type: string
        object:
          type: string
          const: chat.completion
        created:
          type: integer
          description: Unix 时间戳。
        model:
          type: string
          const: qwen3.8-flash
        choices:
          type: array
          items:
            $ref: '#/components/schemas/Choice'
        usage:
          $ref: '#/components/schemas/Usage'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
          properties:
            message:
              type: string
            type:
              type: string
            code:
              type: string
            param:
              type:
                - string
                - 'null'
    Message:
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          enum:
            - system
            - user
            - assistant
            - tool
        content:
          oneOf:
            - type: string
            - type: array
              items:
                $ref: '#/components/schemas/ContentPart'
    Tool:
      type: object
      required:
        - type
        - function
      properties:
        type:
          type: string
          const: function
        function:
          type: object
          required:
            - name
            - parameters
          properties:
            name:
              type: string
            description:
              type: string
            parameters:
              type: object
              additionalProperties: true
    Choice:
      type: object
      required:
        - index
        - message
        - finish_reason
      properties:
        index:
          type: integer
        message:
          $ref: '#/components/schemas/AssistantMessage'
        finish_reason:
          type: string
          enum:
            - stop
            - length
            - tool_calls
            - content_filter
        logprobs:
          type:
            - object
            - 'null'
    Usage:
      type: object
      required:
        - prompt_tokens
        - completion_tokens
        - total_tokens
      properties:
        prompt_tokens:
          type: integer
        completion_tokens:
          type: integer
        total_tokens:
          type: integer
        prompt_tokens_details:
          type: object
          properties:
            cached_tokens:
              type: integer
            text_tokens:
              type: integer
            image_tokens:
              type: integer
            video_tokens:
              type: integer
        completion_tokens_details:
          type: object
          properties:
            reasoning_tokens:
              type: integer
            text_tokens:
              type: integer
    ContentPart:
      oneOf:
        - type: object
          required:
            - type
            - text
          properties:
            type:
              type: string
              const: text
            text:
              type: string
        - type: object
          required:
            - type
            - image_url
          properties:
            type:
              type: string
              const: image_url
            image_url:
              type: object
              required:
                - url
              properties:
                url:
                  type: string
                  description: 可访问的 HTTPS URL 或 base64 数据 URI。
        - type: object
          required:
            - type
            - video_url
          properties:
            type:
              type: string
              const: video_url
            video_url:
              type: object
              required:
                - url
              properties:
                url:
                  type: string
                  description: 可访问的 HTTPS URL 或 base64 数据 URI。
    AssistantMessage:
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          const: assistant
        content:
          type: string
        reasoning_content:
          type:
            - string
            - 'null'
          description: 在实测的思考模式响应中出现。
        tool_calls:
          type: array
          items:
            $ref: '#/components/schemas/ToolCall'
    ToolCall:
      type: object
      required:
        - id
        - type
        - function
      properties:
        id:
          type: string
        index:
          type: integer
        type:
          type: string
          const: function
        function:
          type: object
          required:
            - name
            - arguments
          properties:
            name:
              type: string
            arguments:
              type: string
              description: JSON 编码的函数参数。
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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