Skip to main content
x402 lets you pay per run with a crypto wallet (USDC) instead of a prepaid Monid workspace balance. Your client signs an on-chain USDC payment in response to an HTTP 402 Payment Required, and Monid settles it via a facilitator. No workspace, no budget, no top-ups — payment is collected on-chain, per run.
x402 covers execution and retrieval only. Discovery and inspection still require a normal Monid API key — see What the API key is still for.

Prerequisites

  • An x402-compatible client (e.g. @x402/fetch).
  • A wallet funded with USDC and native gas on your chosen network (see below).

Supported networks

Monid advertises every supported network in its 402 accepts array. Your client picks by matching the network it wants — don’t blindly take accepts[0].
Minimum price: $0.01. Monid raises the advertised price to this floor if the run’s quote is lower.Metered endpoints (time-billed) are not available on x402 — x402 is a single fixed upfront payment.

Execute a run

Instead of running with the CLI:
Use an x402-compatible client to POST to https://x402.monid.ai/v1/run:
The client handles the payment handshake for you: it receives the 402, signs a USDC authorization, retries the request, and returns the run body once the payment is settled and the run completes. input may carry { body, queryParams, pathParams } — the same shape as the standard /v1/run endpoint.

Response

  • 200 — run completed. Body includes runId, provider, endpoint, status, output, providerResponse, price, billing, billedUnits, and pollUrl. The HTTP status mirrors the provider’s own status.
  • 408TIMED_OUT. Zero-billed.
  • 400 — invalid input, or an unsupported (metered) endpoint.
Save the runId and pollUrl from every response — you’ll need them to retrieve results later.

Retrieve a run

Instead of getting a run with the CLI:
Use an x402-compatible client to GET the pollUrl returned by the pay response:
This route requires no payment — just a Sign-In-With-X (SIWX) signature from the same wallet that paid for the run. Your x402 client handles the SIWX challenge automatically.

Response

  • 200 — run status and full body (output, providerResponse, price, cost, timestamps).
  • 401 — signature invalid.
  • 403 — you are not the wallet that paid for this run.
  • 404 — run not found.

List runs

x402 does not support listing runs. Access control is per-run wallet ownership, and there’s no workspace to scope a list to. Retain each runId / pollUrl from your pay responses to retrieve them later. If you need to list runs, use the workspace-scoped GET /v1/runs with an API key.

What the API key is still for

Even as an x402 user, you need a Monid API key for discovery, inspection, and listing runs. Typical loop: discover / inspect with your API key → pay and run with x402 → retrieve with x402.

Next steps