Tokenminning with Helicone
Helicone is an LLM observability platform with an AI Gateway — one OpenAI-compatible endpoint for 100+ models, automatic logging, and 0% markup on provider rates.
Hub for the Helicone cluster. Best fit when you need request-level visibility and throttling before traffic hits providers.
Quick checklist
- Open Helicone → Requests tab after your first API call — dashboard.
- Set rate limits per user, feature, or API key — rate limits.
- Default to
gpt-4o-minior equivalent cheap models. - Enable prompt caching proxy for repeat prefixes — caching.
- Use credits or BYOK — Helicone maintains provider keys for you.
Typical impact: 40–70% savings from rate limits catching runaway loops; 10–30% from prompt cache hits.
How to reduce Helicone spending
1. Measure first
Every request appears in the Helicone Requests tab within seconds — cost, model, tokens, latency.
2. Cap spend
Set rate limits (requests per minute, tokens per day) before requests reach the provider.
3. Route cheap
Change the model field to switch between 100+ models on the same endpoint. Default to mini/haiku.
4. Cache prefixes
Helicone’s prompt caching proxy stores repeat prefixes — caching.
5. Trim upstream bloat
Reduce context in your agent — Context hygiene.
6. Guardrail in prod
Rate-limit CI and eval workloads separately from production traffic.
How Helicone bills
0% markup on provider rates when using Helicone credits. BYOK routes through your own provider keys. See Helicone pricing .
Guides
| Guide | What you’ll learn |
|---|---|
| Dashboard | Requests tab, cost tracking, exports |
| Rate limits | Throttle before provider, per-user caps |
| Caching | Prompt cache proxy, prefix stability |
Connect your stack
import { OpenAI } from "openai";
const client = new OpenAI({
baseURL: "https://ai-gateway.helicone.ai",
apiKey: process.env.HELICONE_API_KEY,
});
const response = await client.chat.completions.create({
model: "gpt-4o-mini",
messages: [{ role: "user", content: "Hello" }],
});Anti-patterns
| Anti-pattern | Why it fails |
|---|---|
| No rate limits on agent endpoints | Runaway loops hit provider at full speed |
| Frontier default on gateway | Every request at max tier |
| Helicone proxy + OpenRouter | Double gateway latency and fees |