Skip to main content
POST
/
api
/
chats
/
compact
cURL
curl --request POST \
  --url https://recoup-api.vercel.app/api/chats/compact \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "chatId": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "prompt": "<string>"
}
'
{
  "chats": [
    {
      "chatId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "compacted": "<string>"
    }
  ]
}

Authorizations

x-api-key
string
header
required

Your Recoup API key. Learn more.

Body

application/json

Chat compaction parameters

chatId
string<uuid>[]
required

Array of chat IDs to compact

Minimum array length: 1
prompt
string

Optional prompt to control what information gets preserved in the compacted summary

Response

Chats compacted successfully

chats
object[]
required

Array of compacted chat results