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

# Qwen Models Guide — Chat, Code, Vision, TTS

> Use Qwen 3, Qwen 3.5, Qwen 3 Coder, Qwen 3 VL, and Qwen 3 TTS models via the Runcrate API.

export const RuncrateStyles = () => {
  if (typeof document !== 'undefined' && !document.getElementById('runcrate-overrides')) {
    const s = document.createElement('style');
    s.id = 'runcrate-overrides';
    s.textContent = `
      /* Match Runcrate's rounding scale (--radius: 0.75rem) */
      .rounded-sm { border-radius: 0.5rem !important; }   /* 8px */
      .rounded-md { border-radius: 0.625rem !important; } /* 10px */
      .rounded-lg { border-radius: 0.75rem !important; }  /* 12px */
      .rounded-l-sm { border-top-left-radius: 0.5rem !important; border-bottom-left-radius: 0.5rem !important; }
      .rounded-r-sm { border-top-right-radius: 0.5rem !important; border-bottom-right-radius: 0.5rem !important; }
      .rounded-l-md { border-top-left-radius: 0.625rem !important; border-bottom-left-radius: 0.625rem !important; }
      .rounded-r-md { border-top-right-radius: 0.625rem !important; border-bottom-right-radius: 0.625rem !important; }
      .rounded-l-lg { border-top-left-radius: 0.75rem !important; border-bottom-left-radius: 0.75rem !important; }
      .rounded-r-lg { border-top-right-radius: 0.75rem !important; border-bottom-right-radius: 0.75rem !important; }

      /* Cards: never pure white in light mode */
      .card { background-color: #fcfcfc !important; border-radius: 0.75rem !important; }
      html.dark .card { background-color: #141414 !important; }

      /* Docs hero box */
      .rc-hero { background-color: #fcfcfc; border: 1px solid #e0e0e0; }
      html.dark .rc-hero { background-color: #141414; border-color: #242424; }
      html.dark .rc-hero h1 { color: #f5f5f5; }

      /* Runcrate scrollbar — thin, transparent track, hide-until-hover thumb */
      ::-webkit-scrollbar { width: 6px; height: 6px; background-color: transparent; }
      ::-webkit-scrollbar-track { background-color: transparent; }
      ::-webkit-scrollbar-thumb { background-color: rgba(155, 155, 155, 0.5); border-radius: 10px; transition: opacity 0.3s ease; opacity: 0; }
      ::-webkit-scrollbar-thumb:hover { background-color: rgba(155, 155, 155, 0.7); }
      *:hover::-webkit-scrollbar-thumb,
      *:focus::-webkit-scrollbar-thumb,
      *:active::-webkit-scrollbar-thumb { opacity: 1; }
      * { scrollbar-width: thin; scrollbar-color: rgba(155, 155, 155, 0.5) transparent; }
    `;
    document.head.appendChild(s);
  }
  return null;
};

<RuncrateStyles />

Alibaba's Qwen family covers chat, code generation, vision understanding, and text-to-speech — all available through the Runcrate API with a single API key.

## Available Qwen models

| Model                                    | Category | Context | Strengths                                    |
| ---------------------------------------- | -------- | ------- | -------------------------------------------- |
| **Qwen3-Max**                            | Chat     | 128K    | Flagship reasoning and instruction following |
| **Qwen3.5-397B-A17B**                    | Chat     | 128K    | MoE architecture, high throughput            |
| **Qwen3-Coder-480B-A35B-Instruct-Turbo** | Code     | 256K    | Code generation, debugging, refactoring      |
| **Qwen3-VL-235B-A22B-Instruct**          | Vision   | 128K    | Image understanding, OCR, diagram analysis   |
| **Qwen3-TTS**                            | TTS      | —       | Natural-sounding speech synthesis            |

***

## Chat — Qwen3-Max

<CodeGroup>
  ```python Python theme={"theme":"github-dark"}
  from runcrate import Runcrate

  client = Runcrate(api_key="rc_live_YOUR_API_KEY")

  response = client.models.chat_completion(
      model="Qwen/Qwen3-Max",
      messages=[
          {"role": "system", "content": "You are a helpful research assistant."},
          {"role": "user", "content": "Compare microservices vs monolith for a team of 5 engineers."},
      ],
      max_tokens=1024,
  )

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

  ```typescript Vercel AI SDK theme={"theme":"github-dark"}
  import { runcrate } from '@runcrate/ai';
  import { generateText } from 'ai';

  const { text } = await generateText({
    model: runcrate('Qwen/Qwen3-Max'),
    prompt: 'Compare microservices vs monolith for a team of 5 engineers.',
  });
  ```
</CodeGroup>

***

## Code — Qwen3-Coder

Purpose-built for code generation with 256K context:

````python theme={"theme":"github-dark"}
from runcrate import Runcrate

client = Runcrate(api_key="rc_live_YOUR_API_KEY")

response = client.models.chat_completion(
    model="Qwen/Qwen3-Coder-480B-A35B-Instruct-Turbo",
    messages=[
        {"role": "system", "content": "Review code for bugs, style issues, and performance."},
        {"role": "user", "content": "Review this:\n\n```python\ndef process(data):\n    result = []\n    for i in range(len(data)):\n        if data[i] != None:\n            result.append(data[i] * 2)\n    return result\n```"},
    ],
    max_tokens=1024,
)

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

***

## Vision — Qwen3-VL

Analyze images, extract text, understand diagrams:

```python theme={"theme":"github-dark"}
from runcrate import Runcrate

client = Runcrate(api_key="rc_live_YOUR_API_KEY")

response = client.models.chat_completion(
    model="Qwen/Qwen3-VL-235B-A22B-Instruct",
    messages=[{
        "role": "user",
        "content": [
            {"type": "text", "text": "What does this chart show? Summarize the key trends."},
            {"type": "image_url", "image_url": {"url": "https://example.com/chart.png"}},
        ],
    }],
    max_tokens=512,
)

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

***

## TTS — Qwen3-TTS

```python theme={"theme":"github-dark"}
from runcrate import Runcrate

client = Runcrate(api_key="rc_live_YOUR_API_KEY")

response = client.models.text_to_speech(
    model="Qwen/Qwen3-TTS",
    input="Welcome to Runcrate. Your GPU instances are ready.",
    voice="alloy",
)

with open("welcome.mp3", "wb") as f:
    f.write(response.content)
```

***

## Choosing the right Qwen model

| Task                    | Model             | Why                            |
| ----------------------- | ----------------- | ------------------------------ |
| General chat, reasoning | Qwen3-Max         | Best overall quality           |
| High-throughput chat    | Qwen3.5-397B-A17B | MoE — fast and cheap per token |
| Code generation, review | Qwen3-Coder-480B  | 256K context, code-specialized |
| Image analysis, OCR     | Qwen3-VL-235B     | Vision-language understanding  |
| Speech synthesis        | Qwen3-TTS         | Natural TTS output             |

***

## Tips

* **Qwen3-Max** is the safe default for most chat tasks.
* **Qwen3.5 MoE** activates only 17B params per token — use it when you need speed at scale.
* **Qwen3-Coder** handles 256K context for cross-file refactoring.
* **Qwen3-VL** supports multiple images in a single request.

## Next steps

* [Chat completions reference](/models/chat-completions)
* [Text-to-speech reference](/models/text-to-speech)
* [Model catalog](/models/model-catalog)
