Compaction
Compact context
Compresses a conversation into an opaque encrypted compaction item using the OpenAI-compatible context compaction API.
The response output array contains the original user messages plus a final item with type: "response.compaction" and an encrypted_content field. Pass the full output array as input to future Responses API requests to continue the conversation without retransmitting the full history.
Supported providers: OpenAI, Azure OpenAI, xAI. Requests to unsupported providers return a 400 error.
post/v1/responses/compact
Request
- Base URLhttp://localhost:8080
- Auth
- HTTP bearer
- or HTTP basic
- or API key in header x-bf-vk
- or API key in header x-api-key
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Response
Successful compaction response
Example response
{
"object": "response.compaction"
}Changes
No recorded changes to this operation across all 1 revision of this API.