This topic describes how to call Unisound's U2 series models on Alibaba Cloud Model Studio.
Quick start
unisound/unisound-u2 is a reasoning model provided by Unisound. It runs in thinking mode by default. Use the thinking parameter to control thinking mode: pass {"type": "enabled"} to enable it or {"type": "disabled"} to disable it. Use reasoning_effort to control the thinking depth. The following example calls unisound/unisound-u2 in thinking mode with streaming enabled.
Before you begin, make sure you have obtained and configured an API key. If you are using an SDK, you also need to install the SDK.
thinking and reasoning_effort are not standard OpenAI parameters. In the OpenAI Python SDK, pass them via extra_body. In the Node.js SDK, pass them as top-level parameters.- Python
- Node.js
- HTTP
Sample code
Sample response
Other features
Feature | Supported | Notes |
|---|---|---|
Supported | — | |
Supported | The model cannot stream tool call arguments through | |
Supported |
| |
Not supported | — | |
Multimodal input | Not supported | Text input only |
n, stop, preserve_thinking, thinking_budget, tool_stream, enable_code_interpreter, enable_search, search_options, and skill. These parameters are ignored or return an error if passed.
For some supported parameters, the valid values or behavior differ from Model Studio:
Parameter | Model Studio | U2 |
|---|---|---|
| Valid values: [0, 2) | Valid values: [0, 2). Default value: 1.0 |
| An integer greater than or equal to 0. Setting it to null or greater than 100 disables the top_k strategy | Must be an integer greater than or equal to 1. Default value: 40 |
| Use | Thinking mode is enabled by default. Use |
Models and pricing
The U2 series models are reasoning models provided by Unisound. They run in thinking mode by default.
For context length and pricing details, see the Model Studio console.
You are charged based on the input and output tokens of the model.
In thinking mode, the chain-of-thought is billed as output tokens.