AIFeed

StepFun Step 5 API: pricing, context window and code

Summary

StepFun Step 5 API on Together AI: $1.00 per 1M input tokens, $2.70 per 1M output and a 1M-token context window. Model string, job costs and tested code.

Original text(via Together AI)

The short answer

  • 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.
  • 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.
  • 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.
  • 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.

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.

What Step 5 is

StepFun 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).

Step 5 on Together AI
Model stringstepfun-ai/Step-5
Context window1M tokens (1,048,576)
InputText, image
OutputText
Function callingSupported
Runs onTogether Serverless Inference

When 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.

Step 5 API pricing

Those token counts are what Step 5 is billed on, at three rates on serverless inference.

Token typePrice per 1M tokens
Input\$1.00
Cached input\$0.10
Output\$2.70

The cached rate comes from 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.

The 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:


        {
  "prompt_tokens": 38752,
  "completion_tokens": 123,
  "prompt_tokens_details": {"cached_tokens": 36864},
  "completion_tokens_details": {"reasoning_tokens": 93}
}
      

At 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.

What a Step 5 job costs

A 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.

JobInput tokensOutput tokensCost
One request10,0002,000\$0.0154
1,000 requests of that size10,000,0002,000,000\$15.40
A 200,000-token document, first read200,0002,000\$0.2054
The same document with a new question, assuming the same 95% cached share as our 38,752-token test200,000, of which 190,000 cached2,000\$0.0344
A 1M-token prompt1,000,0002,000\$1.0054

The 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.

Step 5 vs Step 5 Preview

How 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.

Evaluation and scoreStep 5 PreviewStep 5Output tokens per task for Step 5, as StepFun reports the change
Artificial Analysis Intelligence Index (index score)294053% fewer
Terminal-Bench 4.1 (task success rate)33.8%44.4%63% fewer
DeepSWE (score, with both models evaluated using the mini-swe-agent harness under the official DeepSWE settings)62.0%74.8%45% fewer

Those 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.

Call the Step 5 API

We 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.

A chat completion is one POST request:


        curl -X POST "https://api.together.ai/v1/chat/completions" \
  -H "Authorization: Bearer $TOGETHER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "stepfun-ai/Step-5",
    "messages": [
      {
        "role": "user",
        "content": "Write a SQL query that returns the five customers with the highest total order value from tables customers(id, name) and orders(id, customer_id, total)."
      }
    ]
  }'
      

The 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.

The same request with the Together Python SDK, after pip install together. Our runs used together 3.6.0:


        from together import Together

client = Together()

response = client.chat.completions.create(
    model="stepfun-ai/Step-5",
    messages=[
        {
            "role": "user",
            "content": "Write a SQL query that returns the five customers with the highest total order value from tables customers(id, name) and orders(id, customer_id, total).",
        }
    ],
)

print(response.choices[0].message.content)
print(response.usage)
      

Clients 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.

Tool calling with Step 5

Step 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.


        import json
from together import Together

client = Together()
MODEL = "stepfun-ai/Step-5"

tools = [{
    "type": "function",
    "function": {
        "name": "run_sql",
        "description": "Run a read-only SQL query against the orders database and return the rows as JSON.",
        "parameters": {
            "type": "object",
            "properties": {"query": {"type": "string", "description": "A single SELECT statement."}},
            "required": ["query"],
        },
    },
}]
messages = [{
    "role": "user",
    "content": "Which five customers have the highest total order value? Tables: customers(id, name), orders(id, customer_id, total).",
}]


def run_sql(query):
    # Stand-in for your database: run the query and return the rows.
    return [
        {"name": "Acme Corp", "total_order_value": 48210.50},
        {"name": "Globex", "total_order_value": 39875.00},
        {"name": "Initech", "total_order_value": 31440.25},
        {"name": "Umbrella", "total_order_value": 27120.00},
        {"name": "Hooli", "total_order_value": 19980.75},
    ]


for _ in range(5):  # upper bound on model calls
    response = client.chat.completions.create(model=MODEL, messages=messages, tools=tools)
    reply = response.choices[0].message
    if not reply.tool_calls:
        print(reply.content)
        break

    # Append the assistant turn as returned, then one tool message per call.
    turn = reply.model_dump(exclude_none=True)
    print("reasoning_content in appended turn:", "reasoning_content" in turn)
    messages.append(turn)
    for call in reply.tool_calls:
        args = json.loads(call.function.arguments)
        print(call.function.name, args["query"])
        rows = run_sql(args["query"])
        messages.append({"role": "tool", "tool_call_id": call.id, "content": json.dumps(rows)})
else:
    print("Stopped after five model calls with tool calls still pending.")
      

We 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.

Appending 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.

Image input with Step 5

Step 5 accepts an image as an image_url block in the message content, next to the text of the question:


        curl -X POST "https://api.together.ai/v1/chat/completions" \
  -H "Authorization: Bearer $TOGETHER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "stepfun-ai/Step-5",
    "messages": [
      {
        "role": "user",
        "content": [
          {"type": "text", "text": "List the column titles on this board, left to right."},
          {"type": "image_url", "image_url": {"url": "https://napkinsdev.s3.us-east-1.amazonaws.com/next-s3-uploads/d96a3145-472d-423a-8b79-bca3ad7978dd/trello-board.png"}}
        ]
      }
    ]
  }'
      

For this screenshot of a project board, Step 5 returned the four column titles, To Do, In Progress, Review, Done.

Try Step 5 on Together AI

To try the model in the browser, open Step 5 in the playground. For production traffic, the rate limits page in the docs covers how serverless inference responds under high demand and how to retry.

Where the numbers come from

Prices are from the Together AI pricing page and the serverless models table in the docs, as of December 2026. Model facts are from the Step 5 model page 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. 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.

Frequently asked questions

What is Step 5?

StepFun 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.

Is there a Step 5 API?

Yes. 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.

How much does the Step 5 API cost?

Step 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.

What is the context window of Step 5?

Step 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.

What is the Step 5 model string on Together AI?

The 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.

Does Step 5 support tool calling?

Yes. 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.

Does Step 5 accept images?

Yes. 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.

Does prompt caching work with Step 5?

Yes. 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.

Does Step 5 return its reasoning?

Yes. 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.

Does Step 5 support streaming?

Yes. 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.

What is the difference between Step 5 and Step 5 Preview?

Step 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.

Can I use Step 5 with the OpenAI SDK?

Yes. 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.

How is Step 5 billed on Together AI?

Step 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.

Which version does stepfun-ai/Step-5 serve?

On 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.

Where can I try Step 5?

You 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.

The text above was extracted automatically from the source page and may miss images, tables or code blocks. The original is authoritative.

Published by Together AI
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗