Articles

Blog, tutorials & changelog

Everything we're learning about LLM token optimization — and every update we ship.

What is an LLM gateway? And do you actually need one?
LLM gateways route requests, add caching, and control costs. Here's what they do, when you need one, and how to get the same benefits in 2 lines of code.
How to run a local LLM (and what it costs vs cloud)
Ollama, LM Studio, llama.cpp — running local LLMs is free but not actually free. Here's the real cost comparison and how to track usage across both.
LLM benchmarks explained: what the leaderboard numbers actually mean
MMLU, HumanEval, GPQA, SWE-bench — here's what each benchmark measures, what they miss, and how to pick the right model for your use case.
GLM 5.2 has a 1M token context window. Here's what that does to your API bill.
Z.ai's GLM 5.2 is the most powerful open-weight LLM of 2026. But a 1M token context window cuts both ways — here's how to use it without destroying your budget.
We analyzed thousands of LLM API calls. Here's where the waste is hiding.
40–70% of tokens in the average production prompt are pure waste. We dug into the data to find the most common patterns — and how to fix them.
Semantic caching: why exact match isn't enough
Exact match caching only catches identical prompts. We built a semantic layer that catches similar ones — and it changes everything about LLM cost optimization.
Getting started with Tokoscope in 5 minutes
A step-by-step guide to integrating Tokoscope into your existing OpenAI, Anthropic, or Gemini app. No infrastructure changes required.
How to reduce your OpenAI API costs by 60%
A practical walkthrough of prompt compression, semantic caching, and cost attribution — three techniques that compound to dramatically cut your LLM spend.
v0.6.0
Python SDK
Jun 28, 2026

Semantic caching + async support

  • Semantic caching with OpenAI embeddings for Python SDK
  • Async support via acreate() for OpenAI and Anthropic
  • Cache hit logging shows exact vs semantic match with similarity score
  • Thread-safe cache check works in both sync and async contexts
v0.5.0
JS + Python
Jun 27, 2026

Semantic caching

  • Two-layer cache: exact match + semantic similarity (85%+ threshold)
  • OpenAI embeddings used for semantic comparison
  • Cache hit type shown in console logs with similarity score
  • Cache TTL: 7 days
v0.4.0
JS + Python
Jun 25, 2026

Gemini support

  • Full Gemini support in JavaScript and Python SDKs
  • Gemini pricing for all models (1.5 Flash, 1.5 Pro, 2.0 Flash, 2.5 Pro)
  • Gemini provider shown in dashboard and top endpoints table
v0.3.0
JS + Python
Jun 23, 2026

Caching layer

  • 7-day exact match caching for all providers
  • Cache hit rate and tokens/cost saved shown on dashboard
  • Clear cache from Settings page
  • Cache stats widget in Settings
v0.2.0
JS + Python
Jun 21, 2026

Per-user tracking

  • Pass userId to track token usage per end user
  • New Users page in dashboard with full paginated list
  • Per-user waste score and cost breakdown
  • Search by user ID
v0.1.0
JS + Python
Jun 18, 2026

Initial release

  • OpenAI and Anthropic support
  • Token usage tracking and cost attribution
  • Automatic prompt compression via Claude
  • Waste scoring for every prompt
  • Budget alerts via email
  • Dashboard with usage charts and top endpoints