Skip to main content
POST
CSharp (SDK)

Authorizations

Authorization
string
header
required

Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.

Headers

X-On-Behalf-Of
string

Optional external end-user identifier forwarded by the API gateway.

Body

application/json

Request schema for compacting a response's conversation history into a condensed summary.

model
string
required

The model to use for generating the compaction summary.

input

Text, image, or file inputs to the model, used to generate a response.

previous_response_id
string

The ID of a previous response whose conversation history should be compacted. If omitted, only the provided input is compacted.

Response

200 - application/json

The compacted response object containing user messages and compaction summary.

id
string
required
created_at
integer
required
Required range: -9007199254740991 <= x <= 9007199254740991
object
any
required
output
(Input message item · object | Output message item · object | Output audio item · object | File search call item · object | Computer call item · object | Computer call output item · object | Web search call item · object | Function call item · object | Function call output item · object | Reasoning item · object | Image generation call item · object | Code interpreter call item · object | Local shell call item · object | Local shell call output item · object | Shell call item · object | Shell call output item · object | MCP list tools item · object | MCP approval request item · object | MCP approval response item · object | MCP call item · object | Custom tool call item · object | Custom tool call output item · object | Item reference item · object | Compaction item · object)[]
required

Input message item: A message with role and content. Use this for user, assistant, system, or developer turns in structured inputs.

usage
object
required