Model Studio provides official DashScope SDKs (Python, Java) and supports OpenAI SDKs (Python, Node.js, Java, Go) for OpenAI-compatible API calls.
To call real-time speech or multimodal models supported by Realtime API over AOQ, see AOQ SDK downloads. For supported models and protocols, see Model and protocol support.
Install the SDK
- Python
- Java
- Node.js
- Go
The SDK requires
Python >= 3.9.You can call models on Model Studio using the DashScope Python SDK (recommended) or the OpenAI Python SDK.- Install the DashScope Python SDK
- Install the OpenAI Python SDK
Install or upgrade the DashScope Python SDK:Look for
The Python SDK examples in this documentation are all based on DashScope Python SDK 2.0. Make sure you install version 2.0.1 or later. Existing projects on 1.x can continue running (1.x and 2.0 coexist in the same package); see each code example for how to migrate to 2.0.
Successfully installed ... dashscope-x.x.x to confirm installation.What to do next
After installing the SDK:
- Select a model that fits your scenario from the Model Studio console.
- Start building your application using models for text generation, image generation, video generation, speech synthesis, speech recognition, embedding, or reranking.
- Learn about the compatibility details with the OpenAI API.