Keys / Alibaba Cloud Model Studio

DASHSCOPE_API_KEY

The Model Studio API key your app calls Qwen and other models with. Each key works in one region and belongs to one workspace.

Expires
never
API
create, list, edit, enable, disable, reset and delete, with an Alibaba Cloud AccessKey

Get it

Create one on modelstudio.console.alibabacloud.com/ap-southeast-1/settings/api-key. The steps aren't recorded yet.

Set it

DASHSCOPE_API_KEY=...

The DashScope SDKs for Python and Java read it from this variable when you don't pass a key. Or keep it out of .env with keypin: keypin run -- npm run dev

Replace it

  1. Create a new key in the same region and workspace, with the same permissions, IP whitelist and model scope. Don't use Reset for this: it stops the old value at once.
  2. Deploy it everywhere that reads DASHSCOPE_API_KEY.
  3. Check that requests succeed with the new key, then disable the old one. You can re-enable it if something breaks. Disable isn't available in US (Virginia).
  4. Delete the old key. Async tasks it started keep running after it's deleted.

Set rotate_every on the key in keypin.toml and a rotated date on its vault item, and keypin status shows when it's due.

Sources, checked 2026-11-16