Before you pay: a dataset you own
The wallet that pays must own an approved dataset. Two ways to get one, also with no account:- Generate it over x402:
POST /datasets/x402/synth, see Datasets for agents. Then approve it with a wallet-signedPOST /training/datasets/:id/approve. - Upload your own: wallet-signed
POST /training/datasets/presign,PUTthe JSONL, then wallet-signedPOST /training/datasets/:id/approve.
1. Read the catalog
2. Ask for a quote
402 with an x402 accepts entry for the exact amount, and a
singularity block you can read without knowing our pricing:
owner_wallet. The quote is bound to that wallet,
so it must prove control: send the wallet-signature headers
(X-Auth-Address, X-Auth-Chain, X-Auth-Signature, X-Auth-Timestamp,
X-Auth-Nonce, the same scheme as the rest of the compute API) or an API key that
belongs to that wallet. No account is needed for a wallet signature.
owner_wallet must be the wallet that owns the dataset and the wallet that
pays. The request is checked before the 402 (dataset approved and owned, GPU in
stock, block within the limits) and checked again before the payment settles.
Pick a block long enough for your data: POST /training/estimate suggests one,
and a run that runs out of time stops at the end of its block. A quote
is not a reservation: the daily limit and GPU stock are confirmed when you pay,
and a GPU can still fail to start (you then get credits, see below).
A quote is valid for 10 minutes.
3. Pay
Send the same body plusquote_id, with your signed payment in X-Payment (no
auth headers needed: the payment identifies the payer). The signed amount must
equal maxAmountRequired exactly. On Base and Robinhood Chain (EIP-3009),
validBefore must be within maxTimeoutSeconds (one hour) of now. On Solana the
payment is a signed SPL transfer transaction, which expires with its recent
blockhash. Standard x402 signers already do all of this.
run_id is present once the run exists. While payment is being confirmed or
the GPU is starting it can be absent: poll status_url with the claim token.
claim_token. It is shown once and is the only credential the
status URL accepts.
4. Follow the run
state field tells you where it is:
The same run is also readable with a wallet-signed
GET /training/runs/:run_id,
and the results with POST /training/runs/:run_id/deploy.
What happens to your money
- The price is the quote. What you sign is exactly what you are charged.
- One payment, at most one run. Resubmitting the same payment never charges again; it returns the same order outcome (pending, starting, the run, or credits).
- If the outcome is unclear, you get
409 settlement_pendingwith your claim token. Do not pay again; poll the status URL. - If the GPU cannot start, the payment becomes credits on the paying
wallet’s account (
credited_not_started). Oncerefundisreturnedornot_charged, start a run with them using a wallet-signedPOST /training/runs. Nothing is refunded on-chain. - A prepaid block: finishing early or cancelling does not refund the rest.
