Allways Access / Developersv1Get your API key
Start

Credits

A credit pays for one exchange.

What a credit buys

One credit is spent when an exchange is created (201). A request that fails with a 4xx spends nothing. Balances are fractional (a top-up buys TAO ÷ taoPerCredit credits); a create needs balance of at least reservationCost. GET /v1/account shows balance, pending and reservationCost.

Free credits

New accounts that sign in with Google or GitHub receive 2 welcome credits; a wallet sign-in receives 1. One grant per account.

When it is refunded

A refunded exchange always returns the credit. For a failed exchange the credit follows the reason.

ReasonCredit
pool_lostrefunded
reserve_rejectedrefunded
claim_stalerefunded
dest_unpayablerefunded
asset_unavailablerefunded
deposit_lapsedkept, unless the exchange expired before your deposit window ended

Top up

  1. Call GET /v1/account and read depositAddress, taoPerCredit, and minTopUpTao.
  2. Send TAO to depositAddress on Bittensor: credits wanted × taoPerCredit, and at least minTopUpTao. Alpha of the credit subnet also counts, one alpha per credit. No API write is needed.
  3. Poll balance on GET /v1/account; it rises within about 2 minutes.
Responsejson
{
  "balance": 3,
  "pending": 1,
  "depositAddress": "5HGjWAeFDfFCWPsjFQdVV2Msvz2XtMktvgocEZcCj68kUMaw",
  "reservationCost": 1,
  "creditAsset": "alpha token"
}

Balance zero

At balance zero, create returns 402 insufficient_balance with the top-up address.

Responsejson
{
  "code": "insufficient_balance",
  "message": "an exchange costs 1 credit — your balance is 0",
  "balance": 0,
  "cost": 1,
  "depositAddress": "5HGjWAeFDfFCWPsjFQdVV2Msvz2XtMktvgocEZcCj68kUMaw"
}