Authorization: Bearer ********************curl --location '/responses/compact' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "string",
"input": "string",
"previous_response_id": "resp_123",
"instructions": "string",
"prompt_cache_key": "string",
"prompt_cache_retention": "in_memory",
"prompt_cache_options": {
"ttl": "30m",
"mode": "implicit"
},
"service_tier": "auto"
}'{
"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
}
}