Compact conversation
Changed onCompact a conversation. Returns a compacted response object.
Learn when and how to compact long-running conversations in the conversation state guide. For ZDR-compatible compaction details, see Compaction (advanced).
Request
- Base URLhttps://api.openai.com/v1
- URLhttps://api.openai.com/v1/responses/compact
- AuthHTTP bearer
Request body
Response
Success
Example response
{
"id": "resp_001",
"object": "response.compaction",
"output": [
{
"id": "msg_001",
"status": "completed",
"type": "message",
"role": "user",
"content": [
{
"type": "input_text",
"text": "Summarize our launch checklist from last week."
}
]
},
{
"id": "msg_002",
"status": "completed",
"type": "message",
"role": "user",
"content": [
{
"type": "input_text",
"text": "You are performing a CONTEXT CHECKPOINT COMPACTION..."
}
]
},
{
"type": "compaction",
"id": "cmp_001",
"encrypted_content": "encrypted-summary"
}
],
"created_at": 1731459200,
"usage": {
"input_tokens": 42897,
"input_tokens_details": {
"cached_tokens": 0,
"cache_write_tokens": 0
},
"output_tokens": 12000,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 54897
}
}Changes
- info
added the new optional request property
////////// - info
added the new optional request property
////////// - info
added the new optional request property
////////// - info
added the new optional request property
////////// - info
added the new optional request property
////////// - info
added the new optional request property
////////// - info
added the new optional request property
/////////// - info
added the new optional request property
/////////// - info
added the new optional request property
/////////// - info
added the optional property
///////to the response with the status - info
added the optional property
///////to the response with the status - info
added the optional property
///////to the response with the status - info
added the optional property
///////to the response with the status - info
added the optional property
////////to the response with the status - info
added the optional property
////////to the response with the status - info
added the optional property
////////to the response with the status - info
added the optional property
////////to the response with the status - info
added the optional property
////////to the response with the status - info
added the optional property
////////to the response with the status
- info
- info
added the new
gpt-6.1-terraenum value to the request property/////////
- info