Alibaba Cloud Model Studio (Bailian) API - OpenAI Compatible
Alibaba Cloud Model Studio (Bailian) exposes Qwen-family models via OpenAI-compatible interfaces (/v1). Core endpoints include Chat Completions (/v1/chat/completions) and Embeddings (/v1/embeddings), supporting streaming, tool calls, system prompts, and multi-message context. Configure region-specific BASE_URL: Beijing (https://dashscope.aliyuncs.com/compatible-mode/v1) and Singapore (https://dashscope-intl.aliyuncs.com/compatible-mode/v1).
支持模型
API 接口列表
Chat completions (OpenAI-compatible). Supports non-streaming and streaming output, tool calls, system prompts, and conversational context. Use region-specific BASE_URL (Beijing or Singapore) with the matching regional API key.
{
"model": "qwen-plus",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "请用中文自我介绍。"
}
],
"stream": true,
"temperature": 0.7
}Text embeddings (OpenAI-compatible). Supports multilingual embeddings and dimension options (e.g., text-embedding-v4 supports 2048/1536/1024/768/512/256/128/64).
{
"model": "text-embedding-v4",
"input": "衣服的质量杠杠的,很漂亮,不枉我等了这么久啊,喜欢,以后还来这里买",
"encoding_format": "float",
"dimensions": 1024
}