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

# qwen3.7-max-preview

> Qwen 模型 Qwen3.7-Max-Preview — 请求与响应字段.



## OpenAPI

````yaml zh/api-reference/model-api/alibaba/openapi/qwen3.7-max-preview/openapi.yaml POST /v1/chat/completions
openapi: 3.1.0
info:
  title: Qwen3.7-Max-Preview
  description: >-
    Qwen3.7-Max-Preview through AnyFast's OpenAI-compatible Chat Completions
    API.
  version: 1.0.0
servers:
  - url: https://www.anyfast.ai
security:
  - bearerAuth: []
paths:
  /v1/chat/completions:
    post:
      summary: Chat Completion
      description: Create a completion using the exact model ID `qwen3.7-max-preview`.
      operationId: createChatCompletionQwen37Maxpreview
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChatCompletionRequest'
            example:
              model: qwen3.7-max-preview
              messages:
                - role: user
                  content: Reply with exactly OK.
              max_completion_tokens: 1024
              enable_thinking: true
      responses:
        '200':
          description: A complete response, or Server-Sent Events when stream is true.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatCompletion'
              example:
                id: chatcmpl-example
                object: chat.completion
                created: 1790000000
                model: qwen3.7-max-preview
                choices:
                  - index: 0
                    message:
                      content: OK
                      role: assistant
                      reasoning_content: Reasoning text omitted from this example.
                    finish_reason: stop
                usage:
                  completion_tokens: 263
                  completion_tokens_details:
                    reasoning_tokens: 257
                  prompt_tokens: 15
                  total_tokens: 278
            text/event-stream:
              schema:
                type: string
                description: >-
                  SSE data frames contain ChatCompletionChunk objects and
                  terminate with [DONE].
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Access denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ChatCompletionRequest:
      type: object
      required:
        - model
        - messages
      properties:
        model:
          type: string
          const: qwen3.7-max-preview
          description: Exact public AnyFast model ID.
        messages:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/Message'
        max_completion_tokens:
          type: integer
          minimum: 1
          maximum: 131072
          description: >-
            Upstream maximum output length; actual available output also depends
            on context.
        enable_thinking:
          type: boolean
          const: true
          description: This preview supports thinking mode only.
        stream:
          type: boolean
          default: false
        stream_options:
          type: object
          description: Options used when stream is true.
          properties:
            include_usage:
              type: boolean
              default: false
              description: Include usage in a final SSE chunk.
        tools:
          type: array
          items:
            $ref: '#/components/schemas/Tool'
        tool_choice:
          type: string
          enum:
            - none
            - auto
          description: Thinking mode rejects required and forced function choices.
    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 timestamp.
        model:
          type: string
          const: qwen3.7-max-preview
        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:
          type: string
    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
    AssistantMessage:
      type: object
      required:
        - role
        - content
      properties:
        role:
          type: string
          const: assistant
        content:
          type: string
        reasoning_content:
          type:
            - string
            - 'null'
          description: Present in observed thinking-mode responses.
        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-encoded function arguments.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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