curl --request POST \
--url https://api.powertokens.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "qwen3.6-plus",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello, please introduce yourself."
}
],
"temperature": 0.7,
"max_tokens": 2000
}
'{
"id": "<string>",
"object": "chat.completion",
"created": 123,
"model": "<string>",
"choices": [
{
"index": 123,
"message": {
"role": "system",
"content": "<string>",
"tool_calls": [
{}
]
},
"finish_reason": "<string>"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
}
}For the public chat models in the final Ali whitelist only: qwen3-max, qwen3.6-plus, qwen3.5-flash, qwen3-coder-plus, and deepseek-v3.2.
Public fields: model, messages, stream, temperature, top_p, max_tokens, stop, seed, tools, tool_choice, enable_search, and response_format.
curl --request POST \
--url https://api.powertokens.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "qwen3.6-plus",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello, please introduce yourself."
}
],
"temperature": 0.7,
"max_tokens": 2000
}
'{
"id": "<string>",
"object": "chat.completion",
"created": 123,
"model": "<string>",
"choices": [
{
"index": 123,
"message": {
"role": "system",
"content": "<string>",
"tool_calls": [
{}
]
},
"finish_reason": "<string>"
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Model name. Only the public chat models in the final Ali whitelist are supported.
qwen3-max, qwen3.6-plus, qwen3.5-flash, qwen3-coder-plus, deepseek-v3.2 "qwen3.6-plus"
List of conversation messages. Supports text content and multimodal content (image+text).
Show child attributes
Whether to use streaming output. Default is false.
Sampling temperature, controls output randomness. Range [0, 2].
0 <= x <= 2Nucleus sampling probability threshold.
0 <= x <= 1Maximum number of tokens to generate.
x >= 1List of stop sequences.
Random seed for reproducible generation.
List of tools for Function Calling.
Show child attributes
Tool selection strategy. Options: auto, none, required.
Whether to enable search enhancement. Only some models support this.
Response format for forcing JSON output.
Show child attributes
Success, returns chat completion result. Streaming mode returns SSE stream.