dashscope
dashscope client sdk library
Decision gist · record as of 2026-08-14
Yes, if you are building on Alibaba Cloud's Model Studio platform. The SDK is actively maintained, has low install friction, and provides comprehensive coverage of Bailian's AI capabilities. Apache 2.0 licensing is permissive. However, it is only useful if you have an Alibaba Cloud account and API key; it is not a general-purpose LLM client and does not support other model providers.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a valid Alibaba Cloud Model Studio API key; set via code, environment variable DASHSCOPE_API_KEY, or file path.
- Low install friction with a pure-Python wheel distribution.
- Actively maintained with a recent release.
License · maintenance · safety
Apache 2.0 (permissive) — Licensed under Apache 2.0 (permissive), which allows commercial use, modification, and distribution with minimal restrictions—suitable for most production and proprietary projects.
last release 2026-08-12 (2 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,476,109 downloads/mo, #2,610 on PyPI
Alternatives
Verify before relying
pip install dashscope
import dashscope
dashscope.api_key = 'YOUR-DASHSCOPE-API-KEY'
from dashscope import Generation
response = Generation.call(
model="qwen-plus",
messages=[{"role": "user", "content": "Hello"}],
result_format="message",
)
print(response.output.choices[0].message.content)- Whether all supported models (qwen3.7-max, qwen3.5-omni-plus, etc.) are currently available and stable in production.
- Performance characteristics and rate limits for batch operations (BatchTextEmbedding, async tasks).
- Detailed error handling and retry behavior for network failures or API rate limiting.
What it is and what it does
DashScope is a Python client library for Alibaba Cloud's Model Studio (Bailian) platform, exposing a broad range of AI model capabilities through a unified SDK interface. It supports synchronous, streaming, and asynchronous calling patterns for text generation (via Qwen models), multi-modal understanding (vision, video, audio), text and multi-modal embeddings, reranking, image and video synthesis, speech synthesis and recognition, and tokenization. The SDK handles authentication via API key and abstracts the HTTP/WebSocket transport layer.
The library is designed for developers integrating Alibaba's AI models into Python applications. It provides high-level classes (Generation, MultiModalConversation, TextEmbedding, ImageSynthesis, etc.) that map to specific model categories and calling patterns. Async support via AioGeneration and async_call methods enables non-blocking integration in concurrent applications. The SDK requires Python 3.8 or later and depends on standard HTTP clients (requests, httpx, aiohttp) plus cryptography for secure communication.
Use it for
- Building chatbots or conversational AI applications using Qwen text generation models with streaming or async responses.
- Implementing semantic search or RAG systems with text embeddings and reranking via TextEmbedding and TextReRank classes.
- Creating image or video generation workflows using ImageSynthesis and VideoSynthesis for content creation pipelines.
- Adding speech synthesis (TTS) or speech recognition (ASR) to applications via SpeechSynthesizer and Transcription.
- Processing multi-modal queries (image + text, video + text) with MultiModalConversation for vision-language tasks.
- Batch processing large text corpora for embeddings using BatchTextEmbedding with async task submission and polling.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are building on Alibaba Cloud's Model Studio platform.
The SDK is actively maintained, has low install friction, and provides comprehensive coverage of Bailian's AI capabilities. Apache 2.0 licensing is permissive. However, it is only useful if you have an Alibaba Cloud account and API key; it is not a general-purpose LLM client and does not support other model providers.
Install
dashscope on PyPI
Before you install
Low install friction with a pure-Python wheel distribution. Actively maintained with a recent release. Nine runtime dependencies (aiohttp, requests, websocket-client, cryptography, certifi, typer, rich, httpx, httpx-sse) are all well-established libraries, adding moderate but manageable dependency weight.
Requires a valid Alibaba Cloud Model Studio API key; set via code, environment variable DASHSCOPE_API_KEY, or file path.
License in practice
Licensed under Apache 2.0 (permissive), which allows commercial use, modification, and distribution with minimal restrictions—suitable for most production and proprietary projects.
Quickstart
pip install dashscope
import dashscope
dashscope.api_key = 'YOUR-DASHSCOPE-API-KEY'
from dashscope import Generation
response = Generation.call(
model="qwen-plus",
messages=[{"role": "user", "content": "Hello"}],
result_format="message",
)
print(response.output.choices[0].message.content)
Verify before relying
- Whether all supported models (qwen3.7-max, qwen3.5-omni-plus, etc.) are currently available and stable in production.
- Performance characteristics and rate limits for batch operations (BatchTextEmbedding, async tasks).
- Detailed error handling and retry behavior for network failures or API rate limiting.
Package facts
| License | Apache 2.0 permissive |
| Python support | Supports the current Python release >=3.8.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 9 packagesaiohttprequestswebsocket-clientcryptographycertifityperrichhttpxhttpx-sse |
| Maintenance | Actively maintained 2 days since the last release |
| First released | |
| Downloads | 3,476,109 / month, #2,610 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: dashscope-1.26.7-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “alibaba cloud bailian api client”
- dashscopePython SDK for Alibaba Cloud Model Studio (Bailian) APIs, providing…
- alibabacloud-gateway-popProvides a gateway client for Alibaba Cloud's POP (Product Open…
- aliyun-python-sdk-coreProvides core client infrastructure for calling Alibaba Cloud APIs…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also zai-sdk · apache-airflow-providers-alibaba · deepgram-sdk · speechmatics-voice · aliyun-log-python-sdk · modelscope · alibabacloud-gateway-dingtalk · livekit-plugins-cartesia · elevenlabs · alibabacloud-credentials-api