StepFun · Sep 11, 2026

StepFun API: Chinese AI Models for Coding

StepFun API for coding workloads: the Step 3.7 model ID, dated rates, OpenAI-compatible code, and rollout checks.

AIWave EngineeringDated 2026-09-11Technical guide
Abstract data-flow illustration for StepFun API: Chinese AI Models for Coding

If you are looking for “Step 3.7,” the API detail to keep is the suffix. The current public model is Step 3.7 Flash, and its exact model ID is step-3.7-flash. StepFun's official catalog does not list bare step-3.7 as a callable ID.

Step 3.7 Flash combines a 256K-token context window with tool use and native image and video understanding. StepFun describes it as a sparse mixture-of- experts model with 198B total parameters and 11B active parameters. Those architecture numbers are useful background; the contract your code depends on is the API ID, context limit, response behavior, and rate card.

Direct price and context

StepFun's public rate card was denominated in CNY when checked on September 11,

  1. Prices are per 1M tokens:
MeterDirect price
Cached input¥0.27
Uncached input¥1.35
Output¥8.10

The vendor does not publish a USD price on that page. Converting the CNY figure at today's exchange rate can help with an internal estimate, but it does not turn the result into an official USD quote.

The documented context window is 256K. The same specification page does not state a separate maximum output, so reserve output headroom and test the limit your coding agent actually needs.

Curl: a small route check

StepFun exposes an OpenAI-compatible Chat Completions endpoint:

bash
curl https://api.stepfun.com/v1/chat/completions \
  -H "Authorization: Bearer $STEPFUN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"step-3.7-flash","messages":[{"role":"user","content":"Find the race condition in this design."}]}'

Use a short first request. It proves authentication, model access, and response shape without spending time debugging a large repository payload.

Python with an OpenAI client

python
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["STEPFUN_API_KEY"],
    base_url="https://api.stepfun.com/v1",
)

response = client.chat.completions.create(
    model="step-3.7-flash",
    messages=[{"role": "user", "content": "Propose a bounded retry policy."}],
)
print(response.choices[0].message.content)

StepFun also documents an Anthropic-compatible Messages endpoint. Choose the protocol that matches your existing agent runtime, then verify tool calls and streaming with your own schemas.

AIWave's current public catalog includes step-3.7-flash. To run the same OpenAI-shaped request through AIWave, change the base URL to https://aiwave.live/v1 and use an AIWave key. Check AIWave's dated USD rate card rather than carrying over StepFun's direct CNY numbers. The benefit is one credential and one billing record across routes; the tradeoff is the gateway's markup and another dependency in the path.

### Multimodal input is a separate test path

Step 3.7 Flash can inspect images and video, which is useful when a coding task depends on a UI screenshot or recorded failure. Do not assume the text-only request above proves that path. Test accepted media formats, size limits, upload lifetime, and token accounting separately. Strip secrets and customer data from screenshots before sending them, and keep a text fallback for environments where media upload is unavailable.

A practical coding-agent setup

Do not send an entire repository because the window allows it. Start with a repository map, the interfaces touched by the task, the current diff, and the failing tests. Add files when the model identifies a concrete dependency.

Keep a stable system prompt and stable project summary at the front if you want cache hits. Put volatile material—timestamps, logs, and current tool output— later. Record whether input was actually billed as cached; an expected hit is not evidence of a hit.

For production, separate 401, balance, rate-limit, and upstream errors. Retry only operations that are safe to repeat, with a cap and jitter. Save the model ID, input/output tokens, latency, and charge beside the request ID. Those fields tell you whether a cheaper-looking route is actually cheaper for the workload.

Primary references

Test the route with your own workload

Use one key, choose an explicit model ID, and check every request against the ledger.

Run a first request