Endpoint Details
Review how to make this request and handle its possible responses.
https://integrate.api.nvidia.com/v1/chat/completionsSupports 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.
Request Body
Edit the request fields below.
Request details
Parameters13 Parameters
modelrequiredstepfun-ai/step-5-previewValid values: stepfun-ai/step-5-previewmessagesrequiredConversation 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.
1messages[].rolerequiredsystem · user · assistant · toolmessages[].contentoptionalmessages[].reasoning_contentoptionalAssistant reasoning, separate from the final answer.
messages[].tool_callsoptionalmessages[].tool_call_idoptionalRequired on tool-result messages; matches an assistant tool call ID.
messages[].nameoptionalmax_tokensoptionalMaximum 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.
4096Minimum: 1Maximum: 1048576streamoptionalfalsetemperatureoptional0.5Minimum: 0Maximum: 2top_poptional1Maximum: 1Exclusive minimum: 0frequency_penaltyoptional0Minimum: -2Maximum: 2presence_penaltyoptional0Minimum: -2Maximum: 2seedoptionalOptional sampling seed, limited to JavaScript-safe integers for the interactive examples. Deterministic output is not guaranteed.
0Maximum: 9007199254740991stopoptionalStop string or list of stop strings; omitted from the output.
toolsoptionalFunctions the model may request; the caller executes them.
tool_choiceoptionalChoose auto, none, required, or force a named function.
chat_template_kwargsoptionalReasoning remains enabled on this checkpoint. Do not set enable_thinking=false: it does not stop reasoning generation.
Headers3 Headers
AuthorizationrequiredFormat: Bearer $NVIDIA_API_KEY
Content-TyperequiredAcceptoptional