> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voidai.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Compact Response Context

> Compact conversation context through the VoidAI Responses API, with native or summarization fallback behavior and billing.

`POST https://api.voidai.app/v1/responses/compact`

Requires [authentication](/authentication) and access to the selected model. This operation is non-streaming and billed.

Send `model` and the context to compact. The schema accepts `input` as text, input items, or null, and supports optional `instructions`, `previous_response_id`, `tools`, and `reasoning`. Availability of context continuation and other options depends on the model/provider.

```bash theme={null}
curl https://api.voidai.app/v1/responses/compact \
  -H "Authorization: Bearer $VOIDAI_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"model":"gpt-4o-mini","input":"The user is planning a three-day trip and prefers museums and vegetarian food.","instructions":"Preserve the important preferences."}'
```

The gateway uses native compaction where supported. Otherwise it can make a normal generation request to summarize the supplied context. The output and semantics can therefore differ by provider; do not assume an opaque compaction item or identical context reconstruction on every model. Inspect the returned output before using it in subsequent requests.

See [Responses](/api-reference/responses/create), [credits](/guides/credits), and [request usage](/api-reference/usage/get).
