v1

latestOpenAPI 3.1.02026-08-04134182237.9 KB
Compression

Compress Query Specific Batch

Batch compress multiple contexts with queries.

post/api/compress/question-specific/batch

Headers

X-API-Keystring required

Request body

compression_model_namestring required

Compression model to use

target_compression_rationumber nullable

Target ratio: 0-1 (strength) or >1 for factor. Max 200.

coarseboolean

Use coarse-grained compression (paragraph-level). Applies to all items. Default: True.

dynamicboolean

latte_v2 only. Use Kneedle elbow selection instead of a fixed ratio; overrides target_compression_ratio when True.

dynamic_min_rationumber nullable

latte_v2 only. Floor on compression when dynamic=True.

dynamic_max_rationumber nullable

latte_v2 only. Ceiling on compression when dynamic=True.

source'demo' | 'extension' | 'sdk:python' | 'sdk:typescript' | 'sdk:curl' | 'gateway:unknown' | 'gateway:anthropic' | 'gateway:openai' | 'gateway:gemini' | 'integration:litellm' | 'integration:hermes'

Source of an API request.

Format: source[:detail]

  • demo, extension: no detail needed
  • sdk:python, sdk:typescript, sdk:curl
  • gateway:anthropic, gateway:openai, gateway:gemini
  • integration:litellm, integration:hermes

Response

Successful Response

successboolean
messagestring nullable