Base URL: https://api.smoltext.sprapp.com. All endpoints accept and return JSON.
Pass your key from the dashboard as a bearer token:
Authorization: Bearer sk_live_xxxxxxxxxxxx
Calls without a key fall back to the anonymous free tier (10/day, rate-limited by IP).
Compress one string. One billable call.
// request
{ "text": "192.168.1.100 GET /api/v1/users", "turbo": false }
// response
{
"compressed": "Ab...", // base64 wire payload
"bytesIn": 31,
"bytesOut": 11,
"ratio": 0.355,
"savingsPct": 64.5,
"incompressible": false,
"usage": { "used": 12, "limit": 100000, "remaining": 99988, "window": "month", "period": "2026-06" }
}
turbo: true uses greedy mode — faster, marginally less compression. Incompressible input is stored raw (lossless) and returns incompressible: true.
// request
{ "compressed": "Ab..." }
// response
{ "text": "192.168.1.100 GET /api/v1/users", "usage": { ... } }
Compress up to 1000 strings in one request. Counts N billable calls.
// request
{ "items": ["a@b.com", "10.0.0.1", "{\"k\":1}"], "turbo": false }
// response
{ "results": [ { "compressed": "...", "bytesIn": 7, ... }, ... ], "count": 3, "usage": { ... } }
Current period usage for the authenticated key.
{ "email": "you@co.com", "plan": "starter",
"usage": { "used": 1240, "limit": 100000, "remaining": 98760, "window": "month", "period": "2026-06" } }
{ "email": "you@co.com" } → { "api_key": "sk_live_...", "plan": "free" }
Returns a Lemon Squeezy hosted checkout URL to upgrade. Body: { "plan": "starter" | "pro" | "scale", "interval": "monthly" | "annual" } (interval defaults to monthly; annual = 2 months free).
{ "error": "quota_exceeded", "message": "free plan allows 10 calls/day. Upgrade..." }
| Status | code | meaning |
|---|---|---|
| 400 | bad_request / bad_email / bad_payload | malformed input |
| 401 | missing_key / invalid_key | auth failed |
| 413 | input_too_large / batch_too_large | over 64KB or 1000 items |
| 429 | quota_exceeded | plan limit hit |
| 5xx | internal / stripe_error | server side |
compressed string