{
"id": "msg_xxxxxxxx",
"type": "message",
"role": "assistant",
"model": "qwen3.8-max",
"content": [
{
"type": "text",
"text": "Hello! I am Tongyi Qwen3.8-Max."
}
],
"stop_reason": "end_turn",
"usage": {
"input_tokens": 12,
"output_tokens": 104,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0
}
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "max_tokens is required"
}
}{
"type": "error",
"error": {
"type": "authentication_error",
"message": "Invalid or expired token"
}
}{
"type": "error",
"error": {
"type": "insufficient_quota",
"message": "Insufficient credits"
}
}{
"type": "error",
"error": {
"type": "<string>",
"message": "<string>"
}
}{
"type": "error",
"error": {
"type": "<string>",
"message": "<string>"
}
}Qwen3.8-Max - Anthropic-Compatible API
- Call Qwen3.8-Max using the Anthropic Messages protocol
- System prompt: set via the top-level
systemfield (not inside messages) - Multimodal input: pass a content block array in
content, supportingtext/image - Context caching: add
cache_controlon a content block to declare explicit caching; seeusage.cache_read_input_tokens/usage.cache_creation_input_tokensin the response for hit / creation - Thinking mode: enabled via
thinking, thinking is returned asthinkingcontent blocks in the stream - Streaming output: when
stream=true, returned as Anthropic SSE events (message_start/content_block_delta/message_delta, etc.)
{
"id": "msg_xxxxxxxx",
"type": "message",
"role": "assistant",
"model": "qwen3.8-max",
"content": [
{
"type": "text",
"text": "Hello! I am Tongyi Qwen3.8-Max."
}
],
"stop_reason": "end_turn",
"usage": {
"input_tokens": 12,
"output_tokens": 104,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0
}
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "max_tokens is required"
}
}{
"type": "error",
"error": {
"type": "authentication_error",
"message": "Invalid or expired token"
}
}{
"type": "error",
"error": {
"type": "insufficient_quota",
"message": "Insufficient credits"
}
}{
"type": "error",
"error": {
"type": "<string>",
"message": "<string>"
}
}{
"type": "error",
"error": {
"type": "<string>",
"message": "<string>"
}
}https://direct.evolink.ai, which offers better support for text models and long connections. https://api.evolink.ai is the primary multimodal endpoint; use it when your request includes image input.Authorizations
##All APIs require Bearer Token authentication##
Get API Key:
Visit API Key Management Page to get your API Key
Add to request header:
Authorization: Bearer YOUR_API_KEY
Body
Chat model name
qwen3.8-max "qwen3.8-max"
Maximum number of tokens to generate.
Required (per the Anthropic protocol). Generation will be truncated if the model exceeds this value.
1024
List of conversation messages (excluding system). Each message contains a role (user / assistant) and content (a string or content block array).
Show child attributes
Show child attributes
System prompt. Pass a string for plain text; pass a content block array (with cache_control on the block) when declaring explicit caching.
Sampling temperature, range [0, 2].
0 <= x <= 2Nucleus sampling parameter, range (0, 1].
0 <= x <= 1Sample from the K tokens with the highest probability.
Custom stop sequences; generation stops when one is matched.
Whether to return an Anthropic SSE event stream.
Deep thinking configuration. When enabled, the model returns its thinking process as thinking content blocks.
Show child attributes
Show child attributes
List of tool definitions (Anthropic tools format) for Function Calling.
Show child attributes
Show child attributes
Response
Generated successfully
"msg_xxxxxxxx"
"message"
"assistant"
"qwen3.8-max"
Array of reply content blocks
Show child attributes
Show child attributes
Stop reason: end_turn (normal completion), max_tokens (limit reached), stop_sequence (stop sequence matched), tool_use (a tool call is required)
"end_turn"
Token usage statistics (Anthropic semantics: input_tokens excludes cache and adds up mutually exclusively with the cache fields).
Show child attributes
Show child attributes