Alibaba Cloud Model Studio (DashScope) serves the Qwen models with an OpenAI-compatible API. This example uses the international endpoint.
Create a key at Model Studio. Send it as Authorization: Bearer <key>. The key must come from the same region as the endpoint. In the examples it's written {{DASHSCOPE_API_KEY}}.
Full reference: https://www.alibabacloud.com/help/en/model-studio/compatibility-of-openai-with-dashscope
curl https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions \
-H "Authorization: Bearer {{DASHSCOPE_API_KEY}}" \
-H "Content-Type: application/json" \
-d '{"model": "qwen-plus", "messages": [{"role": "user", "content": "Explain what a webhook is in two sentences."}]}'