---
title: "Compact Response"
method: POST
path: "/v1/responses/compact"
tags: ["responses"]
---

# Compact Response

`POST /v1/responses/compact`

## Request

- Base URL: `https://api.mammouth.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mammouth.ai/v1/responses/compact`
- Auth: API key in header `x-litellm-api-key`
- TypeScript: <https://skmtc.dev/mammouth/apis/mammouth-api/docs/v1/responses/compact/post.ts> (a function with typed inputs; its response is checked against the schema)

Compact a response by running a compaction pass over a conversation.

Returns encrypted, opaque items that can be used to reduce context size.

Follows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses/compact

```bash
curl -X POST http://localhost:4000/v1/responses/compact     -H "Content-Type: application/json"     -H "Authorization: Bearer sk-1234"     -d '{
    "model": "gpt-4o",
    "input": [{"role": "user", "content": "Hello"}]
}'
```

## Response `200`

Successful Response

- unknown

## Changes

- **2026-10-16** `8efc7e7a4ee4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/mammouth/apis/mammouth-api/changes/v1/responses/compact/post.md)

---

[API](https://skmtc.dev/mammouth/apis/mammouth-api.md) - [All operations](https://skmtc.dev/mammouth/apis/mammouth-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mammouth/apis/mammouth-api/revisions/0221c7d45bb1?raw)
