---
title: "Qwen API (2026): Models, API Key & OpenAI-Compatible Setup | Straitly"
description: "Compare 12 Qwen API models, context windows and tool-calling support. Get a Model Studio or Straitly API key and call Qwen with the OpenAI SDK."
url: https://straitly.ai/qwen-api
updated: 2026-11-21
publisher: Straitly (https://straitly.ai)
---

# Qwen API

Get a Qwen API key from Alibaba Cloud Model Studio, or call 12 Qwen models with one Straitly key. Both are OpenAI-compatible: change the API key, base URL and model name. Pick by job: Qwen3.8 Flash for fast, low-cost calls.

Updated 21 November 2026

[Get a key](https://straitly.ai/signup) [Pick a Qwen model ](#which-model)

Fig. 1, 25 November 2026

12

Qwen models on Straitly's model list, out of 117 models, all on one key [\[6\]](#src-6).

## How do I get a Qwen API key?

| Compared               | Alibaba                                                                                                                      | Straitly                                                                                             |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| Where you get the key  | The Model Studio API Key page, from an Alibaba Cloud account or a RAM user [\[1\]](#src-1)                                   | The API keys page in the Straitly console, after you sign up [\[7\]](#src-7)                         |
| Regions                | “Each region has its own endpoint, API keys, and model list.” [\[1\]](#src-1)                                                | One key and one base URL for every model [\[7\]](#src-7)                                             |
| Base URL               | https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1 in Singapore; other regions differ [\[2\]](#src-2) | https://api.straitly.ai/v1 [\[7\]](#src-7)                                                           |
| Models on the same key | Qwen and third-party models [\[3\]](#src-3)                                                                                  | 12 Qwen models, 117 models in all, Claude, GPT and Gemini included [\[6\]](#src-6)                   |
| To start               | A free quota on first activation in Singapore, then pay-as-you-go [\[5\]](#src-5)                                            | Prepaid credits, with no subscription and no minimum. A failed request costs nothing [\[8\]](#src-8) |

Alibaba shows the full key once, when you create it [\[1\]](#src-1). On Straitly, create a key on the API keys page, set the base URL, and send any Qwen model id [\[7\]](#src-7).

[Get a Straitly key](https://straitly.ai/signup)

## Is the Qwen API OpenAI-compatible?

Yes. Alibaba's docs: “You can migrate your existing OpenAI code to Model Studio by changing only the API key, base URL, and model name.” [\[2\]](#src-2) Through Straitly it is the same change, and the Anthropic format works too [\[7\]](#src-7).

Copy

```
from openai import OpenAI

client = OpenAI(
    base_url="https://api.straitly.ai/v1",
    api_key="YOUR_STRAITLY_API_KEY",
)
reply = client.chat.completions.create(
    model="qwen/qwen3.8-flash",
    messages=[
        {"role": "user", "content": "Hello"}
    ],
)
```

Swap the model for any model id in the table below.

[Read the quickstart ](https://straitly.ai/docs/quickstart)

### Your prompts stay yours.

Zero data retention is on by default for every account and key: prompts and completions are never written to disk or logs and never used for training [\[9\]](#src-9).

## Which Qwen model should I pick?

All Max Plus Flash Other

Search Qwen models

| Model                                                                                                          | Context | Released       | Supports                 | Price                                                      |
| -------------------------------------------------------------------------------------------------------------- | ------- | -------------- | ------------------------ | ---------------------------------------------------------- |
| [Qwen3.8 Flash](https://straitly.ai/models/qwen3.8-flash) qwen/qwen3.8-flash, pick for fast and cost-effective | 1M      | August 2026    | Vision, Tools, Reasoning | [Live price](https://straitly.ai/models/qwen3.8-flash)     |
| [Qwen3.8 27B](https://straitly.ai/models/qwen3.8-27b) qwen/qwen3.8-27b                                         | 1M      | August 2026    | Vision, Tools, Reasoning | [Live price](https://straitly.ai/models/qwen3.8-27b)       |
| [Qwen3.8 2.4T A95B](https://straitly.ai/models/qwen3.8-2.4t-a95b) qwen/qwen3.8-2.4t-a95b                       | 1.05M   | August 2026    | Tools, Reasoning         | [Live price](https://straitly.ai/models/qwen3.8-2.4t-a95b) |
| [Qwen3.8 Max](https://straitly.ai/models/qwen3.8-max) qwen/qwen3.8-max                                         | 1M      | August 2026    | Vision, Tools, Reasoning | [Live price](https://straitly.ai/models/qwen3.8-max)       |
| [Qwen3.7 Flash](https://straitly.ai/models/qwen3.7-flash) qwen/qwen3.7-flash                                   | 1M      | July 2026      | Vision, Tools, Reasoning | [Live price](https://straitly.ai/models/qwen3.7-flash)     |
| [Qwen3.7 Max](https://straitly.ai/models/qwen3.7-max) qwen/qwen3.7-max                                         | 1M      | May 2026       | Tools, Reasoning         | [Live price](https://straitly.ai/models/qwen3.7-max)       |
| [Qwen3.6 27B](https://straitly.ai/models/qwen3.6-27b) qwen/qwen3.6-27b                                         | 262K    | April 2026     | Vision, Tools, Reasoning | [Live price](https://straitly.ai/models/qwen3.6-27b)       |
| [Qwen3.6 35B A3B](https://straitly.ai/models/qwen3.6-35b-a3b) qwen/qwen3.6-35b-a3b                             | 262K    | Not listed yet | Vision, Tools, Reasoning | [Live price](https://straitly.ai/models/qwen3.6-35b-a3b)   |
| [Qwen3.5 Plus](https://straitly.ai/models/qwen3.5-plus) qwen/qwen3.5-plus                                      | 1M      | February 2026  | Not listed yet           | [Live price](https://straitly.ai/models/qwen3.5-plus)      |
| [Qwen3.5 397B A17B](https://straitly.ai/models/qwen3.5-397b-a17b) qwen/qwen3.5-397b-a17b                       | 262K    | February 2026  | Vision, Tools, Reasoning | [Live price](https://straitly.ai/models/qwen3.5-397b-a17b) |
| [Qwen3.5 Flash](https://straitly.ai/models/qwen3.5-flash) qwen/qwen3.5-flash                                   | 1M      | Not listed yet | Not listed yet           | [Live price](https://straitly.ai/models/qwen3.5-flash)     |
| [Qwen3.5 35B A3B](https://straitly.ai/models/qwen3.5-35b-a3b) qwen/qwen3.5-35b-a3b                             | 262K    | Not listed yet | Vision, Tools, Reasoning | [Live price](https://straitly.ai/models/qwen3.5-35b-a3b)   |

Alibaba describes its three recommended lines this way: Max for “Complex reasoning and coding”, Plus for “Balanced performance, speed, and cost” and Flash for “Fast and cost-effective” [\[3\]](#src-3). The rows marked pick are the newest Flash on Straitly's model list [\[6\]](#src-6). Release months are from Alibaba's release notes and the catalog [\[4\]](#src-4) [\[6\]](#src-6). Not listed yet marks a detail still being confirmed for that model.

[See every model ](https://straitly.ai/models)

## What else do people ask about the Qwen API?

[Ask a question](https://straitly.ai/contact)

- ### What is the Qwen API base URL?
On Alibaba Cloud Model Studio it depends on your workspace and region, for example https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1 in Singapore [\[2\]](#src-2). On Straitly it is https://api.straitly.ai/v1 for every Qwen model [\[7\]](#src-7).
- ### Is the Qwen API free?
Alibaba gives new Model Studio users a free quota on first activation, only for models in the Singapore region with International scope, then bills pay-as-you-go [\[5\]](#src-5). Straitly is prepaid per token with no subscription and no minimum, and a failed request costs nothing [\[8\]](#src-8).
- ### How much does the Qwen API cost?
Each Qwen model has its own per-token price. Every model's live price is on its own page: follow any model in the table above, or see [pricing](https://straitly.ai/pricing) [\[8\]](#src-8).
- ### Do Qwen models support tool calling through Straitly?
Yes. Tool calling, vision and structured outputs pass through unchanged in the OpenAI format [\[7\]](#src-7). The table shows what each Qwen model supports according to the catalog [\[6\]](#src-6).
- ### Can I use Qwen in Cursor, Claude Code or another coding tool?
Yes, in any tool that lets you set a base URL and an API key: use https://api.straitly.ai/v1, your Straitly key and a Qwen model id. Each tool's setup is in [integrations](https://straitly.ai/integrations) [\[7\]](#src-7).

## Sources

Alibaba's docs change often. If something here is out of date, tell us at [straitly.ai/contact](https://straitly.ai/contact).

1. \[1\] [Model Studio: Obtain an API key](https://www.alibabacloud.com/help/en/model-studio/get-api-key) alibabacloud.com, 21 November 2026
2. \[2\] [Model Studio: OpenAI compatible, Chat](https://www.alibabacloud.com/help/en/model-studio/compatibility-of-openai-with-dashscope) alibabacloud.com, 21 November 2026
3. \[3\] [Model Studio: Recommended models](https://www.alibabacloud.com/help/en/model-studio/models) alibabacloud.com, 21 November 2026
4. \[4\] [Model Studio: Model releases and updates](https://www.alibabacloud.com/help/en/model-studio/newly-released-models) alibabacloud.com, 21 November 2026
5. \[5\] [Model Studio: Free quota for new users](https://www.alibabacloud.com/help/en/model-studio/new-free-quota) alibabacloud.com, 21 November 2026
6. \[6\] [Straitly models](https://straitly.ai/models) straitly.ai/api/catalog, shown on straitly.ai/models, 25 November 2026
7. \[7\] [Straitly quickstart](https://straitly.ai/docs/quickstart) straitly.ai/docs/quickstart, 21 November 2026
8. \[8\] [Straitly pricing](https://straitly.ai/pricing) straitly.ai/pricing, 21 November 2026
9. \[9\] [Straitly data retention](https://straitly.ai/docs/data-retention) straitly.ai/docs/data-retention, 21 November 2026

**What each source says**

Model Studio: Obtain an API key

Keys are created on the Model Studio API Key page by "an Alibaba Cloud account or a RAM user". "Each region has its own endpoint, API keys, and model list. They cannot be used across regions." Checked 21 November 2026.

Model Studio: OpenAI compatible, Chat

"The Qwen models on Model Studio support OpenAI compatible interfaces. You can migrate your existing OpenAI code to Model Studio by changing only the API key, base URL, and model name." The base URL is set per workspace and region. Checked 21 November 2026.

Model Studio: Recommended models

Recommended text models: Max for "Complex reasoning and coding", Plus for "Balanced performance, speed, and cost", Flash for "Fast and cost-effective". Checked 21 November 2026.

Model Studio: Model releases and updates

The day each Qwen model was released on Model Studio, by region and deployment scope. Checked 21 November 2026.

Model Studio: Free quota for new users

A free quota on first activation, for models in the Singapore region with International deployment scope only; then pay-as-you-go. Checked 21 November 2026.

Straitly models

Every model id Straitly serves, with its context window, what it supports and its live price. Checked 25 November 2026.

Straitly quickstart

One OpenAI-compatible base URL, https://api.straitly.ai/v1; the Anthropic format works too. Tool calling, vision and structured outputs pass through unchanged. Checked 21 November 2026.

Straitly pricing

Billed per token from prepaid credits. No subscription and no minimum. A failed request costs nothing. Checked 21 November 2026.

Straitly data retention

Zero data retention on by default for every account and key; prompts and completions never written to disk or logs and never used for training; only billing metadata is kept. Checked 21 November 2026.

Read next: [LLM API Price Index](https://straitly.ai/llm-api-price-index) , [Integrations](https://straitly.ai/integrations) , [Straitly vs direct provider APIs](https://straitly.ai/compare/direct-api) , [DeepSeek API](https://straitly.ai/deepseek-api).

## Call Qwen with one key.

Prepaid per token, no subscription, no minimum. Failed requests are free.

[Console](https://straitly.ai/app) [Talk to sales ](https://straitly.ai/contact)

---
Markdown version of https://straitly.ai/qwen-api.
