Compact response
Referência da API para POST /v1/responses/compact. Resuma itens mais antigos da conversa em um único item de compactação.
Autorizações
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Corpo
Input to compact: a string or an array of input items (messages, files, etc.).
Custom instructions for the compaction summarization.
The model to use for compaction in provider/model format (e.g. openai/gpt-4o). Required.
The ID of a stored response whose conversation is compacted; input is appended after it.
Key for prompt caching across requests.
Resposta
Compaction completed successfully.
Unix timestamp (seconds) when the response was created.
The ID of the compaction response.
Always "response.compaction".
response.compaction The next context window: a compaction item summarizing older items, followed by the most recent items verbatim. Pass it as the input of the next request, without previous_response_id.
Token usage information for the compaction request.

