v1

latestOpenAPI 3.1.02026-07-26405.8 KB

Compress

Compress a prompt and context to reduce token usage while preserving semantic meaning.

post/compress/raw/

Request body

contextstring required

Background information, instructions, or supporting text that provides context for the prompt.

promptstring required

The main query or question to send to your AI model.

Response

Successful compression

compressed_promptstring
original_prompt_tokensnumber
compressed_prompt_tokensnumber
successfulboolean
latency_msnumber