OpenCredits is billing infrastructure for AI apps. Drop in a checkout widget, point your OpenAI or Anthropic SDK at our endpoint, and your users can buy prepaid AI credits without leaving your app. You set your commission and earn it on every request.
Why we built it
One of our cofounders makes Claude Code Chat, a VS Code extension. Running it meant juggling API keys, balances and payments when all he wanted was for people to open the extension and start working. OpenCredits came out of that. Claude Code Chat now runs on it, with 212K+ requests metered and billed.
How it works
1. Set your commission: 0% to 200% of provider cost, adjustable anytime.
2. Embed the checkout: one script tag. Stripe checkout runs inside your app.
3. Change the base URL: keep the OpenAI, Anthropic or Vercel AI SDK you already use.
4. Get paid: your commission on every request, settled monthly.
What you don't have to build
- Stripe integration, checkout pages and payment webhooks
- Token metering and per-model price tables
- A credit ledger: each request reserves its max cost, then settles the actual cost
- Provider accounts: one endpoint reaches 390+ models, including Claude, GPT, Gemini, Grok, DeepSeek and Llama
- Webhooks (HMAC-signed, auto-retried) and balance/history APIs
Shared balances
Credits belong to users, not apps. A user who bought credits in another OpenCredits app can let yours spend from that balance, up to a limit they set. Users can arrive already paid up, and each request earns commission for the app that made it.
Pricing
Free to set up, with no subscription and no monthly fees. Users pay in credits (1 credit = $0.01) and top up from $5 to $500. Stripe is the merchant of record and handles VAT, sales tax, refunds and chargebacks.
Who it's for
Developers building AI chat apps, coding assistants, writing tools, CV generators: anyone who wants to charge for AI usage without building billing.
Start building: opencredits.ai/partners
Docs: opencredits.ai/docs