skillfed

dashscope

dashscope client sdk library

dashscope v1.26.7 3.5M downloads/30d#2,610 on PyPI
Permissive license Apache 2.0 Active released

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

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

dashscope on PyPI

pip

pip install dashscope

uv

uv add dashscope

poetry

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 the current Python release (>=3.8.0)
Install friction low — pure-Python wheel
Runtime dependencies 9 — aiohttp, requests, websocket-client, cryptography, certifi, typer, rich, httpx, httpx-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)

Evidence: dashscope-1.26.7-py3-none-any.whl

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

Tags

alibaba cloud bailian api clientqwen model sdk pythontext generation embedding synthesismulti-modal ai model interfacedashscope api wrapperalibaba dashscope sdkspeech synthesis recognition python
alibaba-cloudllm-clientmulti-modal-ai

More Artificial Intelligence packages

litellm

LiteLLM provides a unified Python interface to…

permissive · top 100 on PyPI

huggingface-hub

Client library and CLI tool for downloading,…

permissive · top 100 on PyPI

langchain

LangChain provides a framework for building…

permissive · top 1,000 on PyPI

hf-xet

hf-xet provides chunk-based deduplication and…

permissive · top 1,000 on PyPI

tokenizers

Tokenizers converts raw text into token…

permissive · top 1,000 on PyPI

transformers

Transformers provides a unified framework for…

permissive · top 1,000 on PyPI

zai-sdk

Official Python SDK for Z.ai's large model…

unclear · top 15,000 on PyPI

apache-airflow-providers-alibaba

Integrates Alibaba Cloud services (OSS, ADB,…

permissive · top 15,000 on PyPI

deepgram-sdk

Official Python SDK for Deepgram's speech…

permissive · top 5,000 on PyPI

speechmatics-voice

Python SDK for building real-time voice…

permissive · top 15,000 on PyPI

aliyun-log-python-sdk

Python SDK for Alibaba Cloud Log Service that…

permissive · top 15,000 on PyPI

modelscope

ModelScope provides unified Python interfaces…

permissive · top 5,000 on PyPI

alibabacloud-gateway-dingtalk

Provides a gateway client for integrating with…

permissive · top 15,000 on PyPI

livekit-plugins-cartesia

Integrates Cartesia's voice AI services…

permissive · top 5,000 on PyPI

elevenlabs

Official Python SDK for ElevenLabs…

permissive · top 5,000 on PyPI

alibabacloud-credentials-api

Provides credential management interfaces and…

permissive · top 5,000 on PyPI