Sell AI credits inside your app.
Let users buy AI credits in your app. You set your commission; we handle checkout, usage tracking, and payouts. You earn it on every request.
partner feedback
Claude Code Chat runs on OpenCredits
“I didn’t want to run a billing company. I wanted people to open the extension and just start working.”
how it works2 snippets
From first price to payout
No wallet logic, no token metering, no custom checkout.
-
Set your commission
Your users pay in credits, not tokens.
-
Embed the checkout
No payment code. Your users buy without leaving your app.
-
Change the base URL
Keep your OpenAI or Anthropic SDK. Every request is metered.
-
Get paid
Your commission on every request, settled monthly.
// 1. Add the SDK
<script src="https://opencredits.ai/v1/sdk.js"></script>
// 2. Initialize
OpenCredits.init({
publishableKey: 'oc_pk_...',
onCreditsAdded(data) {
console.log('User key:', data.user_key);
}
});
// 3. Open checkout
OpenCredits.open();
import OpenAI from 'openai'
const client = new OpenAI({
baseURL: 'https://api.opencredits.ai/v1',
apiKey: userKey, // from checkout
})
const response = await client.chat.completions.create({
model: 'anthropic/claude-sonnet-4',
messages: [{
role: 'user',
content: 'Hello!'
}],
})
import Anthropic from '@anthropic-ai/sdk'
const client = new Anthropic({
baseURL: 'https://api.opencredits.ai',
apiKey: userKey, // from checkout
})
const message = await client.messages.create({
model: 'anthropic/claude-sonnet-4',
max_tokens: 1024,
messages: [{
role: 'user',
content: 'Hello!'
}],
})
the platform
What you don’t have to build or maintain
Six systems you’d otherwise build. Two snippets instead.
Stripe integration
No Stripe account, checkout pages, or payment webhooks to build. The widget runs Stripe checkout inside your app.
Usage metering
No token counting or per-model price tables. Every request is metered at its real token cost.
Credit ledger
No balance race conditions. A serialized ledger reserves each request’s maximum cost, then settles the actual cost once.
Provider keys
No OpenAI, Anthropic, or Google accounts to open and fund. One endpoint reaches 390+ AI models.
Webhooks
No event pipeline to run. Key and purchase events arrive HMAC-signed and are retried on failure.
Balance and history APIs
No usage store to keep. Two endpoints return your user’s live balance and per-request history.
What their requests cost at the model providers.
A percentage of provider cost. You can set up to 200%.
You earn per month
$100
$1,200 a year
On a request that costs $10 at the provider, you earn $1.00.
trust & security
Built like infrastructure, because it is
Stripe handles the money, a serialized ledger handles the credits, and every request settles against real provider cost.
pci dss · via stripe
Stripe-managed payments
Card data never touches our servers or yours. Stripe runs checkout and handles VAT and sales tax.
exactly once
Idempotent settlement
No double charges, no double grants. Every event settles exactly once.
hmac-sha256
Signed, retried webhooks
Every webhook is signed and automatically retried on failure.
OpenCredits