Skip to main content

Alibaba (Qwen)

[official website]

Qwen models can be added to Tresor via API key authentication through Alibaba Cloud Model Studio. Pay-as-you-go access supports OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages. The example below uses Singapore's shared endpoint.

Web UI is more intuitive, but requires more manual operations.

In the "Downstreams" tab:

  • Click + Add Provider if Alibaba is not already listed.
  • Enter Alibaba Qwen or any name you like.
  • Under "API Formats", select OpenAI, OpenAI Responses, and Anthropic.
  • Under "Authentication", select API key and enter a Singapore-region key obtained using Alibaba's API key guide.
  • Under "API Host", enter https://dashscope-intl.aliyuncs.com.
  • Click Advanced and set the per-format request paths listed below.
  • Under "Models", click Fetch Models. If discovery is unavailable, add exact Qwen model IDs from your region's Model Studio console manually.
FormatPer-format request path
OpenAI/compatible-mode/v1/chat/completions
OpenAI Responses/compatible-mode/v1/responses
Anthropic/apps/anthropic/v1/messages

Regions and plans​

Keys, endpoints, and model availability are region-specific. For another region, change the API host or base_url and use a key issued in that region:

RegionAPI host
China, Beijinghttps://dashscope.aliyuncs.com
Singaporehttps://dashscope-intl.aliyuncs.com
US, Virginiahttps://dashscope-us.aliyuncs.com
China, Hong Konghttps://cn-hongkong.dashscope.aliyuncs.com

The request paths above remain the same for these shared hosts. Alibaba also publishes workspace-specific hosts, such as https://YOUR-WORKSPACE-ID.ap-southeast-1.maas.aliyuncs.com for Singapore; copy the host from your workspace's invocation instructions when required.

Alibaba Coding Plan does not support Responses. For that plan, select only OpenAI and Anthropic and use its own documented endpoints and credentials instead of assuming the pay-as-you-go configuration applies.

Done! Clients accessing Tresor can now use your configured Qwen models.

Next step​