The Token Archive
Docs

Install in one line.

Any tool with a custom OpenAI base URL. Swap the URL, keep your SDK.

Env

Some SDKs read OPENAI_API_BASE instead — export both if unsure.

OPENAI_BASE_URL=https://api.thetokenarchive.com/v1
OPENAI_API_BASE=https://api.thetokenarchive.com/v1
OPENAI_API_KEY=ta_live_your_key_here

Cursor — Chat / Composer

Settings → Models → Override OpenAI Base URL. Needs a public HTTPS URL; Cursor's cloud backend cannot reach localhost. Cursor Tab is not routable.

Base URL
https://api.thetokenarchive.com/v1
API key
ta_live_your_key_here

Continue

Add apiBase to the model entry in ~/.continue/config.json.

~/.continue/config.json
"apiBase": "https://api.thetokenarchive.com/v1"
Or let the CLI write it
npx token-archive init --target continue --apply

Cline

Provider → OpenAI Compatible, then paste base URL, key, and your usual model id.

Base URL
https://api.thetokenarchive.com/v1
API key
ta_live_your_key_here

Roo Code

Provider → OpenAI Compatible. Same base URL and ta_ key as Cline.

Base URL
https://api.thetokenarchive.com/v1

Hermes Agent

Set the base URL in ~/.hermes/.env. This compresses Hermes → model traffic, not the Hermes :8642 server itself.

~/.hermes/.env
OPENAI_BASE_URL=https://api.thetokenarchive.com/v1
~/.hermes/.env
OPENAI_API_KEY=ta_live_your_key_here

Aider

Add to .aider.conf.yml in your repo or home directory.

.aider.conf.yml
openai-api-base: https://api.thetokenarchive.com/v1
.aider.conf.yml
openai-api-key: ta_live_your_key_here

Open WebUI / LibreChat / AnythingLLM

Add a custom OpenAI connection: base URL plus ta_ key. Models list through the archive unchanged.

OpenAI API base URL
https://api.thetokenarchive.com/v1
API key
ta_live_your_key_here

SDKs

Node, Python, and LangChain — just pass the base URL.

Node
const client = new OpenAI({ baseURL: "https://api.thetokenarchive.com/v1", apiKey: "ta_live_..." });
Python
client = OpenAI(base_url="https://api.thetokenarchive.com/v1", api_key="ta_live_...")
LangChain
ChatOpenAI(model="gpt-4o", base_url="https://api.thetokenarchive.com/v1", api_key="ta_live_...")

CLI

List every supported target, then configure one in place.

npx token-archive targets
npx token-archive init --target continue --apply
npx token-archive watch

Headers

Every response carries the savings ledger.

X-TA-Tokens-Original
X-TA-Tokens-Compressed
X-TA-Savings-Pct
X-TA-Tokens-Raw
X-TA-Tokens-Saved

Does not work

No base URL override exists for these, so the archive cannot see their traffic.

GitHub Copilot · Cursor Tab