Send any content. Get back a trimmer version that does the same job with fewer tokens.
<article class="prose"> <h1>Welcome to our brand new docs</h1> <p>This extensive guide will help you learn about all of the APIs that are available.</p> <ul> <li>Auth</li> <li>Rate limits</li> </ul> </article>
POST to /v1/trim. Same contract whether you're trimming HTML, prompts, or chat history. No migrations. Ever.
Every token leantokn strips is a token you never pay for. The more you use it, the more the math works in your favor.
Payloads are processed in memory and immediately discarded. We never store your content.
# request curl https://api.leantokn.com/v1/trim \ -H "Authorization: Bearer ltk_••••" \ -H "Content-Type: application/json" \ -d '{ "input": "<html>…</html>", "type": "html" }' # response { "result": "# Welcome\n\nThis guide…", "type": "html", "stats": { "input_tokens": 3184, "output_tokens": 937, "tokens_saved": 2247, "savings_percent": 71 } }
1M tokens free, no card. Drop one line in front of any model call. If we don't save you money, the bill is on us.