{"slug": "stepfun-step-5-api-pricing-context-window-and-code", "title": "StepFun Step 5 API: pricing, context window and code", "summary": "StepFun's flagship agentic model Step 5 is available on Together AI's Serverless Inference under the model string `stepfun-ai/Step-5` with a 1M-token context window and text and image input, priced at $1.00 per 1M input tokens, $0.10 per 1M cached input tokens and $2.70 per 1M output tokens. Together AI measured that 52 of 60 follow-up requests read about 95% of their input tokens from cache, while all 45 requests from the third follow-up onward hit the cache, and a request with 10,000 input and 2,000 output tokens costs $0.0154. The guide also reports that a first read of a 200,000-token document costs $0.2054 and that a single request of 894,064 input tokens was run to test long-context behavior.", "body_md": "- **What Step 5 is:** Step 5 is StepFun's flagship model for agentic work, with a 1M-token context window and text and image input.\n- **Step 5 API pricing:** On Together AI, Step 5 costs \\$1.00 per 1M input tokens, \\$0.10 per 1M cached input tokens and \\$2.70 per 1M output tokens.\n- **How to call it:** Send the model string`stepfun-ai/Step-5` to the chat completions API on Together Serverless Inference with your API key.\n- **What a job costs:** A request with 10,000 input and 2,000 output tokens costs \\$0.0154, and a first read of a 200,000-token document costs \\$0.2054.\n\n[Step 5](https://www.together.ai/models/step-5) is a model from StepFun with a 1M-token context window, and you can call it on Together Serverless Inference with the model string `stepfun-ai/Step-5`. This guide covers what Step 5 is, what it costs per token and per job, how the results StepFun reports for it compare with Step 5 Preview, and three requests with code: a chat completion, a tool call and an image request. It also reports what we measured on the endpoint: how often follow-up requests read from cache, what one request of 894,064 input tokens cost, and how the tool-calling sample behaved across repeated runs.\n\n## What Step 5 is\n\nStepFun describes Step 5 as an upgraded version of its flagship model for agentic work, shaped by developer and user feedback on Step 5 Preview ([StepFun's announcement](https://www.stepfun.com/step-5)).\n\nWhen Step 5 reasons before it answers, the reply returns that reasoning in a `reasoning_content` field next to the answer, and the usage block of every reply reports the token counts for the request.\n\n## Step 5 API pricing\n\nThose token counts are what Step 5 is billed on, at three rates on serverless inference.\n\nThe cached rate comes from [prompt caching](https://docs.together.ai/docs/inference/chat/prompt-caching), which is automatic. When a request starts with the same tokens as an earlier request, the shared prefix is read from cache and billed at \\$0.10 per 1M tokens, so reference material belongs at the start of a prompt and the question at the end. We tested that shape in nine series of requests. Each series opened with a first request of about 39,000 tokens whose reference text was new to the endpoint, and every follow-up began with the same reference text and ended with a short question or the next turn of a conversation, sent 3 to 11 seconds after the request before it. The series ran from one follow-up to 20, for 60 follow-ups in all, and 52 of them read about 95% of their input tokens from cache. The eight that read 0 tokens from cache were each the first or second follow-up in their series. Seven of the 15 first and second follow-ups read from cache, and so did all 45 requests from the third follow-up on. The docs describe caching as best effort, with cache entries that typically last about an hour.\n\nThe usage block of each reply reports the split. This one is from a follow-up request that read from cache, with a prompt of 38,752 tokens in total, trimmed to its token counts:\n\nAt the three rates, that request cost \\$0.0059 for input and output together. Its output count includes the model's reasoning, which was 93 of the 123 tokens. The first request in the same series sent 38,757 input tokens with 0 cached, returned 62 output tokens and cost \\$0.0389.\n\n### What a Step 5 job costs\n\nA job's cost is its input tokens and its output tokens, reasoning included, each multiplied by its rate. The table works that out for five sizes of job.\n\nThe 2,000 output tokens in each row are an example size with reasoning included, so scale a row by the `completion_tokens` your own requests return. The cached row takes its share from our 38,752-token test, where the cache covered 36,864 tokens and the remaining 1,888, the question among them, were billed at the input rate. We also ran one request near the size of the last row: 894,064 input tokens of reference text, with one fact placed in the middle and a question about it at the end. Step 5 returned the fact in 48 output tokens, and the request cost \\$0.8942, of which \\$0.8941 was input.\n\n## Step 5 vs Step 5 Preview\n\nHow many output tokens a task takes is one of the measures in StepFun's announcement, which compares Step 5 with Step 5 Preview, the release it follows, on StepFun's own evaluations. With each score, the announcement gives the change in output tokens per task as a percentage, and the table lists three of those evaluations as StepFun reports them.\n\nThose per-task figures come from StepFun's evaluations. For a task of your own, the count is the sum of `completion_tokens` across the requests the task makes, and each request in the next section returns that field.\n\n## Call the Step 5 API\n\nWe ran each code sample in this section against `stepfun-ai/Step-5` on serverless inference as written. Each one reads a Together AI API key from the `TOGETHER_API_KEY` environment variable.\n\nA chat completion is one POST request:\n\nThe reply holds the answer in `choices[0].message.content` and the reasoning in `choices[0].message.reasoning_content`. For this prompt, the usage block reported 42 input tokens and 522 output tokens, 402 of them reasoning, which comes to about \\$0.0015.\n\nThe same request with the Together Python SDK, after `pip install together`. Our runs used `together` 3.6.0:\n\nClients built on the OpenAI SDK take the same request once the base URL is set to `https://api.together.ai/v1` and the API key is your Together AI key.\n\n### Tool calling with Step 5\n\nStep 5 supports function calling through the standard `tools` parameter. When a reply contains tool calls, append that reply to the message history as returned, add one tool message for each call, and call the model again until it answers in text. The sample runs that loop with a stand-in function for the database.\n\nWe ran this sample 20 times. In 19 runs the first reply called `run_sql` with a query that joins the two tables and totals each customer's orders, and the loop ended on the second call with an answer in text. In the other run Step 5 answered in text on the first call, and the loop printed that answer.\n\nAppending the reply as returned keeps its `reasoning_content` in the history, and the sample prints whether the field is present. It was present in 13 of the 19 tool-call replies, and in the other six the field was null. Reasoning that you send back in the history is billed as input on later calls.\n\n### Image input with Step 5\n\nStep 5 accepts an image as an `image_url` block in the message content, next to the text of the question:\n\nFor this screenshot of a project board, Step 5 returned the four column titles, `To Do, In Progress, Review, Done`.\n\n## Try Step 5 on Together AI\n\nTo try the model in the browser, open Step 5 [in the playground](https://api.together.ai/playground/stepfun-ai/Step-5). For production traffic, the [rate limits page](https://docs.together.ai/docs/serverless/rate-limits) in the docs covers how serverless inference responds under high demand and how to retry.\n\n## Where the numbers come from\n\nPrices are from the [Together AI pricing page](https://www.together.ai/pricing) and the [serverless models table](https://docs.together.ai/docs/serverless-models) in the docs, as of December 2026. Model facts are from the [Step 5 model page](https://www.together.ai/models/step-5) and the same docs table. The scores and token figures for Step 5 and Step 5 Preview are the ones StepFun reports in [its announcement](https://www.stepfun.com/step-5). Job costs are arithmetic at the listed rates, and the charges for the requests we ran are calculated from the token counts the API returned. Those requests ran on December 5, 2026.\n\n## Frequently asked questions\n\n### What is Step 5?\n\nStepFun describes Step 5 as an upgraded version of its flagship model for agentic work. On Together AI, Step 5 has a 1M-token context window, takes text and image input and returns text.\n\n### Is there a Step 5 API?\n\nYes. Step 5 runs on Together Serverless Inference through the chat completions API at `https://api.together.ai/v1/chat/completions`, with the model string `stepfun-ai/Step-5`.\n\n### How much does the Step 5 API cost?\n\nStep 5 on Together AI costs \\$1.00 per 1M input tokens, \\$0.10 per 1M cached input tokens and \\$2.70 per 1M output tokens. A request with 10,000 input tokens and 2,000 output tokens costs \\$0.0154.\n\n### What is the context window of Step 5?\n\nStep 5 has a 1M-token context window on Together AI, listed in the docs as 1,048,576 tokens. In one request of ours, with 894,064 input tokens, Step 5 returned a fact placed in the middle of the text, and the request cost \\$0.8942.\n\n### What is the Step 5 model string on Together AI?\n\nThe Step 5 model string on Together AI is `stepfun-ai/Step-5`. Pass it as the `model` field in a chat completions request or in the Together SDKs.\n\n### Does Step 5 support tool calling?\n\nYes. Step 5 supports function calling on Together AI through the standard `tools` parameter. In 19 of 20 runs of our sample, its first reply was a `run_sql` call with a complete query as its arguments.\n\n### Does Step 5 accept images?\n\nYes. Step 5 accepts text and image input on Together AI and returns text. Send the image as an `image_url` block in the message content.\n\n### Does prompt caching work with Step 5?\n\nYes. Prompt caching is automatic for Step 5 on Together AI, and cached input tokens cost \\$0.10 per 1M. In our tests, 52 of 60 follow-up requests that began with the same reference text as an earlier request read about 95% of their input tokens from cache. The eight that read 0 tokens from cache were first or second follow-ups, and all 45 requests from the third follow-up on read from cache.\n\n### Does Step 5 return its reasoning?\n\nYes. Step 5 on Together AI returns its reasoning in the `reasoning_content` field of a reply, and the usage block counts reasoning tokens inside the output token count. Some replies return the field as null, as six of 19 tool-call replies did in our runs.\n\n### Does Step 5 support streaming?\n\nYes. Pass `stream=True` in the Together Python SDK and iterate over the chunks. In our run, Step 5 on Together AI streamed `reasoning_content` deltas first and `content` deltas after them.\n\n### What is the difference between Step 5 and Step 5 Preview?\n\nStep 5 is the upgraded release that follows Step 5 Preview. StepFun reports that Step 5 scores 40 on the Artificial Analysis Intelligence Index, up from 29 for Step 5 Preview, and reports 53% fewer output tokens per task with that score. On Together AI, the serverless models table in the docs lists Step 5 under the model string `stepfun-ai/Step-5`.\n\n### Can I use Step 5 with the OpenAI SDK?\n\nYes. Set the OpenAI client's base URL to `https://api.together.ai/v1`, use your Together AI API key, and pass `stepfun-ai/Step-5` as the model.\n\n### How is Step 5 billed on Together AI?\n\nStep 5 on Together AI is billed per token on serverless inference, at \\$1.00 per 1M input tokens, \\$0.10 per 1M cached input tokens and \\$2.70 per 1M output tokens. The usage block of each reply reports the token counts, with reasoning tokens counted inside the output tokens.\n\n### Which version does `stepfun-ai/Step-5` serve?\n\nOn Together AI, the model string `stepfun-ai/Step-5` serves Step 5, the upgraded release that follows Step 5 Preview. The serverless models table in the docs lists it as StepFun Step 5.\n\n### Where can I try Step 5?\n\nYou can try Step 5 in the Together AI playground at `https://api.together.ai/playground/stepfun-ai/Step-5`, or call the model string `stepfun-ai/Step-5` with an API key.", "url": "https://wpnews.pro/news/stepfun-step-5-api-pricing-context-window-and-code", "canonical_source": "https://www.together.ai/blog/step-5-api", "published_at": "2026-12-05 00:00:00+00:00", "updated_at": "2026-12-05 20:43:44.648246+00:00", "lang": "en", "topics": ["large-language-models", "ai-products", "ai-tools", "ai-infrastructure", "ai-agents"], "entities": ["StepFun", "Step 5", "Step 5 Preview", "Together AI", "Together Serverless Inference"], "also_reported_by": [], "takeaway": "Place reference material at the start of a prompt and the question at the end: in Together AI's tests, all 45 follow-ups from the third onward read about 95% of input tokens from cache at $0.10 per 1M tokens versus $1.00 uncached.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/stepfun-step-5-api-pricing-context-window-and-code", "markdown": "https://wpnews.pro/news/stepfun-step-5-api-pricing-context-window-and-code.md", "text": "https://wpnews.pro/news/stepfun-step-5-api-pricing-context-window-and-code.txt", "jsonld": "https://wpnews.pro/news/stepfun-step-5-api-pricing-context-window-and-code.jsonld"}}