Skip to content

Getting started with Model Studio

This is a tutorial. Finish it and you will have sent one Model Studio request from your machine.

URLs and plans: cheatsheet. Names: glossary. Concrete problems: Cookbook.

Goal: go from "I have heard of Qwen" to "my Node service can hit a pinned model".

Attention, tokenization, and training are in LLM fundamentals and Learn LLM. Not here.

Step 0: Confirm you want Model Studio

You wantGo
HTTP API, console apps, quota for coding toolsThis page
Only Tongyi chatQwen (#83), not this tutorial
An Alibaba coding IDEQoder CN / Lingma (#84), not this tutorial

Model Studio has no official standalone mobile app. The entry is the web console. FAQ

Step 1: Activate and pick a region

  1. Sign in with the Alibaba Cloud primary account and open the console.
  2. Switch region in the top-right. The China-site intro lists China (Beijing), US (Virginia), Singapore, Germany (Frankfurt), Japan (Tokyo). ZH intro. The international intro also lists China (Hong Kong).
  3. Accept the agreement. No dialog means that region is already on. FAQ
  4. Complete identity verification if the console asks.

Keys, base URLs, catalogs, and prices do not cross regions.

China-site free quota is Beijing only. The international intro places new-user quota in Singapore. Do not copy one site's numbers onto the other.

Activation is free. Inference, fine-tuning, and deployment bill. Intro

Step 2: Create an API key and put it in the environment

Follow Get an API key (China-site; same product):

  1. Pick the region → API KeyCreate.
  2. Prefer the default workspace.
  3. Permission All unless you need an IP or model allowlist.
  4. The plaintext key is shown once. Copy it.

The official env var is DASHSCOPE_API_KEY (legacy DashScope name, not a second product):

bash
# macOS / zsh — replace YOUR_DASHSCOPE_API_KEY
echo "export DASHSCOPE_API_KEY='YOUR_DASHSCOPE_API_KEY'" >> ~/.zshrc
source ~/.zshrc

Bash and Windows variants are on the same official page.

New PAYG keys start with sk-ws (except US Virginia). Older sk- keys still work.

Beijing / Singapore / Tokyo / Frankfurt MaaS URLs also need a WorkspaceId. Copy it from workspace management. First API call

Step 3: Send the first request

Install the official Node path:

bash
npm install openai

Replace {WorkspaceId}. This is the Node.js sample from First API call to Qwen:

js
import OpenAI from "openai";

try {
    const openai = new OpenAI(
        {
            // If the env var is unset, replace with: apiKey: "sk-xxx",
            apiKey: process.env.DASHSCOPE_API_KEY,
            // China (Beijing). Other regions differ. Replace {WorkspaceId}.
            baseURL: "https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/compatible-mode/v1"
        }
    );
    const completion = await openai.chat.completions.create({
        model: "qwen-plus",
        messages: [
            { role: "system", content: "You are a helpful assistant." },
            { role: "user", content: "Who are you?" }
        ],
    });
    console.log(completion.choices[0].message.content);
} catch (error) {
    console.log(`Error: ${error}`);
    console.log("See https://help.aliyun.com/model-studio/developer-reference/error-code");
}

Other OpenAI-compatible hosts: cheatsheet · Base URL and Models. Do not invent hostnames.

If you do not want to write code, the official pointer is Chatbox.

Step 4: Pick a tier, then a real model ID

The intro's three Qwen tiers (not the same thing as a model string):

TierOfficial lineFirst use
MaxStrongest; complex multi-step work. The intro names qwen3.8-maxHard tasks, tool use
PlusBalance of quality, speed, cost — recommended for most casesUse the sample's qwen-plus
FlashCheap and low-latencyHigh QPS, short answers

Source: intro.

Live IDs, regional availability, and the three protocol URLs live only on Models. This tutorial does not copy that table.

Plan catalogs are exact-string allowlists. Coding Plan forbids version-compatibility guesses. Coding Plan

Step 5: Stop surprise PAYG before you explore

Verified accounts flip to PAYG when the free quota ends. Turn on Free quota only. China-site: Beijing, and only while the quota is still valid. Free quota

To stop calls entirely: delete every key in that region. There is no "disable auto-billing" switch. Intro

Next: Cookbook.

Built for frontend engineers · Powered by VitePress