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?
OpenRouter has no markup on tokens. greentokey charges $25/mo for the metering, cost cap, per-end-user quotas, and dashboard. Direct OpenAI + greentokey is cheaper than direct OpenAI + writing that code yourself. If you never need those things, use OpenRouter.
>Why not just write the metering myself?
Because it's 200 lines of Postgres schema, a cron job to reset quota monthly, a webhook to sync Stripe tier changes, a cost-cap daemon, and a UI to show users their usage. I know because I wrote it for my own app before deciding this should be a SaaS.
>What happens when my end user goes over their cap?
Their calls get a 429 with a greentokey error body. Your calls for other end users keep working. You can raise their limit in the dashboard or pass a x-end-user-cap-usd header to set it per-call.
>Where is my data?
Singapore VPS. We proxy your calls to OpenAI/Anthropic; we do not log prompt or completion bodies. We log: tokens used, cost, model name, end-user-id, timestamp. That's it. Delete your account and we drop the row.
>How do I trust this with one founder?
You probably shouldn't, yet. This is an early prototype. If you're doing mission-critical inference today, go Helicone or self-host LiteLLM. If you're shipping your first AI SaaS and want to talk to the person building it, DM @brendanxu.