Step 5 API Tips: Reasoning Effort, Prompt Caching and Cost Control

Cover image for Step 5 API Tips: Reasoning Effort, Prompt Caching and Cost Control: StepFun Documentation (official image)

Key facts

Sources checked Dec 1, 2026

  • Step 5 (model ID step-5, released November 30, 2026) costs $1.00 per million input tokens, $0.10 for cached input and $2.70 for output, the same as Step 5 Preview. Output tokens include the model’s reasoning.
  • It has five reasoning effort levels: low, medium, high, xhigh, max. StepFun recommends medium as the default; max has the highest latency and token use.
  • Prompt caching is automatic for inputs over 256 tokens. Cached tokens cost 10% of the normal input rate, and usage.cached_tokens tells you whether you hit the cache.
  • The effort field has a different name on each API: reasoning_effort (Chat Completions), output_config.effort (Messages), reasoning.effort (Responses).
  • Limits: 1M-token context, 64K max output, up to 60 images per request, and one MP4 video URL under 128 MB.

StepFun’s Step 5 is a cheap reasoning model for agentic work, and StepFun’s whole pitch is that it does the job with fewer tokens. These tips cover the settings that decide what you actually pay and how well it performs. They’re for developers moving from Step 5 Preview or trying Step 5 for the first time. Everything here comes from StepFun’s documentation as of December 1, 2026; we haven’t run a paid benchmark of our own.

1. Start at medium, and earn your way to max

StepFun’s reasoning guide maps each effort level to a kind of task:

Effort StepFun’s suggested use
low Simple Q&A, summarization, rewriting, extraction
medium Default recommendation: general reasoning and multi-step tasks
high Complex reasoning, math, planning, code analysis
xhigh Harder reasoning, long-running agent tasks, large codebases
max The hardest problems; highest latency and token usage

Because you pay $2.70 per million output tokens including the thinking, effort is your biggest cost lever. Run your own test set at medium first, then raise effort only for the task types that fail. A common pattern is to route by task: low for classification and extraction steps inside an agent, high or xhigh for the planning step.

If you’re migrating: Step 5 Preview only accepts low, medium and high. StepFun’s Claude Code guide says the Preview maps xhigh and max down to high, so sending them to the old model won’t fail, it just won’t do anything extra.

Screenshot of platform.stepfun.ai: Reasoning model best practices - StepFun Documentation
Screenshot: platform.stepfun.ai: Reasoning model best practices – StepFun Documentation (official page, captured December 1, 2026).

2. Use the right field name for your API

Step 5 speaks three API dialects, and each one names the effort setting differently (Step 5 docs):

API Compatible with Effort field
Chat Completions OpenAI reasoning_effort
Messages Anthropic output_config.effort
Responses OpenAI Responses reasoning.effort

A minimal Chat Completions call with the OpenAI Python SDK, using StepFun’s base URL:

from openai import OpenAI

client = OpenAI(api_key="YOUR_STEP_API_KEY", base_url="https://api.stepfun.ai/v1")
resp = client.chat.completions.create(
    model="step-5",
    reasoning_effort="medium",
    max_tokens=8000,
    messages=[{"role": "user", "content": "Plan a database migration from MySQL 8 to Postgres 17."}],
)
print(resp.choices[0].message.content)
print(resp.usage)

If a setting seems to be ignored, check the field name first. Putting reasoning_effort in a Messages request is an easy mistake when you switch SDKs.

3. Design prompts for the cache

StepFun caches automatically; there’s nothing to turn on (prompt cache guide). The rules:

  • Caching starts when a request exceeds 256 tokens, and 256 tokens is the minimum cache unit.
  • It matches on the prefix of your prompt. Messages, images, video, and tool calls with their results can all be cached.
  • Cached input costs $0.10 per million tokens instead of $1.00. The first write is billed at the normal rate.
  • Unused entries are evicted (least recently used first), and more aggressively at peak times.

So put the static parts first (system prompt, tool definitions, reference documents, few-shot examples) and the changing parts last. Don’t put a timestamp or request ID at the top of your system prompt, because that changes the prefix on every call.

Here’s what that’s worth. A 50,000-token agent prompt with 40,000 cached tokens and 5,000 output tokens costs (10,000 × $1.00 + 40,000 × $0.10 + 5,000 × $2.70) / 1M = $0.0275. Without any cache hits it’s $0.0635, more than double.

Check that it’s working: a positive usage.cached_tokens in the response means a hit. Log the ratio of cached_tokens to prompt_tokens per route and alert when it drops.

4. Cap output, and read the reasoning separately

Step 5 can write up to 64K output tokens per response, and that budget includes its thinking. Set max_tokens per task type so a runaway reasoning chain can’t burn 64K tokens on a simple question. Artificial Analysis found Step 5 “somewhat verbose”: it generated 79.8M output tokens across the Intelligence Index, against a 65.8M median for its price class (Artificial Analysis).

The reasoning comes back in its own field, reasoning, next to content, both in streaming deltas and in non-streamed messages. Keep it out of what you show users, but log it while you’re tuning prompts: it’s the quickest way to see why the model took a wrong turn.

5. Get the most from image and video input

From StepFun’s Step 5 docs and video guide:

  • Images: URL or Base64, JPG, PNG, WebP or static GIF, up to 60 per request, with low or high detail. Use low when you only need the gist.
  • Video: one MP4 URL under 128 MB (StepFun recommends 5 minutes or shorter), or Base64, or a stepfile:// reference from the Files API. MP4, QuickTime and Matroska are supported.
  • Put the video before your instruction in the message. StepFun says this improves results.
  • Long videos: split them into sub-128 MB clips with ffmpeg and summarize each, as StepFun’s guide suggests:
ffmpeg -i sample.mp4 -acodec copy -f segment -segment_time 120 -vcodec copy -reset_timestamps 1 output_%d.mp4

Downloading and safety-checking a video takes time, so show progress in your UI.

6. Use it from OpenRouter, Vercel or Claude Code

  • OpenRouter: model stepfun/step-5, listed with a 1M context at the same $1.00 / $2.70 / $0.10 prices (OpenRouter). Handy if you already route between models (see our routing tips).
  • Vercel AI Gateway: also stepfun/step-5 (Vercel changelog).
  • Claude Code: StepFun’s integration guide points ANTHROPIC_BASE_URL at its Step Plan (subscription) endpoint, https://api.stepfun.ai/step_plan, with "model": "step-5". Two details people miss: set CLAUDE_CODE_MAX_CONTEXT_TOKENS to 1000000 (a plain number, not “1M”) or Claude Code will assume a 200K window, and choose effort with claude --model step-5 --effort medium.

7. Know your rate limits before you launch

Pay-as-you-go limits depend on how much you’ve topped up in cash (pricing and rate limits). A new individual account (tier V0, under $15) gets 5 concurrent requests, 100 RPM and 500,000 tokens per minute. V1 ($15–$69) jumps to 20 concurrent, 400 RPM and 2M TPM. With a 1M-token context, a single large request can eat most of a V0 minute’s budget, so test with realistic prompt sizes.

Bottom line

Step 5’s price is low, but it’s a reasoning model, so the bill depends on how much it thinks. Default to medium, cap max_tokens, keep your prompt prefix stable for the 90% cache discount, and only reach for xhigh or max where your own tests show they help. For general habits that cut API spend on any model, see our prompt caching explainer.

Sources: StepFun Step 5 docs, Reasoning model best practices, Prompt cache best practices, Pricing and rate limits, Video understanding, Claude Code integration, StepFun: Introducing Step 5, Artificial Analysis: Step 5, OpenRouter, Vercel. Facts checked December 1, 2026.

Cover image: StepFun Documentation (official image)