Token-Efficient LLM Middleware · tokenstree.eu

Send fewer tokens.
Pay less. Think more.

TokenTranslation sits between your agents and your LLM — it translates every prompt to the most token-efficient language, then translates responses back. Now with Tokinensis v2: a cross-lingual constructed language for maximum BPE efficiency.

Tokens Saved
Requests
Users
Get your API key
Continue with Google
or register with email
Continue with Google
or login with email
Skill Integration Guide

⚡ Connect TokenTranslation to your agent — no programming required

Copy one block of text into your skill's system prompt. Works with Claude Desktop, MCP, CrewAI, AutoGPT, LangChain, and any agent framework.

01
Register & get your API key
Use Google or create an account with email. You'll receive a key like tk_xxxx… — copy it.
02
Copy the instruction block below
Replace the two highlighted values with your server URL and API key. No coding required.
03
Paste into your skill system prompt
The agent reads the instructions and handles all translation calls automatically before and after each LLM request.
04
Watch savings accumulate in real time
Open the Dashboard to see tokens saved by language, total cost reduction, and live Tokinensis v1/v2 demos.
📋 Paste into your skill / system prompt
You have access to a token optimization service called TokenTranslation. BEFORE processing any user message, POST to: https://tokenstree.eu/translate/in Header: X-API-Key: tk_your_api_key_here Body: {"text": "<user message>", "use_tokinensis": false} Use the "optimized_text" as your actual input. Store "source_lang". AFTER generating your response, POST to: https://tokenstree.eu/translate/out Header: X-API-Key: tk_your_api_key_here Body: {"text": "<your response>", "target_lang": "<stored source_lang>"} Return the "text" field to the user.
Choose your translation backend:
🖥
Format 1 — Local (VPS)
argostranslate · Private · No API cost
Runs entirely on your VPS. ~300 MB RAM per language pair.

Set TRANSLATION_BACKEND=local in .env, then:
python install_models.py
✅ Zero external calls · ✅ No cost · ⚡ 50–200 tok/s
Format 2 — Google Translate
deep-translator · 100+ languages · Zero setup
Works immediately, no model installation needed.

Set TRANSLATION_BACKEND=google in .env. Optionally add GOOGLE_TRANSLATE_API_KEY for the official API.

✅ 100+ languages · ✅ No download · ⚡ 200–500ms
Python client — 4 lines of code
python
# 1. Copy skill_client.py into your project
from skill_client import TokenTranslationClient
tt = TokenTranslationClient("https://tokenstree.eu", api_key="tk_your_key")
optimized, meta = await tt.translate_in(user_prompt)
final = await tt.translate_out(llm_response, meta["source_lang"])
Token cost by language (tiktoken cl100k_base BPE)

Lower multiplier = fewer tokens = lower LLM cost. English baseline = 1.00×. ⚡ Tokinensis v2 achieves 0.65× via cross-lingual root compression.

Loading…
Dashboard

Token savings, Tokinensis v1 & v2 demo, live translator

Real-time stats · per-language breakdown · interactive v1/v2 encoder · optimal token mapper

Open Dashboard →