Skip to main content

Install the SDK

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:
# If this fails, replace pip with pip3
pip install -U "dashscope>=2.0.1"
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.
Look for Successfully installed ... dashscope-x.x.x to confirm installation.

What to do next

After installing the SDK: