Skip to main content

Token Plan overview

Token Plan is an AI model subscription service from Alibaba Cloud Model Studio, billed in Credits, for interactive use in compatible AI tools.

Quick start

Select a plan and get an API Key, then copy the command for your tool to complete setup.

  • Claude Code
  • Codex
  • Qwen Code
  • OpenClaw
  • Hermes Agent
# Install Alibaba Cloud Model Studio CLI and configure the selected Agent; replace sk-sp-xxxx with your Token Plan API Key
curl -fsSL https://bailian.aliyun.com/cli/install.sh | bash
export TOKEN_PLAN_API_KEY="sk-sp-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
bl config agent --agent claude-code --region cn-beijing --api-key $TOKEN_PLAN_API_KEY --model auto

Connect your tools

Choose your tool and follow its Token Plan Personal Edition or Team Edition configuration guide.

Connect other models

AI tools natively handle text only; use extensions to connect image, video, speech, and other capabilities—see the integration overview.

Connect Harness

Personal Edition Standard and Pro plans include Harness benefits for AgentStudio tools at no Credits cost. Copy the prompt below and send it to your local AI tool to configure the services.
Local Harness setup guide
## Local Harness service configuration guide

Follow these steps to configure Harness services for the local AI tool.

### Install and check prerequisites
1. Check whether the Model Studio CLI is installed. If not, install it using https://bailian.aliyun.com/cli/install.md
2. Log in with the Model Studio CLI: bl auth login --console
3. Run bl config show to get the config_file path, then read api_key from that file.

### Services to configure — Built-in tools
Write the following MCP server settings to the local global configuration. Identify the correct directory for the current AI tool. Call these services directly over MCP, without routing through bailian-cli. All services use:
- Type: HTTP Streamable
- Header: Authorization: Bearer ${DASHSCOPE_API_KEY}

Configure the following services:

| Service | URL |
|---|---|
| Image generation MCP | `https://dashscope.aliyuncs.com/api/v1/mcps/TextGenerateImage/mcp` |
| Video generation MCP | `https://dashscope.aliyuncs.com/api/v1/mcps/VideoGenerate/mcp` |
| Code interpreter MCP | `https://dashscope.aliyuncs.com/api/v1/mcps/CodeInterpreter/mcp` |
| Enhanced web search MCP | `https://dashscope.aliyuncs.com/api/v1/mcps/EnhancedSearch/mcp` |
| Web page parsing MCP | `https://dashscope.aliyuncs.com/api/v1/mcps/WebFetch/mcp` |
| Vertical search MCP | `https://dashscope.aliyuncs.com/api/v1/mcps/VerticalSearch/mcp` |
| Speech synthesis MCP | `https://dashscope.aliyuncs.com/api/v1/mcps/TextGenerateSpeech/mcp` |
| Speech recognition MCP | `https://dashscope.aliyuncs.com/api/v1/mcps/SpeechGenerateText/mcp` |

### Services to configure — Infrastructure
After login, ask the user what they need and choose the corresponding path:

- **Try the service**: Use the corresponding bailian-cli commands for the requested scenario.
- **Integrate in code**: Use the api_key obtained in the prerequisite steps to write code that calls the relevant APIs.

Services:

| Service | CLI commands | API documentation |
|---|---|---|
| RAG — Knowledge base | bl knowledge commands | https://docs.agent.bailian.aliyun.com/zh/api/rag/overview |
| Memory — Memory store | bl memory commands | https://docs.agent.bailian.aliyun.com/zh/api/memory/overview |
| Managed Agent — Hosted agents | bl managed-agent commands | https://docs.agent.bailian.aliyun.com/zh/api/managed-agents/introduction |
View setup guide
## Local Harness service configuration guide Follow these steps to configure Harness services for the local AI tool. ### Install and check prerequisites 1. Check whether the Model Studio CLI is installed. If not, install it using https://bailian.aliyun.com/cli/install.md 2. Log in with the Model Studio CLI: bl auth login --console 3. Run bl config show to get the config_file path, then read api_key from that file. ### Services to configure — Built-in tools Write the following MCP server settings to the local global configuration. Identify the correct directory for the current AI tool. Call these services directly over MCP, without routing through bailian-cli. All services use: - Type: HTTP Streamable - Header: Authorization: Bearer ${DASHSCOPE_API_KEY} Configure the following services: | Service | URL | |---|---| | Image generation MCP | `https://dashscope.aliyuncs.com/api/v1/mcps/TextGenerateImage/mcp` | | Video generation MCP | `https://dashscope.aliyuncs.com/api/v1/mcps/VideoGenerate/mcp` | | Code interpreter MCP | `https://dashscope.aliyuncs.com/api/v1/mcps/CodeInterpreter/mcp` | | Enhanced web search MCP | `https://dashscope.aliyuncs.com/api/v1/mcps/EnhancedSearch/mcp` | | Web page parsing MCP | `https://dashscope.aliyuncs.com/api/v1/mcps/WebFetch/mcp` | | Vertical search MCP | `https://dashscope.aliyuncs.com/api/v1/mcps/VerticalSearch/mcp` | | Speech synthesis MCP | `https://dashscope.aliyuncs.com/api/v1/mcps/TextGenerateSpeech/mcp` | | Speech recognition MCP | `https://dashscope.aliyuncs.com/api/v1/mcps/SpeechGenerateText/mcp` | ### Services to configure — Infrastructure After login, ask the user what they need and choose the corresponding path: - **Try the service**: Use the corresponding bailian-cli commands for the requested scenario. - **Integrate in code**: Use the api_key obtained in the prerequisite steps to write code that calls the relevant APIs. Services: | Service | CLI commands | API documentation | |---|---|---| | RAG — Knowledge base | bl knowledge commands | https://docs.agent.bailian.aliyun.com/zh/api/rag/overview | | Memory — Memory store | bl memory commands | https://docs.agent.bailian.aliyun.com/zh/api/memory/overview | | Managed Agent — Hosted agents | bl managed-agent commands | https://docs.agent.bailian.aliyun.com/zh/api/managed-agents/introduction |

Scenario playbooks