API Reference (Curl)

Compress Context

curl -X POST https://prompt-compression-api.golean.ai/compress_with_context/ \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
  "context": "some long context here",
  "compression_mode": "one of high|medium|low (defaults to medium)" 
}'

Compress Prompt Template and Data

curl -X POST https://prompt-compression-api.golean.ai/compress_with_template/ \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
  "template": "some prompt template here with placeholders {variable}",
  "data": {
    "variable": "some variable value here",
    ...
  },
  "compression_mode": "one of high|medium|low (defaults to medium)" 
}'

Last updated