Compact conversation
Compact 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 body
Response
Success
Example response
{
"id": "resp_001",
"object": "response.compaction",
"output": [
{
"type": "message",
"role": "user",
"content": [
{
"type": "input_text",
"text": "Summarize our launch checklist from last week."
}
]
},
{
"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,
"output_tokens": 12000,
"total_tokens": 54912
}
}Changes
Changed in 29 of the 163 revisions of this API.1123172
- ○
added the non-success response with the status
response-non-success-status-added
- ○
- ○
added the new
gpt-rosalind-researchenum value to the request property/////request-property-enum-value-added
- ○
- ○
added the new
gpt-6-lunaenum value to the request property/////////request-property-enum-value-added
- ○
added the new
gpt-6-solenum value to the request property/////////request-property-enum-value-added
- ○
- ○
added the new
gpt-5.1-minienum value to the request property/////////request-property-enum-value-added
- ○
- ○
api tag
Responsesaddedapi-tag-added
- ○
- ○
request property
////////////deprecatedrequest-property-deprecated
- ○
request property
////////////deprecatedrequest-property-deprecated
- ○
response property
output/items/oneOf[AdditionalTools]/tools/items/oneOf[subschema #6: MCP tool]/connector_iddeprecatedresponse-property-deprecated
- ○
response property
output/items/oneOf[ToolSearchOutput]/tools/items/oneOf[subschema #6: MCP tool]/connector_iddeprecatedresponse-property-deprecated
- ○
- ▲
removed the enum value
gpt-5.1-miniof the request property/////////request-property-enum-value-removed
- ○
added the new
gpt-audio-minienum value to the request property/////////request-property-enum-value-added
- ○
added the new
gpt-audio-mini-2025-12-15enum value to the request property/////////request-property-enum-value-added
- ▲
- ○
the
//////request property's maxLength was increased from20971520to104857600request-property-max-length-increased
- ○
- ▲
removed
subschema #1subschema #2from the//////request propertyanyOflistrequest-property-any-of-removed
- ▲
added to the
/response propertyoneOflist for the response statusresponse-property-one-of-added
- ○
added the new optional request property
//////new-optional-request-property
- ○
added the new optional request property
//////new-optional-request-property
- ○
added the new optional request property
//////new-optional-request-property
- ○
added the new optional request property
//////new-optional-request-property
- ○
added
subschema #1to the//////request propertyanyOflistrequest-property-any-of-added
- ○
removed from the
/response propertyoneOflist for the response statusresponse-property-one-of-removed
This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲
- ▲
added to the
/response propertyoneOflist for the response statusresponse-property-one-of-added
- ○
removed from the
/response propertyoneOflist for the response statusresponse-property-one-of-removed
- ▲