Charging people for your app
What you do so that other people can use your app and pay for what it makes. People sign in with their Nostrad account and pay from their own Nostrad credit, so your app needs Sign in with Nostrad first. Selling coins, levels or subscriptions is separate: see Selling inside your app.
1. Set your price
- In the developer console, open your app, then App settings.
- Under Price, set Percentage over Nostrad's prices: a whole number from 0 to 500.
- Choose Save price. The table under it shows what three models then cost a customer.
- Jobs started after you save use the new price. A job already running keeps the price it started with.
- The percentage is added to every model your app uses. At 0, your customers pay Nostrad's prices and you earn nothing from their jobs.
- The difference between your price and Nostrad's is recorded as your share of each finished job. A failed job costs nothing, so it earns nothing. A job blocked by a content check is the exception: it's charged the same as a finished job, and your share is recorded the same way. Paying your share out isn't available yet. The console's Monetize page shows it month by month under Earnings.
- A call made with an API key is charged at the same price, to you, and the difference is recorded as your share like any other.
2. Go public
Your app is personal until Nostrad verifies it: only you can sign in or use it. To open it to everyone with a Nostrad account:
- Under App settings, fill in the Website, Privacy policy and Terms. Leave Support email empty to have support mail go to your account email, kept private; or type a business address, choose Verify email address and enter the code sent to it.
- On the same page, answer the Age rating questions and choose Save age rating.
- On the same page, under App review information, give a contact Nostrad's reviewer can ask. If people sign in to your app's own account, tick Sign-in required and give a demo account's user name and password that won't expire. Choose Save review information.
- On the same page, under Who can sign in, choose Submit for verification.
- Nostrad checks the app against the App review rules and approves it, or says what to fix so you can submit it again. You see the answer in the same place.
Until it is approved, another person's sign-in answers "This app is personal", and a job for anyone but you answers 403. If your app makes adult content, switch on Allow adult models under App settings first: without it, models Nostrad marks as adult aren't listed for your app and don't run for it. With it on, your app is rated 18+, and only people whose Nostrad account says they're 18 or over can use it.
3. Show prices
Never write a price into your app: prices change, and yours follows your percentage. Ask the gateway, with the signed-in person's token, so the answer is the price that person pays.
Before they choose: price
GET /v1/models gives each model a price: a list of what one unit costs your customer, in US dollars as a decimal string. It already includes your percentage. The units are listed in the documentation.
"price": [ { "unit": "image", "usd": "0.04" } ]
- Show a model only if
availableis true. Withavailable: falseit can't run right now for this token. price: nullmeans the model has no price yet. Unknown never means free, and such a model can't run. Show "No price yet"; never guess.- Keep the decimal string as it is, or use decimal arithmetic. Token prices are very small numbers: makers quote them per million, so multiply by 1,000,000 to show them.
Before they press Run: POST /v1/quote
Send the same { model, inputs, params } you'd send for the job. Nothing runs and nothing is charged. max_usd is the most the job can cost, and the amount held from their credit when it starts.
const r = await fetch("https://gateway.nostrad.ai/v1/quote", {
method: "POST",
headers: { authorization: `Bearer ${accessToken}`, "content-type": "application/json" },
body: JSON.stringify({ model, inputs, params }),
});
const quote = await r.json();
// { "model": "...", "max_usd": "0.08", "lines": [ { "unit": "image", "units": 2, "usd_per_unit": "0.04" } ] }
const label = quote.max_usd === null ? "No price yet" : `Up to $${quote.max_usd}`;
Say "up to": what the job didn't use comes back when it ends, and the total is rounded up once to a whole cent. max_usd: null, with a detail, means the model has no price for that request yet.
4. When someone can't pay
Starting a job is refused in two cases that ask the person for different things. Nothing is charged in either.
| Status | Case | Words you get | What your app does |
|---|---|---|---|
| 402 | Not enough credit | not enough credit for this job; add credit at https://accounts.nostrad.ai/account#credit | Show an Add credit link to https://accounts.nostrad.ai/account#credit. On that page the person can also turn on Auto top-up: credit bought from their saved card when the balance falls below an amount they choose. metadata has limit_source nostrad_credits, scope account and remedy_hint |
| 403 | Over the monthly spending limit the person set for your app | this would go over the monthly limit set for this app, then the figures: ; $4.98 of $5.00 used; resets 2026-12-01T00:00:00.000Z. | Tell them to raise it: on accounts.nostrad.ai, under Apps, your app, Manage. Or say when it resets |
The limit's 403 is OpenRouter's answer at a budget: the words end with the figures, and metadata carries the same figures as fields, so branch on limit_source, not on the words:
{
"error": "over_limit",
"detail": "this would go over the monthly limit set for this app; $4.98 of $5.00 used; resets 2026-12-01T00:00:00.000Z.",
"metadata": {
"limit_source": "nostrad_app_limit",
"scope": "app",
"limit_usd": 5,
"spend_usd": 4.98,
"resets_at": "2026-12-01T00:00:00.000Z",
"remedy_hint": "Wait for the month to reset (see metadata.resets_at), or ask the person to raise their monthly limit for this app under Apps on accounts.nostrad.ai."
}
}
| Field | Meaning |
|---|---|
limit_source | nostrad_app_limit (the person's limit for your app), nostrad_key_limit (an API key's own limit) or nostrad_account_limit (the account's monthly spending limit, the 429 below) |
scope | app, api_key or account |
limit_usd | The limit, in US dollars |
spend_usd | What this month has used of it before this job, in US dollars; the job would take it over |
resets_at | When the month rolls over: the start of next month, UTC. Trying again before then fails the same way |
remedy_hint | A one-line next step for people reading logs |
The words arrive in detail. If the first way of running the job failed and the next was refused, the answer is the failed job instead, with the same words in its error and a job_id and no metadata, so read both:
if (r.status === 402 || r.status === 403) {
const body = await r.json();
const words = body.detail ?? body.error ?? "";
if (words.includes("/account#credit") && r.status === 402) {
showAddCredit("https://accounts.nostrad.ai/account#credit");
} else if (body.metadata?.limit_source === "nostrad_app_limit" || words.startsWith("this would go over the monthly limit")) {
showSpendingLimit("Your monthly limit for this app is reached. Raise it under Apps on accounts.nostrad.ai.");
} else {
show(words);
}
return;
}
The limit is 100 US dollars a month unless the person changes it, on the consent page or later. With an API key the same 403 is about you: add credit on that same page, or raise the key's limit under API keys; its words say this would go over the monthly limit set for this API key, and limit_source is nostrad_key_limit.
5. Other refusals to handle
| Status | Words | What it means |
|---|---|---|
| 403 | this app is personal: only its developer can use it until Nostrad verifies it | Your app isn't public yet, or no longer is |
| 403 | this app isn't allowed this service | The person unticked that service on the consent page, or your app doesn't have it under Services |
| 403 | access for this app was taken away | The person removed your app. Sign them in again |
| 403 | this model can't be used with an API key; it needs Sign in with Nostrad | Use the person's token for this model |
| 429 | this account has reached its monthly spending limit of $10.00; it comes back on 2026-12-01 at 00:00 UTC; it rises to $100.00 once $5.00 of credit has been bought: see https://accounts.nostrad.ai/account#credit (the amounts and date are the person's) | Every Nostrad account can spend up to a monthly amount that rises as it buys credit, like a supplier's usage tiers. Show detail; don't offer Add credit as the fix unless the words name an amount to buy. Its metadata has the same fields as the 403 above, with limit_source nostrad_account_limit |
| 503 | this model has no price yet, so it can't run | Offer another model |
| 503 | this model's supplier has reached Nostrad's spending limit for the month | Try again later, or offer another model |
Show detail to the person for any 403. The full list of errors is in the documentation.
6. Link your terms and privacy policy
- The addresses you set under App settings must be
https. They are shown on the page where people connect their Nostrad account to your app, and Nostrad checks them before approving it. - Link the same two pages from your own app, where people first sign in and in its settings.
7. What your customers see
| Where | What they see |
|---|---|
| Consent page | Your app's name and links, what it will be able to see and do, the monthly limit, and, if your percentage isn't 0, "your app charges N% over Nostrad's prices" |
| Account, Credit, History | One line per job: your app's name, the service and model, the amount, and the date. While it runs, how much is held; afterwards, that the rest came back. A job that didn't finish says "The job didn't finish; nothing was charged" |
| Account, Credit, Purchases | Things bought inside your app |
| Account, Apps, Manage | Your percentage, what your app may do, the monthly limit and this month's spending; they can change the limit or remove your app here |
They don't see your share. You see the same jobs, by job ID, under Logs in the console.
8. Check before you submit
- Signed in as yourself, a job runs and shows in Logs with the price you expect.
- Your app shows prices from
GET /v1/modelsandPOST /v1/quote, with none written into your code. - Your app handles the 402 and the limit's 403: an Add credit link, and the monthly limit message.
price: nullandavailable: falsedon't break your model list.- Your website, privacy policy, terms and support email (yours, or your account email if you left it empty) work, and your app links to the two pages.