Alibaba (Tongyi/Qwen)
Alibaba's Tongyi Qianwen (Qwen) models via DashScope — multilingual chat, reasoning, vision, embeddings, and media generation.
Overview
Alibaba Cloud offers the Tongyi Qianwen (Qwen) family of models through its DashScope / Model Studio platform, known for strong multilingual performance and a broad range of modalities.
Official Website: https://www.alibabacloud.com API Documentation: https://www.alibabacloud.com/help/en/model-studio/
Key features
- Multilingual — strong Chinese and English performance, plus many other languages
- Reasoning — reasoning-capable models for complex, multi-step problems
- Vision — image understanding and analysis
- Embeddings — text embeddings for semantic search and retrieval
- Media generation — image and video generation models
- Long context — large context windows for document-heavy workloads
Using Alibaba with Yunxin
Address Qwen models by prefixing the model id with the alibaba slug — alibaba/<model> (for example alibaba/qwen-...). You always call the same Yunxin base URL, https://api.yuhuanstudio.com/v1, with your sk- API key; Yunxin routes the request to Alibaba's DashScope API.
Usage example
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["YUNXIN_API_KEY"],
base_url="https://api.yuhuanstudio.com/v1",
)
response = client.chat.completions.create(
model="alibaba/qwen-model-id",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "你好!介绍一下你自己。"},
],
)
print(response.choices[0].message.content)Available models
List the models currently available for this provider:
curl "https://api.yuhuanstudio.com/v1/models?provider=alibaba" \
-H "Authorization: Bearer $YUNXIN_API_KEY"Capabilities and pricing are per-model. Use the Models API to discover which Qwen models are available and what each one supports.
Official resources
How is this guide?