Represents a streamed chunk returned when streaming the responses API, based on the provided input.
event: response.created
data: {
"type" : "response.created" ,
"sequence_number" : 0 ,
"response" : {
"id" : "resp_4b71d12c86d94e719c7e3984a7bb7941" ,
"object" : "response" ,
"created_at" : 1735722153 ,
"status" : "in_progress" ,
"output" : []
}
}
event: response.in_progress
data: {
"type" : "response.in_progress" ,
"sequence_number" : 1 ,
"response" : {
"id" : "resp_4b71d12c86d94e719c7e3984a7bb7941" ,
"object" : "response" ,
"created_at" : 1735722153 ,
"status" : "in_progress" ,
"output" : []
}
}
event: response.output_item.added
data: {
"type" : "response.output_item.added" ,
"sequence_number" : 2 ,
"output_index" : 0 ,
"item" : {
"id" : "msg_4b71d12c86d94e719c7e3984a7bb7941" ,
"type" : "message" ,
"status" : "in_progress" ,
"role" : "assistant" ,
"content" : []
}
}
event: response.content_part.added
data: {
"type" : "response.content_part.added" ,
"sequence_number" : 3 ,
"item_id" : "msg_4b71d12c86d94e719c7e3984a7bb7941" ,
"output_index" : 0 ,
"content_index" : 0 ,
"part" : { "type" : "output_text" , "text" : "" }
}
event: response.output_text.delta
data: {
"type" : "response.output_text.delta" ,
"sequence_number" : 4 ,
"item_id" : "msg_4b71d12c86d94e719c7e3984a7bb7941" ,
"output_index" : 0 ,
"content_index" : 0 ,
"delta" : "Hello"
}
...
event: response.output_text.done
data: {
"type" : "response.output_text.done" ,
"sequence_number" : 6 ,
"item_id" : "msg_4b71d12c86d94e719c7e3984a7bb7941" ,
"output_index" : 0 ,
"content_index" : 0 ,
"text" : "Hello there, how may I assist you today?"
}
event: response.content_part.done
data: {
"type" : "response.content_part.done" ,
"sequence_number" : 7 ,
"item_id" : "msg_4b71d12c86d94e719c7e3984a7bb7941" ,
"output_index" : 0 ,
"content_index" : 0 ,
"part" : {
"type" : "output_text" ,
"text" : "Hello there, how may I assist you today?"
}
}
event: response.output_item.done
data: {
"type" : "response.output_item.done" ,
"sequence_number" : 8 ,
"output_index" : 0 ,
"item" : {
"id" : "msg_4b71d12c86d94e719c7e3984a7bb7941" ,
"type" : "message" ,
"status" : "completed" ,
"role" : "assistant" ,
"content" : [
{
"type" : "output_text" ,
"text" : "Hello there, how may I assist you today?"
}
]
}
}
event: response.completed
data: {
"type" : "response.completed" ,
"sequence_number" : 9 ,
"response" : {
"id" : "resp_4b71d12c86d94e719c7e3984a7bb7941" ,
"object" : "response" ,
"created_at" : 1735722153 ,
"status" : "completed" ,
"output" : [
{
"id" : "msg_4b71d12c86d94e719c7e3984a7bb7941" ,
"type" : "message" ,
"status" : "completed" ,
"role" : "assistant" ,
"content" : [
{
"type" : "output_text" ,
"text" : "Hello there, how may I assist you today?"
}
]
}
],
"usage" : {
"input_tokens" : 9 ,
"input_tokens_details" : { "cached_tokens" : 0 },
"output_tokens" : 11 ,
"output_tokens_details" : { "reasoning_tokens" : 0 },
"total_tokens" : 20
},
"model" : "zai-org/GLM-5.2"
}
}
Events
event: response.created chunk object
The type of the event. Always response.created.
The response that was created. Unique identifier for this response.
The object type of this resource - always set to response.
Unix timestamp (in seconds) of when this response was created.
The status of the response generation. One of completed, failed, in_progress, or incomplete. Available options: in_progress, completed, incomplete, failed
An array of content items generated by the model. The length and order of items in the output array is dependent on the model’s response.
Token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used. The number of input tokens.
A detailed breakdown of the input tokens. The number of tokens that were retrieved from the cache.
The number of output tokens.
A detailed breakdown of the output tokens. The number of reasoning tokens.
The total number of tokens used.
Details about why the response is incomplete. The reason why the response is incomplete. Available options: max_output_tokens, content_filter
The model used to generate the response.
The sequence number for this event.
event: response.in_progress chunk object
The type of the event. Always response.in_progress.
The response that is in progress. Unique identifier for this response.
The object type of this resource - always set to response.
Unix timestamp (in seconds) of when this response was created.
The status of the response generation. One of completed, failed, in_progress, or incomplete. Available options: in_progress, completed, incomplete, failed
An array of content items generated by the model. The length and order of items in the output array is dependent on the model’s response.
Token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used. The number of input tokens.
A detailed breakdown of the input tokens. The number of tokens that were retrieved from the cache.
The number of output tokens.
A detailed breakdown of the output tokens. The number of reasoning tokens.
The total number of tokens used.
Details about why the response is incomplete. The reason why the response is incomplete. Available options: max_output_tokens, content_filter
The model used to generate the response.
The sequence number of this event.
event: response.completed chunk object
The type of the event. Always response.completed.
Properties of the completed response. Unique identifier for this response.
The object type of this resource - always set to response.
Unix timestamp (in seconds) of when this response was created.
The status of the response generation. One of completed, failed, in_progress, or incomplete. Available options: in_progress, completed, incomplete, failed
An array of content items generated by the model. The length and order of items in the output array is dependent on the model’s response.
Token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used. The number of input tokens.
A detailed breakdown of the input tokens. The number of tokens that were retrieved from the cache.
The number of output tokens.
A detailed breakdown of the output tokens. The number of reasoning tokens.
The total number of tokens used.
Details about why the response is incomplete. The reason why the response is incomplete. Available options: max_output_tokens, content_filter
The model used to generate the response.
The sequence number for this event.
event: response.failed chunk object
The type of the event. Always response.failed.
The response that failed. Unique identifier for this response.
The object type of this resource - always set to response.
Unix timestamp (in seconds) of when this response was created.
The status of the response generation. One of completed, failed, in_progress, or incomplete. Available options: in_progress, completed, incomplete, failed
An array of content items generated by the model. The length and order of items in the output array is dependent on the model’s response.
Token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used. The number of input tokens.
A detailed breakdown of the input tokens. The number of tokens that were retrieved from the cache.
The number of output tokens.
A detailed breakdown of the output tokens. The number of reasoning tokens.
The total number of tokens used.
Details about why the response is incomplete. The reason why the response is incomplete. Available options: max_output_tokens, content_filter
The model used to generate the response.
The sequence number of this event.
event: response.incomplete chunk object
The type of the event. Always response.incomplete.
The response that was incomplete. Unique identifier for this response.
The object type of this resource - always set to response.
Unix timestamp (in seconds) of when this response was created.
The status of the response generation. One of completed, failed, in_progress, or incomplete. Available options: in_progress, completed, incomplete, failed
An array of content items generated by the model. The length and order of items in the output array is dependent on the model’s response.
Token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used. The number of input tokens.
A detailed breakdown of the input tokens. The number of tokens that were retrieved from the cache.
The number of output tokens.
A detailed breakdown of the output tokens. The number of reasoning tokens.
The total number of tokens used.
Details about why the response is incomplete. The reason why the response is incomplete. Available options: max_output_tokens, content_filter
The model used to generate the response.
The sequence number of this event.
event: response.output_item.added chunk object
The type of the event. Always response.output_item.added.
The index of the output item that was added.
The output item that was added. An output message from the model. The unique ID of the output message.
The content of the output message. The type of the output text. Always output_text. Available options: output_text
The text output from the model.
The role of the output message. Always assistant. Available options: assistant
The status of the message input. One of in_progress, completed, or incomplete. Populated when input items are returned via API. Available options: in_progress, completed, incomplete
The type of the output message. Always message. Available options: message
A description of the chain of thought used by a reasoning model while generating a response. Be sure to include these items in your input to the Responses API for subsequent turns of a conversation if you are manually managing context. The unique identifier of the reasoning content.
Reasoning text content. The type of the reasoning text. Always reasoning_text. Available options: reasoning_text
The reasoning text from the model.
The status of the item. One of in_progress, completed, or incomplete. Populated when items are returned via API. Available options: in_progress, completed, incomplete
The type of the object. Always reasoning. Available options: reasoning
A tool call to run a function. A JSON string of the arguments to pass to the function.
The unique ID of the function tool call generated by the model.
The name of the function to run.
The type of the function tool call. Always function_call. Available options: function_call
The unique ID of the function tool call.
The status of the item. One of in_progress, completed, or incomplete. Populated when items are returned via API. Available options: in_progress, completed, incomplete
The sequence number of this event.
event: response.output_item.done chunk object
The type of the event. Always response.output_item.done.
The index of the output item that was marked done.
The output item that was marked done. An output message from the model. The unique ID of the output message.
The content of the output message. The type of the output text. Always output_text. Available options: output_text
The text output from the model.
The role of the output message. Always assistant. Available options: assistant
The status of the message input. One of in_progress, completed, or incomplete. Populated when input items are returned via API. Available options: in_progress, completed, incomplete
The type of the output message. Always message. Available options: message
A description of the chain of thought used by a reasoning model while generating a response. Be sure to include these items in your input to the Responses API for subsequent turns of a conversation if you are manually managing context. The unique identifier of the reasoning content.
Reasoning text content. The type of the reasoning text. Always reasoning_text. Available options: reasoning_text
The reasoning text from the model.
The status of the item. One of in_progress, completed, or incomplete. Populated when items are returned via API. Available options: in_progress, completed, incomplete
The type of the object. Always reasoning. Available options: reasoning
A tool call to run a function. A JSON string of the arguments to pass to the function.
The unique ID of the function tool call generated by the model.
The name of the function to run.
The type of the function tool call. Always function_call. Available options: function_call
The unique ID of the function tool call.
The status of the item. One of in_progress, completed, or incomplete. Populated when items are returned via API. Available options: in_progress, completed, incomplete
The sequence number of this event.
event: response.content_part.added chunk object
The type of the event. Always response.content_part.added.
The ID of the output item that the content part was added to.
The index of the output item that the content part was added to.
The index of the content part that was added.
The content part that was added. A text output from the model. The type of the output text. Always output_text. Available options: output_text
The text output from the model.
Reasoning text from the model. The type of the reasoning text. Always reasoning_text. Available options: reasoning_text
The reasoning text from the model.
The sequence number of this event.
event: response.content_part.done chunk object
The type of the event. Always response.content_part.done.
The ID of the output item that the content part was added to.
The index of the output item that the content part was added to.
The index of the content part that is done.
The content part that is done. A text output from the model. The type of the output text. Always output_text. Available options: output_text
The text output from the model.
Reasoning text from the model. The type of the reasoning text. Always reasoning_text. Available options: reasoning_text
The reasoning text from the model.
The sequence number of this event.
event: response.output_text.delta chunk object
The type of the event. Always response.output_text.delta.
The ID of the output item that the text delta was added to.
The index of the output item that the text delta was added to.
The index of the content part that the text delta was added to.
The text delta that was added.
The sequence number for this event.
event: response.output_text.done chunk object
The type of the event. Always response.output_text.done.
The ID of the output item that the text content is finalized.
The index of the output item that the text content is finalized.
The index of the content part that the text content is finalized.
The text content that is finalized.
The sequence number for this event.
event: response.function_call_arguments.delta chunk object
The type of the event. Always response.function_call_arguments.delta.
The ID of the output item that the function-call arguments delta is added to.
The index of the output item that the function-call arguments delta is added to.
The function-call arguments delta that is added.
The sequence number of this event.
event: response.function_call_arguments.done chunk object
The type of the event. Always response.function_call_arguments.done.
The index of the output item.
The function-call arguments.
The name of the function that was called.
The sequence number of this event.
event: response.reasoning_text.delta chunk object
The type of the event. Always response.reasoning_text.delta.
The ID of the item this reasoning text delta is associated with.
The index of the output item this reasoning text delta is associated with.
The index of the reasoning content part this delta is associated with.
The text delta that was added to the reasoning content.
The sequence number of this event.
event: response.reasoning_text.done chunk object
The type of the event. Always response.reasoning_text.done.
The ID of the item this reasoning text is associated with.
The index of the output item this reasoning text is associated with.
The index of the reasoning content part.
The full text of the completed reasoning content.
The sequence number of this event.