Qwen_3.8_flash
Model Overview
| item |
value |
| Model ID (model) |
qwen3.8-flash |
| context window |
1,000,000 tokens |
| Maximum Input |
991,808 (Thinking Mode: 983,616) |
| Maximum Output |
131,072 |
| Max Chain-of-Thought |
262,144 |
| Input Modality |
Image, Text, Video |
| output modality |
Text |
| Default Thinking Mode |
Enable |
| Prefix Continuation |
Support |
| Context Caching |
Supported (explicit cache_control) |
Request Protocol
https
| Parameter Name |
Type |
Required |
Description |
| Content-Type |
string |
Yes |
application/json |
| Authorization |
string |
Yes |
Bearer ${your_AK} |
OpenAI Chat Completions
Request URL
POST https://genaiapi.cloudsway.net/v1/ai/{endpointPath}/chat/completions
Request Body Parameters
| Parameter Name |
Secondary Parameters |
Three-level parameters |
Level 4 Parameters |
Type |
Required |
Description |
| model |
- |
- |
- |
string |
Yes |
Fixed as MaaS_Qwen_3.8_flash_20260826 (original model from the vendor: qwen3.8-flash) |
| messages |
- |
- |
- |
array[json] |
Yes |
Sequential chat messages |
|
role |
- |
- |
string |
Yes |
system / user / assistant / tool |
|
content |
- |
- |
string or array |
Yes |
Plain text is of type string; multimodal or explicitly cached content is of type array |
|
|
type |
- |
string |
Yes (when it is an array) |
text / image_url / video / video_url |
|
|
text |
- |
string |
Yes (type=text) |
Text content |
|
|
cache_control |
- |
object |
No |
Explicit cache breakpoint,{"type":"ephemeral"} |
|
|
image_url |
- |
object |
Yes (type=image_url) |
Image Information |
|
|
|
url |
string |
Yes |
Image URL or Base64 Data URL |
|
|
min_pixels |
- |
integer |
No |
Qwen3.8 Image Default/Minimum 65536 |
|
|
max_pixels |
- |
integer |
No |
Qwen3.8 image default 2621440, maximum 16777216 |
|
|
video |
- |
array |
Yes (type=video) |
A list of video frame URLs in the form of an image list |
|
|
min_pixels |
- |
integer |
No |
Qwen3.8 has a default video frame setting of 65536, with a minimum value of 4096 |
|
|
max_pixels |
- |
integer |
No |
For Qwen3.8, the default video frame size is 655360, and the maximum is 2048000 |
|
|
total_pixels |
- |
integer |
No |
Qwen3.8 Video Total Pixels Default/Maximum: 819200000 |
|
|
video_url |
- |
object |
Yes (type=video_url) |
Video File Information |
|
|
|
url |
string |
Yes |
Video URL or Base64 Data URL |
|
|
min_pixels |
- |
integer |
No |
Same as the video type |
|
|
max_pixels |
- |
integer |
No |
Same as the video type |
|
|
total_pixels |
- |
integer |
No |
Same as the video type |
|
partial |
- |
- |
boolean |
No |
Prefix continuation, default value is false; enabled for assistant messages |
|
tool_calls |
- |
- |
array |
No |
Tool calls in assistant messages (multi-round postback) |
|
|
id |
- |
string |
Yes |
Tool Response ID |
|
|
type |
- |
string |
Yes |
fixed function |
|
|
function |
- |
object |
Yes |
Tools and Parameters |
|
|
|
name |
string |
Yes |
Tool Name |
|
|
|
arguments |
string |
Yes |
JSON string input parameter |
|
tool_call_id |
- |
- |
string |
Yes (tool role) |
The ID of the corresponding tool_calls |
|
reasoning_content |
- |
- |
string |
No |
assistant historical thinking; when preserve_thinking is enabled, complete postback is required |
| stream |
- |
- |
- |
boolean |
No |
Whether to use streaming mode; defaults to false |
| stream_options |
- |
- |
- |
object |
No |
Streaming configuration, only takes effect when stream= true |
|
include_usage |
- |
- |
boolean |
No |
The last chunk returns usage, which defaults to false |
| max_completion_tokens |
- |
- |
- |
integer |
No |
Recommended; total length of chain-of-thought + final answer; default/maximum value is the model's maximum output token count of 131072 |
| max_tokens |
- |
- |
- |
integer |
No |
Deprecated soon; for new integrations, please use max_completion_tokens instead |
| temperature |
- |
- |
- |
float |
No |
Range [0,2); default thinking mode is 0.6, and it will be automatically adjusted to 0.6 if the value is lower than 0.6 |
| top_p |
- |
- |
- |
float |
No |
Nucleus sampling, default temperature: 0.95; range (0,1.0] |
| response_format |
- |
- |
- |
object |
No |
Output format, default{"type":"text"}; Qwen 3.8 supports strict json_object |
|
type |
- |
- |
string |
Yes |
text or json_object |
| tools |
- |
- |
- |
array |
No |
Function Calling Tool List |
|
type |
- |
- |
string |
Yes |
Fixed function |
|
function |
- |
- |
object |
Yes |
Tool Definition |
|
|
name |
- |
string |
Yes |
Tool name, maximum 64 tokens |
|
|
description |
- |
string |
Yes |
Tool Description |
|
|
parameters |
- |
object |
No |
JSON Schema Parameter Description |
| tool_choice |
- |
- |
- |
string/object |
No |
auto/ none/ specify function; mandatory specification is not supported in thinking mode |
| parallel_tool_calls |
- |
- |
- |
boolean |
No |
Parallel tool invocation, false by default |
| enable_thinking |
- |
- |
- |
boolean |
No |
Mixed reasoning switch; enabled by default for qwen3.8-flash; can be placed at the top level of the body for direct HTTP calls |
| reasoning_effort |
- |
- |
- |
string |
No |
qwen3.8 default: xhigh; valid options: xhigh/ medium/ low;max/ high→ xhigh, minimal→ low, none→ disable thinking; other values will trigger an error; cannot be set together with thinking_budget |
| thinking_budget |
- |
- |
- |
integer |
No |
Maximum tokens for chain-of-thought; cannot be set simultaneously with reasoning_effort; supports mutual conversion and mapping with reasoning_effort |
| preserve_thinking |
- |
- |
- |
boolean |
No |
qwen3.8-flash defaults to true; the reasoning_content must be fully posted back, and must not be spliced into content |
| top_k |
- |
- |
- |
integer |
No |
Number of sampling candidate tokens, default is 20; non-OpenAI standard, use extra_body in SDK |
| repetition_penalty |
- |
- |
- |
float |
No |
Repetition penalty, default value for Qwen3.8 is 1.0 |
| presence_penalty |
- |
- |
- |
float |
No |
Content repetition rate: default value in non-thinking mode is 1.5; valid range: [-2.0,2.0] |
| vl_high_resolution_images |
- |
- |
- |
boolean |
No |
High-resolution image, default false |
| tool_stream |
- |
- |
- |
boolean |
No |
Streaming output of complex tool parameters, only applicable when stream= true; qwen3.8-flash supports all modalities |
| enable_code_interpreter |
- |
- |
- |
boolean |
No |
The switch for the code interpreter on the Chat side, which defaults to false (different from the built-in code_interpreter tool in Responses) |
| stop |
- |
- |
- |
string/array |
No |
stop words |
| seed |
- |
- |
- |
integer |
No |
random seed, default 1234 |
Request Example
curl -X POST 'https://genaiapi.cloudsway.net/v1/ai/{endpointPath}/chat/completions' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ${your_AK}' \
-d '{
"model": "MaaS_Qwen_3.8_flash_20260826",
"messages": [{"role": "user", "content": "Hello"}],
"reasoning_effort": "none"
}'
Response Example
{
"id": "chatcmpl-xxx",
"object": "chat.completion",
"model": "MaaS_Qwen_3.8_flash_20260826",
"choices": [{
"index": 0,
"message": {
"role": "assistant",
"content": "你好!",
"reasoning_content": "..."
},
"finish_reason": "stop"
}],
"usage": {
"prompt_tokens": 10,
"completion_tokens": 20,
"total_tokens": 30,
"completion_tokens_details": {"reasoning_tokens": 5}
}
}
Example of streaming request
curl -X POST 'https://genaiapi.cloudsway.net/v1/ai/{endpointPath}/chat/completions' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ${your_AK}' \
-d '{
"model": "MaaS_Qwen_3.8_flash_20260826",
"messages": [{"role": "user", "content": "Hello"}],
"stream": true,
"stream_options": {"include_usage": true}
}'
SDK Invocation Method
from openai import OpenAI
client = OpenAI(
api_key="${your_AK}",
base_url="https://genaiapi.cloudsway.net/v1/ai/{endpointPath}"
)
completion = client.chat.completions.create(
model="MaaS_Qwen_3.8_flash_20260826",
messages=[{"role": "user", "content": "Hello"}],
extra_body={"reasoning_effort": "none"}
)
OpenAI Responses
Request URL
POST https://genaiapi.cloudsway.net/v1/ai/{endpointPath}/responses
Request Body Parameters
| Parameter Name |
Secondary Parameters |
Three-level parameters |
Type |
Required |
Description |
| model |
- |
- |
string |
Yes |
Fixed as MaaS_Qwen_3.8_flash_20260826 |
| input |
- |
- |
string or array |
Yes |
Plain text such as "Hello", or a message array |
|
role |
- |
string |
Yes (when it is an array) |
user / assistant / system / developer |
|
content |
- |
string or array |
Yes (when it is an array) |
Message content |
|
|
type |
string |
Yes (content is an array) |
input_text / input_image etc. |
|
|
text |
string |
Yes (input_text) |
Text content |
|
|
image_url |
string |
Yes (input_image) |
Image URL or Base64 Data URI |
| stream |
- |
- |
boolean |
No |
Whether to use streaming mode; defaults to false |
| max_output_tokens |
- |
- |
integer |
No |
Qwen3.8: Combined upper limit for response + chain-of-thought; minimum 16 |
| reasoning |
- |
- |
object |
No |
Thinking intensity; priority over enable_thinking |
|
effort |
- |
string |
No |
Default: xhigh; 7 levels are supported in total: none/minimal/low/medium/high/xhigh/max;nonedisables reasoning;xhigh/ maxis only available in North China 2 and Singapore regions |
| enable_thinking |
- |
- |
boolean |
No |
Deprecated; it is recommended to use reasoning. effort; enabled by default for qwen3.8-flash |
| tools |
- |
- |
array |
No |
Built-in tools or custom functions; to use the code_interpreter, reasoning must be enabled (i. e., reasoning. effort is not set to none, or the default reasoning configuration is applied) |
|
type |
- |
string |
Yes |
web_search / code_interpreter / function etc. |
|
name |
- |
string |
Yes (function) |
Custom Tool Name |
|
description |
- |
string |
Yes (function) |
Tool Description |
|
parameters |
- |
object |
No (function) |
JSON Schema |
| tool_choice |
- |
- |
string/object |
No |
auto / none / required / allowed_tools object |
| previous_response_id |
- |
- |
string |
No |
ID of the previous response, valid for 7 days |
| instructions |
- |
- |
string |
No |
System instruction, start of inserted context |
| temperature |
- |
- |
float |
No |
Sampling temperature, range [0,2) |
| top_p |
- |
- |
float |
No |
Kernel sampling, range (0,1.0] |
| store |
- |
- |
boolean |
No |
Whether to store the response for subsequent reference; defaults to true |
Request Example
curl -X POST 'https://genaiapi.cloudsway.net/v1/ai/{endpointPath}/responses' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ${your_AK}' \
-d '{
"model": "MaaS_Qwen_3.8_flash_20260826",
"input": "Introduce Qwen in one sentence",
"reasoning": {"effort": "none"}
}'
Response Example
{
"id": "resp_xxx",
"object": "response",
"model": "MaaS_Qwen_3.8_flash_20260826",
"status": "completed",
"output": [
{"type": "reasoning", "summary": [{"type": "summary_text", "text": "..."}]},
{"type": "message", "role": "assistant", "content": [{"type": "output_text", "text": "..."}]}
],
"usage": {
"input_tokens": 12,
"output_tokens": 48,
"total_tokens": 60
}
}
Streaming request example
curl -X POST 'https://genaiapi.cloudsway.net/v1/ai/{endpointPath}/responses' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ${your_AK}' \
-d '{
"model": "MaaS_Qwen_3.8_flash_20260826",
"input": "Hello",
"stream": true,
"reasoning": {"effort": "none"}
}'
SDK Calling Method
from openai import OpenAI
client = OpenAI(
api_key="${your_AK}",
base_url="https://genaiapi.cloudsway.net/v1/ai/{endpointPath}"
)
response = client.responses.create(
model="MaaS_Qwen_3.8_flash_20260826",
input="Hello",
reasoning={"effort": "none"}
)
Anthropic Messages
Request URL
POST https://genaiapi.cloudsway.net/{endpointPath}/v1/messages
| Parameter Name |
Type |
Required |
Description |
| anthropic-version |
string |
Yes |
e. g. 2023-06-01 |
Request Body Parameters
| Parameter Name |
Secondary Parameters |
Three-level parameters |
Type |
Required |
Description |
| model |
- |
- |
string |
Yes |
Fixed as MaaS_Qwen_3.8_flash_20260826 |
| max_tokens |
- |
- |
integer |
Yes |
qwen3.8-flash: Combined cap for response + chain of thought |
| messages |
- |
- |
array[json] |
Yes |
Dialogue Message |
|
role |
- |
string |
Yes |
user / assistant / system |
|
content |
- |
string or array |
Yes |
Array of text or content blocks |
|
|
type |
string |
Yes (array) |
text / image / video etc. |
|
|
text |
string |
Yes (type=text) |
Text content |
|
|
cache_control |
object |
No |
Explicit caching,{"type":"ephemeral"} |
|
|
source |
object |
Yes (image/video) |
URL or Base64 source |
| system |
- |
- |
string or array |
No |
System prompt; the array format may include cache_control |
|
type |
- |
string |
Yes (array) |
Fixed text |
|
text |
- |
string |
Yes (array) |
System Prompt |
|
cache_control |
- |
object |
No |
Explicit cache breakpoint |
| stream |
- |
- |
boolean |
No |
Streaming or not |
| thinking |
- |
- |
object |
No |
Deep thinking; enabled by default for qwen3.8-flash |
|
type |
- |
string |
Yes |
enabled or disabled |
|
budget_tokens |
- |
integer |
No |
Deprecated; use output_config. effort instead |
| output_config |
- |
- |
object |
No |
Vendor extension; SDK passthrough required |
|
effort |
- |
string |
No |
qwen3.8 defaults to xhigh; available options are xhigh/ medium/ low;max/ high→ xhigh |
|
format |
- |
object |
No |
Strictly structured output of json_schema |
|
|
type |
string |
Yes |
Fixed json_schema |
|
|
schema |
object |
Yes |
JSON Schema |
| tools |
- |
- |
array |
No |
Tool Definition |
|
name |
- |
string |
Yes |
Tool Name |
|
description |
- |
string |
No |
Tool Description |
|
input_schema |
- |
object |
Yes |
Input JSON Schema |
| tool_choice |
- |
- |
object |
No |
auto / any / none / specify tool |
| temperature |
- |
- |
float |
No |
Range [0,2); default value of thinking mode is 0.6 |
| top_p |
- |
- |
float |
No |
Nuclear Sampling |
| top_k |
- |
- |
integer |
No |
Size of Sampling Candidate Set |
| stop_sequences |
- |
- |
array |
No |
stop sequence |
Request Example
curl -X POST 'https://genaiapi.cloudsway.net/{endpointPath}/v1/messages' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ${your_AK}' \
-H 'anthropic-version: 2023-06-01' \
-d '{
"model": "MaaS_Qwen_3.8_flash_20260826",
"max_tokens": 4096,
"thinking": {"type": "disabled"},
"messages": [{"role": "user", "content": "Hello"}]
}'
Response Example
{
"id": "msg_xxx",
"type": "message",
"role": "assistant",
"model": "MaaS_Qwen_3.8_flash_20260826",
"content": [{"type": "text", "text": "Hello!"}],
"stop_reason": "end_turn",
"usage": {"input_tokens": 10, "output_tokens": 15}
}
Example of streaming request
curl -X POST 'https://genaiapi.cloudsway.net/{endpointPath}/v1/messages' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ${your_AK}' \
-H 'anthropic-version: 2023-06-01' \
-d '{
"model": "MaaS_Qwen_3.8_flash_20260826",
"max_tokens": 4096,
"stream": true,
"thinking": {"type": "disabled"},
"messages": [{"role": "user", "content": "Hello"}]
}'
SDK Invocation Method
import anthropic
client = anthropic.Anthropic(
api_key="${your_AK}",
base_url="https://genaiapi.cloudsway.net/{endpointPath}/v1"
)
message = client.messages.create(
model="MaaS_Qwen_3.8_flash_20260826",
max_tokens=4096,
thinking={"type": "disabled"},
messages=[{"role": "user", "content": "Hello"}]
)