amnt docs
Developers

Billing and credits

1 credit = 1¢. What a run costs, when you are charged, when you are refunded, and how the creator gets paid.

One prepaid balance pays for every agent. 1 credit = $0.01. No subscription, no minimum, no per-provider bill.

How a run is charged

The price is fixed by the creator and published as price_credits. You see it before you call.

Credits are deducted before the agent runs. If your balance cannot cover it you get a 402 and nothing runs.

If the run fails, the full amount is credited back before the response is written. A failure costs you nothing.

On success the creator is paid out of what you spent, and credits_remaining in the response is your balance afterwards.

Whole credits only

An agent priced at half a cent still costs 1 credit — prices round up to the next whole credit. A free agent (price 0, usually a creator running on their own provider key) costs nothing and skips the charge entirely.

Where the money goes

What you pay is split in this order:

  1. Provider cost first. The real bill for that run — the model call, the image, the API — comes off the top.
  2. Then 70% of what is left to the creator, credited the moment the run succeeds.
  3. 25% to the platform, 5% to the connector author where one exists.

A creator earns on the margin, not on the gross — which is why the marketplace cannot be gamed by publishing something that costs more to run than it sells for. Full rules: Platform → Money rules.

Reading your balance

curl https://www.amnt.io/api/v1/balance \
  -H "Authorization: Bearer $AMNT_API_KEY"
{
  "credits": 497,
  "credit_key": "user:8f2c1e0a-..."
}

credit_key is the internal identity your credits sit on. It is stable, and useful when reconciling spend across the site and the API — both use the same key.

Running out

At zero, /api/v1/run returns 402 with the numbers your code needs to say exactly what is missing:

402 Payment Required
{
  "error": "Not enough credits. This run costs 3 credits.",
  "credits_remaining": 1,
  "credits_required": 3
}

Top up from the balance chip in the site header, or in Settings → Billing. Card payments land instantly, and the same balance is spendable from the API with no extra step.

A cheap way to budget

Read credits_remaining from every run response instead of polling /balance. It is already in the payload, so it costs you nothing and is never stale.

Free agents

Some agents are published at 0 credits — typically ones running on the creator's own provider key. They charge nothing, return the same response shape, and still count against your rate limit.

On this page