Skip to content

MaaS_Stepfun

MaaS_Stepfun_step_5_preview_20260920

Model Overview

Item value
Model ID (model) step-5-preview
context window 1M tokens
Maximum Input 1M tokens
Maximum Output 64k tokens
input modality text, images and videos
output modality Text
Image URL or Base64. Supported formats: JPG/JPEG, PNG, WebP, static GIF. Up to 60 images per upload. Detail level: low, high
video stepfile:// from URL, Base64 or Files API. Supported formats: MP4, QuickTime, Matroska. For URL-sourced MP4 videos, the individual file size shall be less than 128MB, and the recommended duration is less than 5 minutes
Inference Intensity low, medium, high. The Chat Completions API uses the reasoning_effort parameter; the Responses API uses the reasoning.effort parameter; the Messages API uses the output_config.effort parameter. The source document does not specify a default level.
Prompt Cache Supported. The source document does not provide separate request parameters. The usage.prompt_tokens_details.cached_tokensof Chat and usage.input_tokens_details.cached_tokensof Responses return the tokens that hit the cache.
competence Streaming output, function tool calling, JSON Mode, JSON Schema. Search and code execution are provided by the caller via tools, and the model does not directly access external services

Request Protocol

https

Parameter Name Type Required Description
Content-Type string Yes application/json
Authorization string Yes Bearer ${your_AK}

OpenAI Chat Completions

Request URL

POST https://genaiapi.cloudsway.net/v1/ai/{endpointPath}/chat/completions

Request Body Parameters

Parameter Name Secondary Parameters Three-level parameters Level 4 Parameters Type Required Description
model - - - string Yes Fixed as MaaS_Stepfun_step_5_preview_20260920 (Vendor's original model: step-5-preview)
messages - - - array[json] Yes User input or model-generated messages to date
role - - string Yes system, user, tool, assistant
content - - string, array, or null Yes systemis text. useris text or a mixed list of images, text and videos. toolis the text result of function execution. assistantis text and can be null
type - string No Multipart elements of user. text, image_url, video_url
text - string No type= texttext at this point
image_url url string No http/https image address, or data: image/jpeg;base64,${base64_string}. Supported formats: JPG/JPEG, PNG, WebP, static GIF. Maximum 60 images per request
image_url detail string No low, high. highis interpreted based on the original image resolution, and tokens vary with the image size;lowis scaled to a fixed size, which saves more tokens
video_url url string No The dedicated model chapter supports URL, Base64, or stepfile://. Supported formats include MP4, QuickTime, and Matroska. For URL-based videos, a single MP4 file should be smaller than 128MB, and the recommended duration is less than 5 minutes.
tool_call_id - - string Conditions role= toolis required. The function execution ID returned by the assistant in the previous round
tools - - - array[json] No List of function tools. Only documented types are function
type - - string Yes Always be function
function name - string Yes Only English letters, numbers and _-are allowed, and the recommended length is no more than 64 characters
function description - string No Function function description for model selection
function parameters type string No Generally it is object
function parameters properties object No key refers to the parameter name. Each parameter includes type (string, number, integer, object, array, boolean) and description
max_tokens - - - integer No Maximum tokens to generate. Defaults to INF (no restriction, determined by the model). The maximum output for model-specific chapters is 64k tokens. The total number of input and generated tokens is subject to the 1M context window limit.
temperature - - - float No Sampling temperature, ranging from 0.0 to 2.0. The default value is 0.5
top_p - - - float No Nucleus sampling. Default value: 0.9
n - - - integer No The number of responses generated for each input. The default value is 1, there is no upper limit, and it is recommended not to exceed 5.
stream - - - boolean No Whether to enable SSE streaming response. The default value is false.
stop - - - string or array No Stop immediately upon hitting any of the stop strings. Empty by default
frequency_penalty - - - float No Sort in descending order of occurrence frequency in the generated text. The default value is 0, with a range from -2.0 to 2.0
response_format - - - object No Output format. Default value:{"type":"text"}
type - - string Yes text, json_object, json_schema. json_object enables JSON Mode; json_schema constrains the structure according to the schema
json_schema name - string Conditions type= json_schemais required. Schema name
json_schema strict - boolean No Whether to strictly follow the schema. The default value is false
json_schema schema - object Conditions Required when type=json_schema. JSON Schema
reasoning_format
- - - string
No
Format of the reasoning field. By default, generalis used and returned via reasoning. When set to deepseek-style, reasoning_contentis also available, and the contents of the two fields are identical. Optional values include generaland deepseek-style
reasoning_effort - - - string No Inference intensity of this model: low, medium, high. A higher value indicates deeper reasoning, which may take more time. The source document does not specify the default value.

Request Example

curl -X POST 'https://genaiapi.cloudsway.net/v1/ai/{endpointPath}/chat/completions' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer ${your_AK}' \
  -d '{
    "model": "MaaS_Stepfun_step_5_preview_20260920",
    "messages": [
      {"role": "user", "content": "Please introduce yourself in one sentence."}
    ],
    "reasoning_effort": "medium",
    "max_tokens": 1024
  }'

Response Example

{
  "id": "b7b56af0-52a6-483f-a589-948182676a1b",
  "object": "chat.completion",
  "created": 1709893411,
  "model": "MaaS_Stepfun_step_5_preview_20260920",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "I am an assistant focused on programming and professional knowledge work.",
        "reasoning": "The user asked for a one-sentence introduction.",
        "reasoning_content": "The user asked for a one-sentence introduction."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 20,
    "completion_tokens": 30,
    "total_tokens": 50,
    "prompt_tokens_details": {"cached_tokens": 0},
    "completion_tokens_details": {"reasoning_tokens": 8}
  }
}

Example of streaming request

curl -X POST 'https://genaiapi.cloudsway.net/v1/ai/{endpointPath}/chat/completions' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer ${your_AK}' \
  -d '{
    "model": "MaaS_Stepfun_step_5_preview_20260920",
    "messages": [
      {"role": "user", "content": "Please introduce yourself in one sentence."}
    ],
    "reasoning_effort": "medium",
    "max_tokens": 1024,
    "stream": true
  }'

SDK Calling Method

from openai import OpenAI

client = OpenAI(
    api_key="${your_AK}",
    base_url="https://genaiapi.cloudsway.net/v1/ai/{endpointPath}",
)

completion = client.chat.completions.create(
    model="MaaS_Stepfun_step_5_preview_20260920",
    messages=[{"role": "user", "content": "Please introduce yourself in one sentence."}],
    max_tokens=1024,
    extra_body={"reasoning_effort": "medium"},
)
print(completion.choices[0].message.content)

reasoning_effortis a vendor extension field, which is transmitted transparently via the extra_bodyparameter in the OpenAI SDK.

OpenAI Responses

Request URL

POST https://genaiapi.cloudsway.net/v1/ai/{endpoint}/responses

Request Body Parameters

Parameter Name Secondary Parameters Three-level parameter Type Required Description
model - - string Yes Fixed as MaaS_Stepfun_step_5_preview_20260920 (vendor's original model: step-5-preview). The Responses parameter page currently lists support for step-5-preview
input - - string or array Yes Plain text is equivalent to a role= usermessage; or a time-ordered array of messages and events
role - string Conditions Text message roles: user, assistant, system
content - string or array Conditions Plain text, or an array of content blocks
type string No Content blocks: input_text, input_image, input_video. Postback items: function_call, function_call_output
text string No type= input_texttext at the time
image_url string or object No Image address string, or {"url": "...", "detail": "high"}. Recommended base64 data URL. detailis lowor highby model chapter. URL must be accessible by server level public network
video_url string or object No A video address string, or{"url":". ..", "detail":"low"}. The dedicated model chapter additionally supports Base64 and stepfile://; supported formats include MP4, QuickTime, and Matroska; the MP4 accessed via URL must be smaller than 128MB, and the recommended duration is less than 5 minutes. The source document does not list all possible values for the video detailseparately
id - string Conditions type= function_callis a unique ID generated by the server, which must be postedback as-is in multi-turn conversations
call_id - string Conditions function_calland function_call_outputpairing ID
name - string Conditions type= function_callthe tool name
arguments - string Conditions type= function_callJSON string parameters
output - string Conditions type= function_call_outputis the tool execution result, which is recommended to be a JSON string
instructions - - string No Top-level system instructions
stream - - boolean No Whether to enable SSE streaming output. The default value is false.
temperature - - float No Sampling temperature, ranging from 0.0 to 2.0. No default value is provided in the source document.
top_p - - float No Kernel sampling. The source document does not provide the default value and value range
max_output_tokens - - integer No This is the maximum output tokens for this response, which restricts both the inference process and the final output. When the budget is insufficient, statuscan be incomplete, and outputmay only contain reasoningwithout the final message. The maximum output for the model's dedicated chapter is 64k tokens
reasoning - - object No Inference Configuration
effort - string No This model supports low, medium, and high. The source document does not specify a default value.
tools - - array[json] No Currently only function is supported
type - string Yes Always be function
name - string Yes It is recommended to use only English letters, numerals and _-
description - string No function function description
parameters - object No JSON Schema for function parameters
strict - boolean No When enabled, the model output parameters strictly match parameters
tool_choice - - string or object No Currently only the string "auto" is supported.
text - - object No Text output format
format type string No text, json_object, json_schema
format name string Conditions type= json_schemais required
format strict boolean No type= json_schemais available. When enabled, the output strictly matches the schema
format schema object Conditions type= json_schemais required

Request Example

curl -X POST 'https://genaiapi.cloudsway.net/v1/ai/{endpoint}/responses' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer ${your_AK}' \
  -d '{
    "model": "MaaS_Stepfun_step_5_preview_20260920",
    "input": "Please introduce yourself in one sentence.",
    "reasoning": {"effort": "medium"},
    "max_output_tokens": 1024
  }'

Response Example

{
  "id": "resp_xxxxxxxxxxxxxxxx",
  "object": "response",
  "created_at": 1772624997,
  "completed_at": 1772624998,
  "model": "MaaS_Stepfun_step_5_preview_20260920",
  "status": "completed",
  "error": null,
  "incomplete_details": null,
  "output": [
    {
      "type": "reasoning",
      "id": "rs_xxxxxxxxxxxxxxxx",
      "summary": [],
      "content": null,
      "encrypted_content": null,
      "status": null
    },
    {
      "type": "message",
      "id": "msg_xxxxxxxxxxxxxxxx",
      "status": "completed",
      "role": "assistant",
      "content": [
        {
          "type": "output_text",
          "text": "I am an assistant focused on programming and professional knowledge work.",
          "annotations": []
        }
      ]
    }
  ],
  "usage": {
    "input_tokens": 14,
    "input_tokens_details": {"cached_tokens": 0},
    "output_tokens": 52,
    "output_tokens_details": {"reasoning_tokens": 0, "tool_output_tokens": 0},
    "total_tokens": 66
  }
}

Streaming Request Example

curl -X POST 'https://genaiapi.cloudsway.net/v1/ai/{endpoint}/responses' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer ${your_AK}' \
  -d '{
    "model": "MaaS_Stepfun_step_5_preview_20260920",
    "input": "Please introduce yourself in one sentence.",
    "reasoning": {"effort": "medium"},
    "max_output_tokens": 1024,
    "stream": true
  }'

SDK Calling Method

from openai import OpenAI

client = OpenAI(
    api_key="${your_AK}",
    base_url="https://genaiapi.cloudsway.net/v1/ai/{endpoint}",
)

response = client.responses.create(
    model="MaaS_Stepfun_step_5_preview_20260920",
    input="Please introduce yourself in one sentence.",
    max_output_tokens=1024,
    reasoning={"effort": "medium"},
)
print(response.output_text)

Anthropic Messages

Request URL

POST https://genaiapi.cloudsway.net/{endpoint}/v1/messages

Request Body Parameters

Parameter Name Secondary Parameters Three-level parameter Level 4 Parameters Type Required Description
model - - - string Yes Fixed as MaaS_Stepfun_step_5_preview_20260920 (vendor's original model: step-5-preview). The Messages parameter page lists it as a verified example
max_tokens - - - integer Yes Maximum tokens to generate, must be greater than 0. The maximum output for the model-specific chapter is 64k tokens. The source document does not separately specify the upper limit for this parameter.
messages - - - array[json] Yes At least one chat message
role - - string Yes Commonly used: user, assistant
content - - string or array Yes Plain text, or an array of Content Blocks
type - string No text, image, tool_use, tool_result
text - string No type= texttext at this point
source type string No Image source. urlor base64
source url string Conditions source. type= urlthe image address when
source media_type string Conditions source. type= base64specifies the media type, for example image/png
source data string Conditions source. type= base64image data
id - string Conditions type= tool_usethe tool call ID at this point
name - string Conditions type= tool_usetool name at the time
input - object Conditions type= tool_useParameters passed to the tool
tool_use_id - string Conditions type= tool_resultthe corresponding tool call ID
content - string or array Conditions type= tool_resultexecution result
is_error - boolean No type= tool_resultwhether an error occurred during execution
system - - - string or array No System prompt. A string, or an array consisting of text blocks
tools - - - array[json] No Tool Definition
name - - string Yes Tool Name
description - - string No Tool Description
input_schema - - object No JSON Schema for tool input parameters
output_config - - - object No Output configuration. The Anthropic SDK passes through via extra_body
effort - - string No Thinking depth of this model: low, medium, high. The source document does not specify the default value.
stream - - - boolean No Whether to return results in streaming mode; non-streaming by default
temperature - - - float No Sampling temperature, ranging from 0 to 2. No default value is provided in the source document
top_p - - - float No Core sampling: greater than 0 and less than or equal to 1. No default value is provided in the source document.
top_k - - - integer No Range: 0 to 500. No default value is specified in the source document.
stop_sequences - - - array[string] No Stop generation when any stop sequence is encountered

Request Example

curl -X POST 'https://genaiapi.cloudsway.net/{endpoint}/v1/messages' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer ${your_AK}' \
  -d '{
    "model": "MaaS_Stepfun_step_5_preview_20260920",
    "max_tokens": 1024,
    "messages": [
      {"role": "user", "content": "Please introduce yourself in one sentence."}
    ],
    "output_config": {"effort": "medium"}
  }'

Response Example

{
  "id": "msg_xxx",
  "type": "message",
  "role": "assistant",
  "model": "MaaS_Stepfun_step_5_preview_20260920",
  "stop_reason": "end_turn",
  "usage": {
    "input_tokens": 20,
    "output_tokens": 12
  },
  "content": [
    {
      "type": "text",
      "text": "I am an assistant focused on programming and professional knowledge work."
    }
  ]
}

Streaming Request Example

curl -X POST 'https://genaiapi.cloudsway.net/{endpoint}/v1/messages' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer ${your_AK}' \
  -d '{
    "model": "MaaS_Stepfun_step_5_preview_20260920",
    "max_tokens": 1024,
    "stream": true,
    "messages": [
      {"role": "user", "content": "Please introduce yourself in one sentence."}
    ],
    "output_config": {"effort": "medium"}
  }'

SDK Calling Method

from anthropic import Anthropic

client = Anthropic(
    api_key="${your_AK}",
    base_url="https://genaiapi.cloudsway.net/{endpoint}/v1",
)

message = client.messages.create(
    model="MaaS_Stepfun_step_5_preview_20260920",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Please introduce yourself in one sentence."}],
    extra_body={"output_config": {"effort": "medium"}},
)
print(message.content)