Qwen
Qwen Responses
Call Qwen models via the Responses endpoint, with support for previous_response_id context continuation.
v1/responsesAuthorizations
Bearer sk-pat-YourAccessToken
The key value is your HAI Gateway Personal Access Token (starting with sk-pat-). No separate API key from Alibaba Cloud is required.
Base URL
Body Parameters
The request body format is compatible with the Alibaba Bailian OpenAI-compatible interface. For detailed parameter descriptions, refer to the Alibaba Cloud official documentation.
Responses Endpoint is Better Suited for Agent Scenarios
Supports previous_response_id for context continuation, and input accepts strings or multimodal segments directly. However, only certain Qwen models are supported (see the model matrix).
The developer role is not supported
The OpenAI-compatible endpoint only accepts system / user / assistant roles. The Anthropic channel follows the official user / assistant conversation structure, with system messages passed via the top-level system field.
curl https://api.hai.network/compatible-preview/openai/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-pat-YourAccessToken" \
-d '{
"model": "qwen3-max",
"input": "Describe Hangzhou in one sentence"
}'