API Reference
Compress prompt
POST
Body
application/json
Context or documents (low compression sensitivity)
Includes the question in the compressed prompt
Instruction (high compression sensitivity)
Retains the first 'k' sentences in each context
Retains the last 'k' sentences in each context
Retains a specific number of sentences in each context
Question (high compression sensitivity)
Method for ranking in coarse-level compression
Target compression ratio (default: 0.5)
Target compression token count (default: -1)
Enables context-level compression
Enables sentence-level compression
Enables token-level compression
Response
200
application/json
Compressed prompt
The compressed prompt result