Nostraddeveloper documentationDocumentationDeveloper console

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

  1. In the developer console, open your app, then App settings.
  2. Under Price, set Percentage over Nostrad's prices: a whole number from 0 to 500.
  3. Choose Save price. The table under it shows what three models then cost a customer.

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:

  1. 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.
  2. On the same page, answer the Age rating questions and choose Save age rating.
  3. 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.
  4. On the same page, under Who can sign in, choose Submit for verification.
  5. 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" } ]

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.

StatusCaseWords you getWhat your app does
402Not enough creditnot enough credit for this job; add credit at https://accounts.nostrad.ai/account#creditShow 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
403Over the monthly spending limit the person set for your appthis 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."
  }
}
FieldMeaning
limit_sourcenostrad_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)
scopeapp, api_key or account
limit_usdThe limit, in US dollars
spend_usdWhat this month has used of it before this job, in US dollars; the job would take it over
resets_atWhen the month rolls over: the start of next month, UTC. Trying again before then fails the same way
remedy_hintA 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

StatusWordsWhat it means
403this app is personal: only its developer can use it until Nostrad verifies itYour app isn't public yet, or no longer is
403this app isn't allowed this serviceThe person unticked that service on the consent page, or your app doesn't have it under Services
403access for this app was taken awayThe person removed your app. Sign them in again
403this model can't be used with an API key; it needs Sign in with NostradUse the person's token for this model
429this 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
503this model has no price yet, so it can't runOffer another model
503this model's supplier has reached Nostrad's spending limit for the monthTry again later, or offer another model

Show detail to the person for any 403. The full list of errors is in the documentation.

7. What your customers see

WhereWhat they see
Consent pageYour 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, HistoryOne 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, PurchasesThings bought inside your app
Account, Apps, ManageYour 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

  1. Signed in as yourself, a job runs and shows in Logs with the price you expect.
  2. Your app shows prices from GET /v1/models and POST /v1/quote, with none written into your code.
  3. Your app handles the 402 and the limit's 403: an Add credit link, and the monthly limit message.
  4. price: null and available: false don't break your model list.
  5. 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.