--- id: dashscope version: "1.26.7" license: Apache 2.0 license_treatment: permissive maintenance: active --- # dashscope — dashscope client sdk library License: permissive · Maintenance: active · Downloads: 3.5M/mo ## 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 above — verify before relying. Python SDK for Alibaba Cloud Model Studio (Bailian) APIs, providing access to text generation, embeddings, image/video synthesis, speech processing, and multi-modal understanding models. 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 pip install dashscope uv add dashscope poetry add dashscope ## Installing dashscope 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. 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) Requires a valid Alibaba Cloud Model Studio API key; set via code, environment variable DASHSCOPE_API_KEY, or file path. 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_current - Install friction: low - Maintenance: active - Downloads: 3.5M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags alibaba cloud bailian api client, qwen model sdk python, text generation embedding synthesis, multi-modal ai model interface, dashscope api wrapper, alibaba dashscope sdk, speech synthesis recognition python, alibaba-cloud, llm-client, multi-modal-ai [View on SkillFed](https://skillfed.io/packages/dashscope) · [View on PyPI](https://pypi.org/project/dashscope/)