When you want to integrate Stepfun's multimodal reasoning capabilities into your application, directly connecting to the third-party model API requires additional authentication and adaptation work. Through Model Studio's OpenAI-compatible API, you can call Stepfun models seamlessly using your existing OpenAI SDK with minimal code changes.
When to use Stepfun
The Stepfun Step series is a multimodal reasoning model that combines advanced reasoning capabilities with support for text, image, and video input. With thinking mode enabled, it is particularly effective for complex reasoning scenarios that require step-by-step analysis, such as mathematical problem solving, logical reasoning, and detailed content analysis.
Compared to other third-party models available on Model Studio, Stepfun models excel in:
- Complex reasoning tasks — With thinking mode enabled, the model works through problems systematically before providing an answer.
- Multimodal understanding — Support for both image and video input in a single model call.
- Seamless SDK integration — Full OpenAI API compatibility means you can use existing code with minimal changes.
Prerequisites
Before you begin, make sure that you have:
- Obtained a Model Studio API key. For instructions, see the Model Studio documentation.
- Exported the API key as the
DASHSCOPE_API_KEYenvironment variable. - (If using an SDK) Installed the OpenAI SDK for your programming language.
Considerations
Before you call Stepfun models through Model Studio, consider the following:
- Supported region — Only the China (Beijing) region supports Stepfun models. You must use an API key from the China (Beijing) region.
- Thinking mode — The
stepfun/step-3.7-flashandstepfun/step-5-previewmodels have thinking mode disabled by default. You can enable it by settingenable_thinkingtotrue. - Reasoning content — When thinking mode is enabled, the reasoning process is returned in the
reasoning_contentfield. - Reasoning depth — You can control reasoning depth through the
reasoning_effortparameter. Valid values:low,medium,high. This parameter takes effect only when thinking mode is enabled. - Billing — In thinking mode, the chain of thought is billed as output tokens.
Call a text model
The stepfun/step-3.7-flash and stepfun/step-5-preview models are multimodal reasoning models with thinking mode disabled by default. You can enable thinking mode by setting enable_thinking to true. When enabled, the reasoning process is returned in the reasoning_content field, and you can control reasoning depth through the reasoning_effort parameter (valid values: low, medium, high). The following examples demonstrate how to call the model with thinking mode enabled and streaming responses to display the reasoning process and the final answer separately.
- Python
- Node.js
- HTTP
Sample code
Call multimodal models
Both stepfun/step-3.7-flash and stepfun/step-5-preview support image and video input in addition to text. You can provide media through a public URL or Base64 encoding.
Image understanding
The model can recognize and analyze image content. For image file limitations, see File limitations.
- Python
- Node.js
- HTTP
Video understanding
The model can analyze video content. For video file limitations, see File limitations.
- Python
- Node.js
- HTTP
File limitations
Image files
The following constraints apply to image input for the stepfun/step-3.7-flash model:
- Supported image formats — JPG/JPEG, PNG, WEBP, and static GIF.
- Image size — Each image must not exceed 10 MB.
- Multi-image input — A single request supports up to 50 images. The combined size of all images must not exceed 20 MB.
- Image resolution — The recommended maximum width or height is 4096 pixels. Higher resolutions increase inference costs (network transfer time, time to first token, and charges).
- Image transmission — Supports HTTP or HTTPS public URLs and Base64 encoding.
Video files
The following constraints apply to video input for the stepfun/step-3.7-flash model:
- Video size — Maximum 128 MB.
- Video duration — No hard time limit. The recommended maximum is 5 minutes.
- Audio understanding — The model does not support audio understanding for video files.
Feature support
The following table lists the features supported by the stepfun/step-3.7-flash model through Model Studio:
Feature | Support | Notes |
|---|---|---|
Multi-turn conversation | Supported | In thinking mode, the |
Function calling | Supported | Does not support the |
Context cache | Supported | Implicit cache (cache token). Automatically enabled. |
Structured output | Supported | The |
Streaming | Not supported | — |
Batch | Not supported | — |
Multimodal input | Supported | Supports image (URL or Base64) and video (URL) input. |
Unsupported parameters
The stepfun/step-3.7-flash model does not support the following parameters:
tool_choice, thinking_budget, top_k, modalities, repetition_penalty, vl_high_resolution_images, preserve_thinking, enable_search, search_options, seed, logprobs, top_logprobs, n
Parameter differences
Some parameters that are supported have different value ranges or behavior compared to standard Model Studio:
Parameter | Model Studio | Step |
|---|---|---|
| Range: [0, 2) | Range: [0, 2). Default value: 1.0. |
| Range: (0, 1.0] | Range: (0, 1.0]. Default value: 0.95. |
| Does not limit chain-of-thought length. Limits only the output length. | Limits the combined length of the thinking process and final output. |
| Controls reasoning depth for DeepSeek-V4 series models. Valid values: | Valid values: |
| The | The |
| Not supported. | Valid values: |
| Not supported. | Range: 0.0 to 1.0. Default value: 0. |
Models and billing
The Step series models are multimodal reasoning models provided by Stepfun. They support text, image, and video input, and support enabling thinking mode through enable_thinking.
Billing is based on input and output tokens. In thinking mode, the chain of thought is billed as output tokens.
For model context length and pricing information, see the Model Studio console.
Error codes
Stepfun models are provided directly by Stepfun. Their error codes differ from the standard Model Studio error codes. Refer to the following table when calling Stepfun models:
Error code | Cause | Solution |
|---|---|---|
400 — Format error | The request parameter format is incorrect. This may include: the image cannot be downloaded, the image count exceeds the limit, the input type is not supported by the model, or the parameter value is invalid. | Check the request body, model capabilities, and parameter ranges. |
401 — Authentication failed | The API key is missing or invalid. | Verify the API key and request header format. |
402 — Insufficient balance | The account balance is insufficient. | Check your account balance and top up in time. |
429 — Rate limit exceeded | Requests are too frequent and exceed the rate limit. | Implement exponential backoff and retry logic, or reduce the request frequency. |
451 — Content blocked | The request or response content failed the content review. | Modify the request content to avoid unsafe or sensitive input. |
500 — Server error | An internal server error occurred. | Retry later. If the issue persists, contact support. |
503 — Service unavailable | The server is overloaded. | Retry later. |