This document describes how to call the DeepSeek series model inference service from Kuaishou Wanqing on the Alibaba Cloud Model Studio platform.
Activate the service
- Go to the Model Studio console, search for vanchin/deepseek, find the DeepSeek model card, and click Activate Now.
- In the pop-up window, confirm the activation and authorization.
Getting started
Before you begin, obtain an API key and configure the API key as an environment variable. If you use the software development kit (SDK), you must install the SDK.
The following example uses vanchin/deepseek-v4-pro to demonstrate how to enable thinking mode for streaming output in an OpenAI-compatible way.
- Python
- Node.js
- HTTP
Sample code
Response
Reasoning effort (reasoning_effort)
deepseek-v4-pro has thinking mode enabled by default. You can use the reasoning_effort parameter to adjust inference intensity. Possible values are high and max, with the default being high.
vanchin/deepseek-v4.1-flash has thinking mode enabled by default. The reasoning_effort parameter can be set to low, high, or max, with the default being high.
low or medium, it is mapped to high. When set to xhigh, it is mapped to max.Text extraction
Sample code
This section describes how to extract text from an image URL by calling the vanchin/deepseek-ocr model in an OpenAI-compatible way.
- Python
- Node.js
- HTTP
Sample code
Response
File input methods
- Public URL: The URL of a publicly accessible image. The URL must use the HTTP or HTTPS protocol.
- Base64 encoding: The image file as a Base64-encoded string. For more information, see Upload using Base64 encoding.
Image limits
There are no hard limits on image size, resolution, format, or quantity. However, actual processing performance depends on engine resources. To ensure the best response speed, manage the data volume for each request.
Other features
Model | |||||||
|---|---|---|---|---|---|---|---|
vanchin/deepseek-v4.1-flash | Supported | Supported | Supported | Supported | Not supported | Not supported | Supported |
vanchin/deepseek-v4-pro-0813 | Supported | Supported | Supported | Supported | Not supported | Supported | Supported |
vanchin/deepseek-v4-pro | Supported | Supported | Supported | Supported | Not supported | Supported | Supported |
vanchin/deepseek-v3.2-think | Supported | Supported | Supported | Supported | Not supported | Supported | Supported |
vanchin/deepseek-v3.1-terminus | Supported | Supported | Supported | Not supported | Not supported | Not supported | Supported |
vanchin/deepseek-ocr | Not supported | Not supported | Not supported | Supported | Not supported | Not supported | Not supported |
repetition_penalty, preserve_thinking, thinking_budget, tool_stream, enable_code_interpreter, seed, logprobs, top_logprobs, enable_search, search_options, skill.
For supported parameters, some have different value ranges or behavior compared to Model Studio:
Parameter | Model Studio | DeepSeek-V4-Pro |
|---|---|---|
| Value range: 1-4 | Only supports value 1 in thinking mode |
-
Context cache is supported and enabled by default for all models except vanchin/deepseek-ocr. For a cache hit, the input is billed at the following discounted rates:
- vanchin/deepseek-v4.1-flash: Billed at 2% of the input price.
- vanchin/deepseek-v4-pro and vanchin/deepseek-v4-pro-0813: Billed at 8.33% of the input price.
- vanchin/deepseek-v3.2-think: Billed at 10% of the input price.
- vanchin/deepseek-v3.1-terminus: Billed at 40% of the input price.
Default parameter values
Model | temperature | top_p | enable_thinking | detail |
|---|---|---|---|---|
vanchin/deepseek-v4.1-flash | 0.6 | 0.95 | true | - |
vanchin/deepseek-v4-pro-0813 | 0.6 | 0.95 | true | - |
vanchin/deepseek-v4-pro | 0.6 | 0.95 | true | - |
vanchin/deepseek-v3.2-think | 0.6 | 0.95 | false | - |
vanchin/deepseek-v3.1-terminus | 0.7 | 0.95 | false | - |
vanchin/deepseek-ocr | 1.0 | 1.0 | - (Thinking mode not supported) | auto (Possible values: auto, high, low) |