Qwen (Alibaba Model Studio) Commands & Prompt Reference
29 commands & parameters · 2 categories · Source: Alibaba Cloud Model Studio - OpenAI compatible Chat
Alibaba Cloud Model Studio exposes Qwen through an OpenAI-compatible chat completions endpoint, so the familiar sampling fields all work - but the interesting parameters are the ones that are not standard. enable_thinking and thinking_budget control the reasoning phase on mixed-thinking models, enable_search turns on web search, and search_options carries the search strategy (via the Python SDK it goes inside extra_body rather than at the top level).
The endpoint is also a gateway rather than a single-vendor API: the model field accepts DeepSeek, Kimi, GLM, and MiniMax model names alongside the Qwen families (LLM, VL, Coder, Omni, Math). Several parameters are family-gated as a result - modalities and audio apply only to Qwen-Omni, vl_high_resolution_images only to vision models, and n only to Qwen3 in non-thinking mode.
All Commands
Chat API Parameters (16)
| Command / Syntax | What it does | Notes |
|---|---|---|
| model | Model to call | Supported families: Qwen LLM (commercial and open source), Qwen-VL, Qwen-Coder, Qwen-Omni, Qwen-Math, plus DeepSeek, Kimi, GLM and MiniMax. Required. |
| messages | Conversation context passed to the model, in conversational order | Required. System message, if present, must come first. |
| temperature | Sampling temperature controlling output diversity | Value range [0, 2). Set either temperature or top_p, not both. |
| top_p | Nucleus sampling probability threshold | Value range (0, 1.0]. Set either temperature or top_p, not both. |
| top_k | Number of candidate tokens sampled during generation | Larger is more random. null or a value above 100 disables the top_k strategy. |
| repetition_penalty | Penalty for consecutive repeated sequences | 1.0 means no penalty; raise it to reduce repetition. No strict upper bound. |
| presence_penalty | Controls content repetition across the generated text | Value range [-2.0, 2.0]. Positive reduces repetition, negative increases it. |
| max_completion_tokens | Maximum output length, including chain-of-thought and answer | Generation stops early with finish_reason length if exceeded. |
| enable_thinking | Switch thinking mode on for mixed-thinking models | Applies to Qwen3 family, Qwen3-Omni-Flash and Qwen3-VL models. |
| thinking_budget | Maximum tokens allowed for the thinking process | Applies to Qwen3 family, GLM and Kimi models; kimi-k3 does not support it. |
| reasoning_effort | Inference intensity level | Valid values vary by model; DeepSeek-V4 and GLM default to high, with max available. |
| seed | Random seed for reproducible results | Same seed and unchanged parameters return the same result as far as possible. |
| tools | Array of tool objects the model may call in function calling | If set and the model decides to call a tool, tool info is returned in the response. |
| stream_options | Configuration for streaming output | Takes effect only when stream is true; include_usage adds token usage to the last chunk. |
| audio | Voice and format of the output audio | Qwen-Omni models only, and requires modalities set to ["text","audio"]. |
| search_options | Web search strategy | Not a standard OpenAI parameter; via the Python SDK place it in extra_body. |
Output, Tool & Feature Parameters (13)
| Command / Syntax | What it does | Notes |
|---|---|---|
| stream | Reply in streaming output mode | Default false. When true the model outputs content as it is generated, in data chunks. |
| stop | Stop words or token IDs that halt generation immediately | A string or array; you cannot mix strings and token IDs in one array. |
| n | Number of responses to generate | Default 1, range 1-4. Only supported by Qwen3 models in non-thinking mode. |
| max_tokens | Maximum output tokens (to be deprecated) | Use max_completion_tokens for new integrations; the meaning varies by model. |
| response_format | Format of the response | Default {"type": "text"}. Use {"type": "json_object"} for structured JSON output. |
| tool_choice | Tool selection strategy | Default auto. Set it to force a specific tool or to disable all tools. |
| parallel_tool_calls | Enable parallel tool calling | Default false. |
| modalities | Modality of the output data | Default ["text"]. Qwen-Omni models only; ["text","audio"] adds audio output. |
| enable_search | Enable web search | Default false. If search does not trigger, set forced_search inside search_options. |
| logprobs | Return log probabilities of the output tokens | Default false. |
| top_logprobs | Number of most likely candidate tokens returned per step | Range [0, 5]. Takes effect only when logprobs is true. |
| vl_high_resolution_images | Raise the input image pixel limit to the 16384-token equivalent | Default false. Qwen-VL high-resolution image processing. |
| enable_code_interpreter | Enable the code interpreter feature | Default false. |
Frequently Asked Questions
Can I call non-Qwen models through this endpoint?
Yes. The model field accepts DeepSeek, Kimi, GLM, and MiniMax model names as well as the Qwen families. Billing and available parameters vary by model.
How do I control the thinking phase?
enable_thinking switches thinking mode on for mixed-thinking models, and thinking_budget caps the tokens spent on it. reasoning_effort sets intensity where the model supports it.
Why is search_options rejected at the top level in Python?
It is not a standard OpenAI parameter. With the Python SDK, place it inside extra_body: extra_body={"search_options": ...}.
Every entry on this page is a literal, typeable token taken from the official documentation linked above. Command sets in AI tools change quickly - the in-product command menu is always authoritative for your installed version.