Text model · Alibaba Qwen
Qwen3.8 Omni Flash API
Qwen3.8 Omni Flash is Qwen's natively omni-modal model. Alibaba lists text, image, audio and video input and a 1M-token context window; image input was tested on TokenRa. It thinks by default, and enable_thinking: false turns that off.
- Model ID
qwen3.8-omni-flash- Context
- 1M tokens
- Input
- Text, image
- Output
- Text with reasoning
Capabilities
Capabilities & endpoints
Chat generation through three API formats. Each was called successfully on tokenra.io on 2026-10-23; pick one to switch the code examples.
POSThttps://tokenra.io/v1/chat/completionsTested
OpenAI SDK with
base_url="https://tokenra.io/v1". Auth: Authorization: Bearer. Recommended.POSThttps://tokenra.io/v1/responsesTested
OpenAI Responses API, same SDK and key. Text answer in
output_text.POSThttps://tokenra.io/v1/messagesTested
Anthropic SDK or Claude Code with base URL
https://tokenra.io. Auth: x-api-key (or Bearer) plus anthropic-version.Request
Request parameters
Fields for POST /v1/chat/completions. Everything listed was accepted by the model in testing.
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | The model ID to call, for example qwen3.8-omni-flash. |
messages | array | Yes | Conversation messages in order (system, user, assistant, tool). For multi-turn chat, send the earlier turns back in this array. content can be a string or an array of text and image_url parts. |
stream | boolean | No | Return the answer as server-sent events. Default false. |
stream_options | object | No | With {"include_usage": true}, the last chunk carries usage and an empty choices array. |
max_tokens | integer | No | Caps the answer text only. Reasoning is not limited by it: in testing max_tokens: 16 still produced about 2,000 reasoning tokens, which are billed as output. |
max_completion_tokens | integer | No | Behaves like max_tokens on this model: it caps the answer, not the reasoning. |
temperature | number | No | Sampling temperature. |
top_p | number | No | Nucleus sampling threshold. Usually tune either this or temperature. |
presence_penalty | number | No | Penalises tokens that already appeared, nudging the model toward new topics. |
frequency_penalty | number | No | Penalises frequent tokens to reduce repetition. |
response_format | object | No | {"type": "json_object"} asks for a JSON object. |
tools | array | No | Function tools the model may call (type: "function"). |
tool_choice | string / object | No | auto, none, required, or a specific function. |
parallel_tool_calls | boolean | No | Allow several tool calls in one response. |
reasoning_effort | string | No | Reasoning depth such as low, medium or high. The model accepted it in testing; how much it changes the reasoning varies by model. |
enable_thinking | boolean | No | Thinking is on by default. false skips it: in testing the answer then used 4 completion tokens instead of about 70. |
top_k | integer | No | Qwen sampling parameter: sample only from the k most likely tokens. |
user | string | No | Your own end-user identifier for auditing or abuse handling. It is not part of the conversation. |
Not supported by this model
response_formatwithjson_schemais not enforced: an array that contains the object came back instead of the object. Usejson_objectand describe the fields in the prompt.- Neither
max_tokensnormax_completion_tokenslimits the reasoning on this model. For short, cheap answers sendenable_thinking: false. thinking_budgetis accepted but did not limit the reasoning in testing: a budget of 64 still produced about 2,300 reasoning tokens. Useenable_thinking: falseormax_completion_tokensinstead.
Other formats
| Format | Required fields | Answer location |
|---|---|---|
| OpenAI Responses | model, input | output_text |
| Anthropic Messages | model, max_tokens, messages | content[] blocks of type text |
Response
Response format
{
"id": "chatcmpl-1792766122484",
"object": "chat.completion",
"created": 1792766122,
"model": "qwen3.8-omni-flash",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "An API gateway is the single entry point that receives client requests and routes them to the right backend service. It also handles shared concerns such as authentication, rate limiting and logging.",
"reasoning_content": "The user wants two sentences about API gateways..."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 26,
"completion_tokens": 58,
"total_tokens": 84,
"prompt_tokens_details": {
"cached_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 21
}
}
}| Field | Type | Description |
|---|---|---|
id | string | Completion ID. Include it when you contact support. |
object | string | chat.completion, or chat.completion.chunk when streaming. |
created | integer | Unix timestamp in seconds. |
model | string | The model that produced the answer. |
choices[].message.content | string | The answer text. |
choices[].message.reasoning_content | string | The model's reasoning, returned separately from the answer. |
choices[].message.tool_calls | array | Tool calls requested by the model, when tools were sent. |
choices[].finish_reason | string | stop, length or tool_calls. |
usage | object | prompt_tokens, completion_tokens, total_tokens, plus prompt_tokens_details.cached_tokens and completion_tokens_details.reasoning_tokens. |
With stream: true the answer arrives as data: lines of chat.completion.chunk objects and ends with data: [DONE].
Errors
Errors & limits
Common errors
| HTTP | error.code | Meaning | What to do |
|---|---|---|---|
401 | — | Missing, wrong or deleted API key. The message is Invalid token. | Check the Authorization: Bearer header and the key in the console. |
400 | — | The body is not valid JSON. | Fix the JSON and send Content-Type: application/json. |
500 | invalid_request | A required field is missing, for example messages. | Add the field named in the message. Retrying will not help. |
403 | insufficient_user_quota | Your balance or plan quota is used up. | Top up in the console, then retry. |
503 | model_not_found | Unknown model ID, or no channel serves it for your group. | Check the ID in the model list or with GET /v1/models. |
429 | — | Too many requests. | Back off exponentially and retry. |
5xx | — | The upstream provider failed or timed out. | Retry a few times; keep the request id if it persists. |
Limits and notes
- Image input was tested with an
image_urlpart that points to a public HTTPS image. - Reasoning is returned in
reasoning_content, separate from the answer incontent. Keep it out of what you show users unless you want to display it.