back to home

faq

Frequently asked questions

How OpenCredits works, what credits cost, and what to expect when you integrate. For request and response details, see the documentation.

Product

What is OpenCredits?
A prepaid credit layer for AI apps. Your users buy credits through an embedded checkout, spend them on AI requests inside your app, and you earn the commission you set on every request. OpenCredits handles the credits and routes the requests — you never handle billing.
How does the flow work end to end?
You embed the checkout with one script tag. A user tops up, gets a key scoped to your app, and your app sends AI requests through the OpenCredits endpoint with that key. Each request debits their balance based on the model and tokens used, and you earn your commission on it.
Do my users need an OpenCredits account?
Not one they have to sign up for. Checkout verifies their email with a one-time code and issues a key scoped to your app. If they already have credits from another app, they can let yours use that balance, up to a limit they set.
Does one balance work across apps?
Yes. Credits belong to the user, not the app. Credits bought in an app can be spent there right away, and the user can let any other OpenCredits app use the same balance, up to a limit they set for each. Each app gets its own scoped key for that user.

Pricing and credits

What do credits cost?
$1 buys 100 credits. Users top up between $5 and $500 through the embedded checkout.
How is each request priced?
Each request is priced from the real provider token cost of the model used and deducted from the user’s balance in credits. The app sets its own commission, and the checkout shows estimates before users spend.
What happens when a balance runs out?
The API returns 402 insufficient_credits; open the checkout so the user can top up. A request only starts when the balance covers its estimated cost, and you're never billed for your users' usage.
Do credits expire?
Yes, 365 days after purchase. Each purchase's expiry date is fixed when it's bought, and users can see it in their dashboard.

Providers and routing

Which AI providers are supported?
390+ models from Anthropic, OpenAI, Google, xAI, Meta, Mistral, DeepSeek, and many more, namespaced by provider — for example anthropic/claude-sonnet-4 or openai/gpt-4o. The full catalog is available from GET /v1/models, no authentication required.
Which API formats does the endpoint speak?
Every model is served through one endpoint, compatible with both the OpenAI API (/v1/chat/completions) and the Anthropic API (/v1/messages). Both support streaming over server-sent events, and errors come back in the format matching the endpoint you call.
Can I restrict which models my app uses?
Yes. You choose which models your app allows. A request for a model outside that list returns a 403 model_not_allowed error.

Payments

Who sells the credits and processes payments?
Stripe is the merchant of record. Stripe runs checkout and handles VAT and sales tax. Partner apps never sell or hold credits themselves — they earn the commission they set on the requests their users make.
When do partners get paid?
You earn the commission you set on every request your users make. Earnings show in your dashboard in real time and settle monthly.
Can credits be refunded?
Unused credits can be refunded within 24 hours of purchase. Users email [email protected], and the money goes back to their original payment method. Credits already spent aren't refunded.

Integration

How quickly can I integrate?
Two steps: add the checkout with one script tag, then point your existing AI calls at the OpenCredits base URL with the user's key. There's no signup flow, billing system, or usage metering to build.
Which SDKs work with it?
The OpenAI SDK, Anthropic SDK, and Vercel AI SDK all work by changing the base URL and key. Plain fetch against either endpoint format works too.
What errors should my app handle?
The main ones: 402 insufficient_credits when a balance runs out, and 402 partner_not_permitted or 402 partner_limit_reached when the user hasn't allowed your app to use their balance or its limit is used up. For all three, open the checkout. 403 model_not_allowed means the model is outside your allowed list. The docs list the full error table.

Security

How are user keys secured?
Each key works only in the app it was issued for, and each device gets its own, so a leaked key can't spend in other apps. Keys are stored hashed, and all auth endpoints are rate-limited and fail closed.
What if a key is compromised?
Keys can be revoked instantly from the user dashboard. Because each key is scoped to one app and device, revoking it doesn't affect the user's balance or their keys in other apps.

Start earning on every request

Embed checkout, route a request, get paid.