Documentation Index
Fetch the complete documentation index at: https://thetokencompany.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Quick Start
Get your API key by creating an account. Choose your language:API Endpoint
Authentication
Add your API key to the request header:Request
| Parameter | Type | Description |
|---|---|---|
model | string | bear-1.2 (recommended), bear-1.1, or bear-1 |
input | string | Text to compress |
compression_settings.aggressiveness | float | 0.0 to 1.0 — higher means more compression. Default: 0.5 |
Response
| Field | Description |
|---|---|
output | Compressed text |
output_tokens | Token count after compression |
original_input_tokens | Original token count |
Gzip Compression
We recommend gzip for every request — overhead is under 1ms and it’s up to 2.5x faster for large payloads. The Python SDK and npm package enable gzip by default. For direct API usage, addContent-Encoding: gzip and send the compressed JSON body. See the full guide and benchmarks on the Gzip Compression page.
Protected Tokens
Parts of the input text can be protected from compression by using the<ttc_safe> tags. See the full documentation on the Protect Text page.