Create a chat completion

Supports text, up to eight images, function tools, and streaming. Video and audio inputs are unsupported. With stream=true, consume data-only SSE events until data: [DONE]; reasoning, content, and tool calls arrive as deltas.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
enum
required
Defaults to stepfun-ai/step-5-preview
Allowed:
messages
array of objects
required
length ≥ 1

Conversation history. Use content-part arrays for images. After an assistant tool call, include a tool message with its tool_call_id. Preserve assistant reasoning_content when continuing a conversation.

Messages*
string
enum
required
Allowed:
string | null | array
string | null

Assistant reasoning, separate from the final answer.

tool_calls
array of objects
Tool Calls
string

Required on tool-result messages; matches an assistant tool call ID.

string
integer
1 to 1048576
Defaults to 4096

Maximum generated tokens, including reasoning and the final answer. Small budgets may end during reasoning with null content and finish_reason=length. Prompt plus output must fit the context window.

boolean
Defaults to false
number
0 to 2
Defaults to 0.5
number
≤ 1
Defaults to 1
number
-2 to 2
Defaults to 0
number
-2 to 2
Defaults to 0
integer
0 to 9007199254740991

Optional sampling seed, limited to JavaScript-safe integers for the interactive examples. Deterministic output is not guaranteed.

string | array | null

Stop string or list of stop strings; omitted from the output.

tools
array of objects

Functions the model may request; the caller executes them.

Tools
string | object

Choose auto, none, required, or force a named function.

chat_template_kwargs
object

Reasoning remains enabled on this checkpoint. Do not set enable_thinking=false: it does not stop reasoning generation.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

400

Invalid request or unsupported input.

401

Missing or invalid NVIDIA API key.

402

Insufficient API credits.

422

Request validation failed.

429

Request rate limit exceeded.

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
text/event-stream
country_code