Per-end-user quota.
For your AI SaaS.
- - client = OpenAI(api_key="sk-openai-...")+ + client = OpenAI(+ api_key="sk-tnx-...",+ base_url="https://api.greentokey.com/v1",+ default_headers={+ "x-end-user-id": user.id, # ← that's it+ }+ + )Per-end-user quotas. Cost cap. Monthly reset.
Without writing the metering code.
$ npm install — wait, we don't even need that.
## Why not OpenRouter?
OpenRouter routes your tokens to the cheapest model. Great for solo devs who only need themselves to use it.
The minute you have paying customers, you need to limit each one's spend. OpenRouter doesn't do that.
## Why not Helicone or Vercel AI Gateway?
Both give you per-API-key quotas. greentokey gives you per-end-user quotas. Different problem.
When your user's runaway agent burns through their limit, only that user gets blocked. Not your whole SaaS. Not the customer paying you $500/mo next door.
## Built by one person.
I'm @brendanxu. I'm building greentokey because I needed per-end-user quota for my own AI Agent project and the alternatives all assumed I had a billing engineer.
One tier. $25/mo. 5M tokens.
Refund anytime. Cancel anytime.
## Objections
>Why $25/mo when OpenRouter is free?
>Why not just write the metering myself?
>What happens when my end user goes over their cap?
x-end-user-cap-usd header to set it per-call.