OpenAIOpenAI API
POST/responses/compact
Manage Compactconversation.
Contract-preserving POST Endpoint for Compactconversation in the OpenAI API. Model and resource-specific values are supplied by the caller at runtime.
All 288 OpenAI Platform REST endpoints from a fixed MIT-licensed official revision, including typed SSE streaming and Realtime call management. Hub provides documentation and an independent SDK/CLI, but never proxies model, account, or usage data; callers connect directly with local API keys.
Request
- operationId
Compactconversation- Server
https://api.openai.com/v1- Authentication
- ApiKeyAuth, AdminApiKeyAuth
Request parameters
No URL, query, or header parameters.
Request body
CompactResponseMethodPublicBody
Content-Type: application/json
Properties: inputinstructionsmodelprevious_response_idprompt_cache_keyprompt_cache_optionsprompt_cache_retentionservice_tier
Responses
200
CompactResourceapplication/json
Successful supplier response.
Properties: created_atidobjectoutputusage
429
ErrorResponseapplication/json
Supplier response with HTTP status 429.
Properties: error
{
"created_at": 1731459200,
"id": "resp_001",
"object": "response.compaction",
"output": [
{
"content": [
{
"text": "Summarize our launch checklist from last week.",
"type": "input_text"
}
],
"role": "user",
"type": "message"
},
{
"content": [
{
"text": "You are performing a CONTEXT CHECKPOINT COMPACTION...",
"type": "input_text"
}
],
"role": "user",
"type": "message"
},
{
"encrypted_content": "encrypted-summary",
"id": "cmp_001",
"type": "compaction"
}
],
"usage": {
"input_tokens": 42897,
"output_tokens": 12000,
"total_tokens": 54912
}
}