Client Tools
IDE integrations, chat clients, and SDKs that work with QwenAPI's OpenAI-compatible API.
Client Tools
QwenAPI is fully compatible with the OpenAI API. Any tool that lets you configure a custom base URL and API key will work out of the box.
Generic configuration
Use these values in any tool that supports a custom OpenAI-compatible endpoint:
``json
{
"api_key": "your-qwenapi-key",
"base_url": "https://dashscope-intl.aliyuncs.com/compatible-mode/v1",
"model": "qwen3-max"
}
`
For Global (US/EU), use https://dashscope-intl.aliyuncs.com/compatible-mode/v1 — the same base URL routes to the nearest region based on your account settings.
IDE integrations
Chat clients
Testing
cURL
`bash
curl https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions \
-H "Authorization: Bearer your-qwenapi-key" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3-max",
"messages": [{"role": "user", "content": "Hello"}]
}'
`
Postman — Import the OpenAI collection, then update the base URL variable to https://dashscope-intl.aliyuncs.com/compatible-mode/v1 and set your API key.
SDKs
All standard OpenAI SDKs work with QwenAPI by pointing them at the custom base URL.
Python
`python
from openai import OpenAI
client = OpenAI(
api_key="your-qwenapi-key",
base_url="https://dashscope-intl.aliyuncs.com/compatible-mode/v1",
)
response = client.chat.completions.create(
model="qwen3-max",
messages=[{"role": "user", "content": "Hello"}],
)
`
Node.js
`javascript
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "your-qwenapi-key",
baseURL: "https://dashscope-intl.aliyuncs.com/compatible-mode/v1",
});
`
Go — Use go-openai:
`go
config := openai.DefaultConfig("your-qwenapi-key")
config.BaseURL = "https://dashscope-intl.aliyuncs.com/compatible-mode/v1"
client := openai.NewClientWithConfig(config)
`
Rust — Use async-openai:
`rust
let config = OpenAIConfig::new()
.with_api_key("your-qwenapi-key")
.with_api_base("https://dashscope-intl.aliyuncs.com/compatible-mode/v1");
let client = Client::with_config(config);
`
Java — Use any OpenAI-compatible Java client and set the base URL to https://dashscope-intl.aliyuncs.com/compatible-mode/v1`.