# The Token Company > LLM input compression middleware. Remove low-signal tokens from prompts to cut costs, improve accuracy, and fit more context. The Token Company builds compression models (bear-2, bear-1.2) that remove low-signal tokens from LLM prompts before they reach the model. One API call compresses your input; you pass the compressed text to any LLM. Compression is deterministic and delete-only — nothing is summarized, paraphrased, or generated, so the text that reaches the model is the caller's own, verbatim and in original order. Free tier includes up to 1B processed tokens per month. Backed by Y Combinator. ## When to use The Token Company Reach for the compression API when a long, low-density prompt is about to be sent to an LLM and tokens are billed: - **Long context the caller did not write.** Scraped web pages, extracted PDFs and reports, search results, retrieved RAG chunks. Mostly boilerplate; typically 10-50% comes out with no measurable accuracy loss. - **Conversation history resent every turn.** Agent scratchpads, chat histories, tool-call transcripts — compress the history block before resending it. - **Meeting transcripts and call recordings.** Verbatim speech is the highest-redundancy text there is. - **Context-window pressure.** Compression fits more source material into the same window instead of forcing truncation or chunking. - **Latency-sensitive paths.** A shorter prompt reaches first token sooner — up to 49% faster time-to-first-token at 50% reduction, measured across 9 frontier models. Do not use it for: code that must compile or be edited in a loop, strictly structured payloads (JSON schemas, SQL, config), prompts under a few hundred tokens, or spans that must survive character-exact (wrap those in `` tags). Full agent instructions, including request fields and worked examples: https://thetokencompany.com/agents.md ## Developer resources - [The Token Company OpenAPI specification](https://thetokencompany.com/openapi.json): OpenAPI 3.1 description of the compression API — typed schemas and operation IDs for function calling. YAML at https://thetokencompany.com/api/openapi.yaml - [The Token Company agent instructions](https://thetokencompany.com/agents.md): when to call the API, when not to, and how - [The Token Company API documentation](https://thetokencompany.com/docs): full developer documentation - [The Token Company API quickstart](https://thetokencompany.com/docs/quickstart): API key, first request, SDK install - [The Token Company API authentication](https://thetokencompany.com/docs/quickstart): `Authorization: Bearer ttc-...` on every authenticated endpoint - [The Token Company Python SDK](https://github.com/TheTokenCompany/the-token-company-python): `pip install the-token-company` - [The Token Company Node.js SDK](https://github.com/TheTokenCompany/the-token-company-node): `npm install the-token-company` - [The Token Company router (OpenAI-compatible)](https://thetokencompany.com/docs/ai-router): swap the base URL, keep your provider SDK - [The Token Company troubleshooting guide](https://thetokencompany.com/docs/troubleshooting): common API errors and fixes - [The Token Company llms-full.txt](https://thetokencompany.com/llms-full.txt): long-form site index with models, pricing, and benchmarks inline - [The Token Company documentation as plain text](https://thetokencompany.com/docs/llms.txt): every documentation page in one file - [The Token Company status page](https://status.thetokencompany.com/): live service status - [The Token Company Trust Center](https://trust.thetokencompany.com): SOC 2 report and security documentation ## API endpoints Base URL: `https://api.thetokencompany.com` Authentication: `Authorization: Bearer ttc-...` - `POST /v1/compress` (operationId `compressText`) — compress one string, document, or JSON blob. Body: `model`, `input`, optional `compression_settings.aggressiveness` and `app_id`. Returns `output`, `output_tokens`, `original_input_tokens`. Typed schemas: https://thetokencompany.com/openapi.json ## Installation - Python: `pip install the-token-company` - TypeScript: `npm install the-token-company` ## Key Links - [Home](https://thetokencompany.com) - [About](https://thetokencompany.com/about) - [Pricing](https://thetokencompany.com/pricing) - [Blog](https://thetokencompany.com/blog) - [Benchmarks](https://thetokencompany.com/benchmarks) - [Contact](https://thetokencompany.com/contact) - [Careers](https://thetokencompany.com/careers) - [Privacy Policy](https://thetokencompany.com/privacy) - [Terms and Conditions](https://thetokencompany.com/terms-and-conditions) ## Blog Posts - [bear-2-finance Announcement](https://thetokencompany.com/blog/compressing-sec-filings): Query-aware compression for financial documents; models answer more accurately at a third to half of the tokens - [Pax Historia Case Study](https://thetokencompany.com/blog/pax-historia): 193B tokens/mo customer improved quality with compression in a 268K-vote blind arena - [Helonic Case Study](https://thetokencompany.com/blog/helonic): Construction-AI agents save ~47K tokens per prompt on long-running workloads - [CoQA Benchmark](https://thetokencompany.com/blog/coqa): Conversational QA accuracy improved 93.3% to 95.3% with 8.2% fewer tokens - [Bear-2-Safety Release](https://thetokencompany.com/blog/bear-2-safety): Compression for safety classifiers; ~30% fewer tokens with F1 preserved or improved ## Documentation - [Introduction](https://thetokencompany.com/docs): What is TTC, why compress, quick example - [Quickstart](https://thetokencompany.com/docs/quickstart): Install SDK, get API key, first compression - [TTC Router](https://thetokencompany.com/docs/ai-router): OpenAI-compatible endpoint with compression built in - [About Compression](https://thetokencompany.com/docs/compression): Models, aggressiveness levels, how it works - [OpenAI](https://thetokencompany.com/docs/openai): Automatic compression for OpenAI API calls - [Vercel AI SDK](https://thetokencompany.com/docs/vercel-ai): Middleware compression for any AI SDK provider - [Anthropic](https://thetokencompany.com/docs/anthropic): Automatic compression for Claude API calls - [OpenRouter](https://thetokencompany.com/docs/openrouter): Compression for OpenRouter and OpenAI-compatible providers - [Compression Statistics](https://thetokencompany.com/docs/stats): Read token counts and savings from a response - [Advanced Aggressiveness](https://thetokencompany.com/docs/aggressiveness): Per-role aggressiveness and tuning - [App ID](https://thetokencompany.com/docs/app-id): Break usage down per application - [Protect Text](https://thetokencompany.com/docs/protect-text): Exclude content from compression with ttc_safe tags - [Data Retention](https://thetokencompany.com/docs/data-retention): Zero data retention policy - [Troubleshooting](https://thetokencompany.com/docs/troubleshooting): Common errors and how to resolve them - [Full docs as plain text](https://thetokencompany.com/docs/llms.txt): All documentation in a single text file for LLMs ## Markdown versions Every page listed above is also served as markdown. Append `.md` to the path, or send `Accept: text/markdown` to the page URL — for example https://thetokencompany.com/docs/quickstart.md. The homepage alternate is https://thetokencompany.com/index.md. Each HTML page also advertises its alternate in a `Link: rel="alternate"; type="text/markdown"` header. ## Benchmarks - [FinanceBench (bear-2-finance)](https://thetokencompany.com/blog/compressing-sec-filings): Accuracy on analyst questions over full SEC filings at a third to half of the tokens - [SQuAD 2.0](https://thetokencompany.com/blog/squad-v2): Reading comprehension +4.0pp with 17% fewer tokens - [Latency](https://thetokencompany.com/blog/latency): Up to 49% faster time-to-first-token at 50% token reduction, measured across 9 frontier models at 200K context