Skip to main content
Curtly offers two integration paths: a 1-line Drop-In Proxy that optimizes both input prompts and generated responses automatically, and the Official SDK (curtly) for programmatic compression and agent workflows.
Swap your OpenAI or Anthropic baseURL to point to Curtly. Optimization happens automatically with zero changes to your existing prompt templates or schemas.

Path B: Official TypeScript SDK (curtly)

If you want to preprocess prompts programmatically or wrap your existing OpenAI client in Node.js / Bun:

Response Structure

The /api/v1/compress endpoint returns the compressed string, generated brevity directives, and execution metrics:
200 OK

Next Steps

Compression Modes

Learn when to use Conservative, Balanced, or Aggressive compression.

Output Efficiency

Understand how brevity directives cut 30% to 50% off model response tokens.