Alibaba Cloud Bailian API: Free Access to Qwen, DeepSeek and More

Quick answer: Pair Alibaba Cloud Bailian's free API (Qwen models, 1 million free tokens per model, valid 90 days, no credit card) with OpenClaw, a free open-source local agent, and you get a fully capable AI assistant — browser automation, file access, shell, scheduling, and chat apps — for $0. Both speak the OpenAI-compatible API, so wiring them together takes minutes.

OpenClaw gives an LLM hands and feet (your browser, files, terminal, and chat apps); Bailian gives it a free brain. Below: get the key, install OpenClaw, connect the two, and start issuing commands from WhatsApp or Telegram.

Part 1: Get Your Free Bailian API Key

Alibaba Cloud Bailian (Model Studio) gives free API access to Qwen models. Each model has its own independent 1 million token quota, so using several models multiplies your free budget.

Free models

ModelHighlightsBest For
Qwen3.6-Plus1M context, strong codingComplex tasks, coding
Qwen3.5-OmniAudio, video, textMultimodal tasks
Qwen-PlusBalanced performanceGeneral use (recommended for OpenClaw)
Qwen-TurboFastest, lowest costQuick responses, high volume
GLM-5Strong reasoningLogic-heavy tasks

Sign up (4 steps)

  1. Register at aliyun.com.
  2. Open the Bailian Console and accept the service agreement.
  3. Go to the API Key page (top-right) → Create API Key.
  4. Save the key — it starts with sk- and works across all models.

Free tier: 1M tokens per model (independent quotas), valid 90 days from activation, no credit card. Enable "stop when quota exhausted" to avoid accidental charges.

Part 2: Install OpenClaw

OpenClaw is a free, open-source AI agent that runs locally and connects any LLM to real software: browser (Chrome control + screenshots), file system, shell, scheduled tasks/webhooks, macOS/iOS voice wake-word, and chat apps (WhatsApp, Telegram, Discord, Slack, Teams, Signal, Feishu, LINE).

Prerequisites: Node.js 24 (or 22.16+). Windows needs WSL2.

npm install -g openclaw@latest
openclaw onboard --install-daemon

Part 3: Connect Bailian to OpenClaw

OpenClaw uses the OpenAI-compatible format, so it works directly with Bailian's DashScope endpoint.

Step 1: Set the key

# Linux/Mac
export DASHSCOPE_API_KEY="your-api-key-here"

# Windows (PowerShell)
$env:DASHSCOPE_API_KEY="your-api-key-here"

Step 2: Configure

Edit ~/.openclaw/openclaw.json:

{
  "models": {
    "mode": "merge",
    "providers": {
      "bailian": {
        "baseUrl": "https://dashscope.aliyuncs.com/compatible-mode/v1",
        "apiKey": "DASHSCOPE_API_KEY",
        "api": "openai-completions",
        "models": [
          {
            "id": "qwen3.5-plus",
            "name": "Qwen 3.5 Plus",
            "reasoning": false,
            "input": ["text", "image"],
            "contextWindow": 1000000,
            "maxTokens": 65536
          },
          {
            "id": "qwen-turbo",
            "name": "Qwen Turbo",
            "reasoning": false,
            "input": ["text"],
            "contextWindow": 131072,
            "maxTokens": 8192
          }
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "bailian/qwen3.5-plus"
      },
      "models": {
        "bailian/qwen3.5-plus": {},
        "bailian/qwen-turbo": {}
      }
    }
  }
}

Step 3: Verify

openclaw models list --provider bailian
openclaw models status --probe

Gotchas: set reasoning to false for all DashScope models (otherwise responses may be empty); model IDs must match exactly (qwen3.5-plus, not qwen-3.5-plus); on HTTP 400, add role mapping to convert developersystem.

Regional endpoints

RegionBase URL
China (Beijing)https://dashscope.aliyuncs.com/compatible-mode/v1
Singaporehttps://dashscope-intl.aliyuncs.com/compatible-mode/v1
US (Virginia)https://dashscope-us.aliyuncs.com/compatible-mode/v1
Hong Konghttps://cn-hongkong.dashscope.aliyuncs.com/compatible-mode/v1

Part 4: Use It

Once connected, talk to the agent from any linked chat app. Examples:

  • "Summarize the PDF on my desktop" — reads local files.
  • "Search Google for the latest AI news and summarize" — browses the web.
  • "Create a Python script that converts CSV to JSON" — writes and saves code.
  • "Every morning at 9am, send me the top 5 Hacker News stories" — scheduled tasks.
  • "Open my GitHub repo and create an issue about the login bug" — browser automation.

Bonus: Call the API Directly (Python)

pip install -U openai
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.getenv("DASHSCOPE_API_KEY"),
    base_url="https://dashscope.aliyuncs.com/compatible-mode/v1",
)

response = client.chat.completions.create(
    model="qwen-plus",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Explain quantum computing in simple terms."}
    ]
)

print(response.choices[0].message.content)

Cost Comparison

SetupCostFree TokensAgent Features
Bailian + OpenClaw$01M per model (90 days)Full (browser, files, chat, scheduling)
OpenAI + ChatGPT$20/monthLimited free tierLimited to ChatGPT interface
Claude Pro$20/monthLimited free tierWeb search, file upload
Self-hosted Ollama + OpenClaw$0 (need GPU)UnlimitedFull

Frequently Asked Questions

How many free tokens do I actually get?

1 million tokens per model, on independent quotas, valid 90 days from activation. Using several Qwen models effectively multiplies that into millions of total free tokens.

Do I need a credit card?

No. The Bailian free tier requires no card. Enable "stop when quota exhausted" so you can never be charged by accident.

Why are my responses coming back empty?

Set reasoning to false for every DashScope model in your config. If you hit HTTP 400 instead, add role mapping to convert the developer role to system.

Do Bailian and OpenClaw work together out of the box?

Yes — both use the OpenAI-compatible API standard, so OpenClaw talks to Bailian's DashScope endpoint with just a base URL, key, and matching model IDs.

Get Started