> ## 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.6-Plus

> Qwen3.6-Plus multimodal model via AnyFast's OpenAI-compatible API.

Qwen3.6-Plus is Alibaba's flagship Qwen3.6 multimodal model, available through AnyFast's OpenAI-compatible Chat Completions API. Use the model ID `qwen3.6-plus` for text generation, image and video understanding, tool calling, and structured output.

## Key capabilities

* **1M-token context window** — Process long documents, conversations, and multimodal context.
* **64K maximum output** — Generate long-form answers, code, and structured results.
* **Multimodal input** — Accept text, images, and videos in the same conversation.
* **Large media capacity** — Up to 256 images and 64 videos in a request. Videos can be up to 2 hours or 2 GB.
* **Function calling** — Let the model select and call application-defined functions.
* **Built-in tools** — Use supported web search and code execution tools when enabled by the upstream service.
* **Structured output** — Request JSON output in non-thinking mode.

## Quick example

```bash cURL theme={null}
curl --request POST \
  --url https://www.anyfast.ai/v1/chat/completions \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "qwen3.6-plus",
    "messages": [
      {"role": "user", "content": "Explain how a solar eclipse happens."}
    ],
    "temperature": 1,
    "max_completion_tokens": 1024
  }'
```

```python Python theme={null}
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://www.anyfast.ai/v1",
)

response = client.chat.completions.create(
    model="qwen3.6-plus",
    messages=[
        {"role": "user", "content": "Explain how a solar eclipse happens."}
    ],
    temperature=1,
    max_completion_tokens=1024,
)

print(response.choices[0].message.content)
```

## Image and video input

Use OpenAI-compatible content parts for remote media URLs or base64 data URIs. Qwen3.6-Plus accepts up to 256 images and 64 videos in a request.

```python theme={null}
from openai import OpenAI

client = OpenAI(api_key="YOUR_API_KEY", base_url="https://www.anyfast.ai/v1")

response = client.chat.completions.create(
    model="qwen3.6-plus",
    messages=[
        {
            "role": "user",
            "content": [
                {"type": "text", "text": "Compare the image and video, then summarize the differences."},
                {
                    "type": "image_url",
                    "image_url": {"url": "https://example.com/reference.jpg"},
                },
                {
                    "type": "video_url",
                    "video_url": {"url": "https://example.com/sample.mp4"},
                },
            ],
        }
    ],
    max_completion_tokens=1024,
)

print(response.choices[0].message.content)
```

## Thinking and structured output

Set `enable_thinking` through `extra_body` when using the OpenAI SDK. For structured output and tool-calling workflows, follow the upstream requirement to use non-thinking mode.

```python theme={null}
response = client.chat.completions.create(
    model="qwen3.6-plus",
    messages=[{"role": "user", "content": "Return the result as JSON."}],
    response_format={"type": "json_object"},
    extra_body={"enable_thinking": False},
)
```

## Function calling

Define application functions in the `tools` array. When the model returns `tool_calls`, execute the selected function in your application, append the tool result to `messages`, and send the conversation back to the model.

```python theme={null}
tools = [
    {
        "type": "function",
        "function": {
            "name": "get_weather",
            "description": "Get the current weather for a city.",
            "parameters": {
                "type": "object",
                "properties": {"city": {"type": "string"}},
                "required": ["city"],
            },
        },
    }
]

response = client.chat.completions.create(
    model="qwen3.6-plus",
    messages=[{"role": "user", "content": "What is the weather in Singapore?"}],
    tools=tools,
    extra_body={"enable_thinking": False},
)

print(response.choices[0].message.tool_calls)
```

## Streaming

Set `stream` to `true` to receive Server-Sent Events. Set `stream_options.include_usage` to `true` if the final chunk should include token usage.

```python theme={null}
stream = client.chat.completions.create(
    model="qwen3.6-plus",
    messages=[{"role": "user", "content": "Write a short story about the ocean."}],
    stream=True,
    stream_options={"include_usage": True},
)

for chunk in stream:
    if chunk.choices:
        print(chunk.choices[0].delta.content or "", end="")
```

## Parameters

| Parameter               | Type             | Required | Description                                                                                                   |
| ----------------------- | ---------------- | -------: | ------------------------------------------------------------------------------------------------------------- |
| `model`                 | string           |      Yes | Must be `qwen3.6-plus`.                                                                                       |
| `messages`              | array            |      Yes | Conversation messages. Content can be text or image/video content parts.                                      |
| `max_completion_tokens` | integer          |       No | Maximum generated tokens, up to 65,536.                                                                       |
| `temperature`           | number           |       No | Sampling temperature in `[0, 2)`. Set only one of `temperature` and `top_p`.                                  |
| `top_p`                 | number           |       No | Nucleus sampling probability in `(0, 1]`. Set only one of `temperature` and `top_p`.                          |
| `stream`                | boolean          |       No | Return SSE chunks instead of one complete response. Default: `false`.                                         |
| `stream_options`        | object           |       No | Streaming options. `include_usage` defaults to `false`; set it to `true` to include usage in the final chunk. |
| `stop`                  | array            |       No | Array of stop sequences. The string form is not supported by the current AnyFast endpoint.                    |
| `seed`                  | integer          |       No | Seed from `0` to `2^31 - 1` for more repeatable output.                                                       |
| `presence_penalty`      | number           |       No | Repetition control from `-2` to `2`.                                                                          |
| `frequency_penalty`     | number           |       No | Frequency-based repetition control from `-2` to `2`.                                                          |
| `enable_thinking`       | boolean          |       No | Reasoning control field. With the OpenAI SDK, pass it through `extra_body`.                                   |
| `tools`                 | array            |       No | Application-defined functions or supported tools.                                                             |
| `tool_choice`           | string or object |       No | Controls whether the model may call tools or must call a selected function.                                   |
| `response_format`       | object           |       No | Structured output configuration, such as `{ "type": "json_object" }`. Use non-thinking mode when required.    |

<Card title="API Reference" icon="code" href="/api-reference/model-api/alibaba/qwen3.6-plus">
  Open the interactive API reference for Qwen3.6-Plus.
</Card>

<script src="/public/feedback.js" />
