OpenAI Integration
Compact context (OpenAI)
Compresses a conversation into an opaque compaction item using the OpenAI-compatible /v1/responses/compact endpoint. Drop-in compatible with the OpenAI SDK.
The response output contains the user messages plus a final item with type: "response.compaction" and encrypted_content. Pass this output as input to future Responses API calls to continue the conversation using the compacted context.
Note: This endpoint also works without the /v1 prefix (e.g., /openai/responses/compact).
post/openai/v1/responses/compact
Request body
Response
Successful compaction response
Example response
{
"object": "response.compaction"
}