Why it is not a single call
Generating a dataset takes minutes, and a large one can take considerably longer. Nothing holds an HTTP connection for that: Cloudflare and most agent HTTP clients give up around 100 seconds. So payment and manufacturing are separate. Paying returns in about a second with adataset_id and a claim_token. Generation runs in the background and
you either poll for it or receive a signed webhook.
1. Check the price
fast costs
0.36, and 2,000 on best costs $22. Send
"verify": false to skip checking and pay for generation only. The
per-million-token figures are the provider’s published rates, shown so you can
compare models. You pay the flat per-example price, not per token.
Every row is checked
A second model reads each generated row back and scores it against your rules before it is allowed into the dataset. Rows that break a rule are thrown away and regenerated, so you receive a full-size dataset of rows that passed rather than a full-size dataset with failures in it. Who does the checking depends on where you generate, and the difference matters: Managed jobs are checked by a separate frontier model, never the one that wrote the rows, because a model marks its own homework badly. That costs $0.10 per 100 examples. Grid jobs are checked by the grid itself, using the network’s own models, so your data never leaves the confidential network even to be verified. That costs $0.03 per 100. The honest trade is that on-network models are smaller, so it is a lighter check than the frontier judge, which is why it costs a third as much. The status response carries the receipt, so you can see what happened:checked, rejected, and unchecked if the budget ran out before a batch
could be judged. A job never claims a check it did not perform.
This is why generated data beats prompting a model yourself in a loop. A real
200-row support dataset built without rules or checking invented twelve
different compensation policies, including thirteen full refunds, because
nothing ever verified the output against a policy.
2. Ask, and get a price
POST /datasets/x402/synth with no payment header returns 402 with a
standard x402 challenge plus a singularity block describing what you are
buying.
"rules": ["Never offer more than a 15% discount", "Never promise a refund"]
(up to 12, 200 characters each) and every generated reply must obey them. A
standing instruction says what the assistant does; rules say what it may never
do. Without them the model invents its own policy and applies it differently in
every row. In one real 200-row support set it handed out twelve different
compensation offers, including full refunds. Consistency of policies, figures
and promises is enforced by default even when you set no rules.
Quotes last ten minutes. The price is snapshotted when it is issued, so a rate
change can never alter what you are charged.
3. Pay
Sign the challenge and send it back with the same body plus thequote_id.
4. Collect it
refund_status is read from the ledger rather than asserted, so pending
genuinely means the refund is still being applied.
Webhooks
Pass awebhook_url when you ask for the quote and we will POST to it when the
job reaches a terminal state, so you do not have to poll at all.
webhook_secret returned in the 202:
HMAC-SHA256(secret, "<t>.<raw body>") and comparing to
v1, then rejecting anything where t is more than a few minutes old. That
timestamp is what makes a captured delivery non-replayable. Redirects are not
followed, and only a 2xx counts as delivered; we retry three times (one minute,
five minutes, twenty-five minutes) and then stop. Delivery never affects the
job, so polling always works as a fallback.
Chains
USDC on Base and Solana, USDG on Robinhood Chain, USDM on MegaETH. Pick with"network" in the request body; the challenge comes
back with the right asset and amount for that chain.
Through MCP
If your agent speaks MCP, the same flow is four tools onhttps://mcp.x402layer.cc/mcp:
