Chat Completion response object
Single Chat Completion response returned by the model.
Attributes
idstring
Chat response ID.objectstring
Response object type, alwayschat.completion.modelstring
Model name.createdtimestamp
Unix timestamp (seconds) when the response was generated.choicesobject array
List of response choices.Expand/Collapse
finish_reasonstring
Why generation stopped.indexint
Choice index.messageobject
Actual message content.
Expand/Collapse
rolestring
Message role, alwaysassistant.contentstring
Message text.reasoningstring
Reasoning content (only for step reasoning models).tool_callsobject arrayoptional
Toolcall results.
Expand/Collapse
idstring
Function call ID generated by the model; unique in context.typestring
Toolcall type, alwaysfunction.functionobject
Function payload.
Expand/Collapse
namestring
Function name, typically one from the tools list of the previous turn.argumentsstring
Function arguments as a JSON string.
usageobject
Token usage statistics.Expand/Collapse
prompt_tokensint
Prompt tokens used.cached_tokensintoptional
Prompt tokens served from cache.completion_tokensint
Completion tokens generated.total_tokensint
Total tokens.
Example
{
"id": "b7b56af0-52a6-483f-a589-948182676a1b",
"object": "chat.completion",
"created": 1709893411,
"model": "step-3.5-flash",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! StepFun specializes in artificial intelligence and provides AI solutions across NLP, computer vision, and machine learning to help customers improve efficiency and create value across industries."
},
"finish_reason": "stop"
}
],
"usage": { "prompt_tokens": 83, "completion_tokens": 176, "total_tokens": 259 }
}Last updated on