All insights

Model APIs

Qwen 2.5 Model: Choose a Variant and Verify API Access

Understand the Qwen2.5 model family, shortlist general and specialist options, and check model-specific limits, licensing, and production API terms before deployment.

Illustration for Qwen 2.5 model

Qwen2.5 is a model family, not a single model or API endpoint. Qwen’s announcement describes general open-weight models in several sizes, plus coding-focused Qwen2.5-Coder and math-focused Qwen2.5-Math. Alibaba Model Studio identifies qwen-max as a Qwen2.5-series API model and documents it for China (Beijing) and Singapore. The API route and prices below are specific to the documented Beijing option—not to every Qwen2.5 variant or region.

What does “Qwen2.5” refer to?

Qwen’s September 2024 announcement describes the open-weight Qwen2.5 language models as dense, decoder-only models and lists seven sizes: 0.5B, 1.5B, 3B, 7B, 14B, 32B, and 72B. It also identifies Qwen2.5-Coder and Qwen2.5-Math as specialist families. These are announcement-era lineup details, not a guarantee that every size is available through every provider or runtime.

The hosted-model names differ across Qwen materials. The announcement names Qwen-Turbo and Qwen-Plus as Model Studio APIs; the Qwen technical report, revised January 3, 2025, names Qwen2.5-Turbo and Qwen2.5-Plus as hosted MoE variants. Don’t assume those names are interchangeable with each other—or with current API model IDs—without checking the provider’s current model list.

Which Qwen2.5 variant should you shortlist?

Shortlist based on the task, then evaluate candidates with your own prompts and data. The sources describe intended uses, but do not establish a universal best model.

Priority Candidate to evaluate What the sources establish—and what they don’t
General-purpose open-weight inference A general Qwen2.5 size that fits your deployment constraints Qwen lists seven sizes, but the announcement does not establish hardware requirements or a current performance ranking for your task.
Coding Qwen2.5-Coder Qwen describes it as designed for coding applications. That is a shortlist signal, not proof it will outperform another model on your codebase.
Mathematics Qwen2.5-Math Qwen describes it as math-focused and says it supports Chinese and English. Test the exact problems and output formats you need.
Managed API access Alibaba Model Studio’s qwen-max Alibaba identifies qwen-max as a Qwen2.5-series model and lists China (Beijing) and Singapore support. Its API specifications do not automatically apply to local variants.

Ollama’s catalog lists general-family artifacts ranging from 398 MB for 0.5B to 47 GB for 72B. These are catalog artifact sizes—not RAM requirements, total runtime storage needs, or evidence of speed or quality. The visible catalog entries show 32K context.

Check the exact model’s limits and features

A family-level capability should not be treated as the specification for a particular hosted API or local package. Qwen’s announcement says Qwen2.5 language models support up to 128K tokens of context and can generate up to 8K tokens. The same announcement also describes long-text generation as “over 8K tokens,” so its general generation wording is not fully consistent. Ollama’s visible catalog entries, meanwhile, show 32K context.

For Alibaba Model Studio’s qwen-max API, the model information page lists 30,720 maximum input tokens, 8,192 maximum output tokens, and a 32,768-token context window. These limits apply to qwen-max as listed there; check the exact model ID and route you plan to use.

Calling Qwen2.5 through a production API

A documented Alibaba Model Studio route for qwen-max in China (Beijing) is the OpenAI-compatible Chat API. The model information page lists China (Beijing) support. The OpenAI-compatible Chat guide gives this workspace-specific base URL:

https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/compatible-mode/v1

For a direct HTTP chat-completions request, append /chat/completions. Replace {WorkspaceId} with the ID shown in the Model Studio console. For setup, see Alibaba’s first API call guide: create a Model Studio API key, use the workspace ID in the base URL, and specify qwen-max as the model name in the request body. Alibaba recommends storing the key in an environment variable rather than hard-coding it.

The Chat guide also documents a Virginia endpoint, but the qwen-max model page lists Beijing and Singapore—not Virginia—in its regional capability table. So the documented Beijing pairing above is the clearer route to use based on these pages; don’t infer qwen-max availability in Virginia from the general endpoint list alone.

What does the hosted API cost?

For the China (Beijing) and Singapore scopes, Alibaba’s qwen-max page lists CNY 2.4 per 1 million input tokens and CNY 9.6 per 1 million output tokens. The page lists a separate International price scope—CNY 11.743 per 1 million input tokens and CNY 46.971 per 1 million output tokens—but does not define which regions or account configurations fall under that label. For the Beijing route above, use the Beijing-listed prices as the relevant published figures; confirm current console pricing and any promotions before budgeting.

Local inference is a separate access route

For local use, Ollama’s catalog shows ollama run qwen2.5 as a starting command. Qwen’s announcement also includes a vLLM example serving Qwen/Qwen2.5-7B-Instruct through an OpenAI-compatible endpoint on localhost:8000. These are local inference examples—not hosted API instructions—and do not establish hardware requirements or production deployment settings.

Before you commit

  • Confirm the exact model ID, provider, and region. Similar-looking Qwen names can refer to different models or services.
  • Test your workload. Compare shortlisted models on representative prompts, output formats, and failure cases; announcement claims do not determine a winner for your use case.
  • Verify usable context and output limits. Check the exact model and serving route rather than applying a family-level limit to every API or package.
  • Check feature support and quotas. Features and service limits may depend on model and region; confirm them with the provider.
  • Review the exact license for open-weight use. Qwen’s announcement says Apache 2.0 applies except to the 3B and 72B variants and points readers to individual repository license files. Check the license for the precise release you plan to use; this guide does not interpret legal terms.
  • Budget the route you will actually use. For a hosted API, confirm the currency, input/output billing, region, and any applicable promotions. For self-hosting, don’t mistake an artifact’s download size for total infrastructure cost.

Bottom line: shortlist general Qwen2.5 for broad language tasks, Qwen2.5-Coder for coding, or Qwen2.5-Math for mathematics. For a documented hosted option, Alibaba lists qwen-max for China (Beijing) and Singapore; its Beijing OpenAI-compatible route requires a workspace ID and Model Studio API key. Check the exact model, regional terms, and current price before production use.

Sources

Qwen2.5: A Party of Foundation Models!

Qwen2.5 Technical Report

qwen2.5 model library

qwen-max Model Info — Alibaba Cloud Model Studio

OpenAI compatible - Chat — Alibaba Cloud Model Studio

Make your first API call to Qwen — Alibaba Cloud Model Studio

Contact us