Core concepts
Galliun uses x402: paid routes respond with HTTP 402 Payment Required until the client attaches a valid payment proof.
Payment flow
Request → 402 with accepts[] → wallet pays USDC → retry with X-PAYMENT → 200 + response
The SDK performs this loop for you. Do not change the request body, path, or method between the first call and the retry.
Two products, two schemes
| Inference | Marketplace | |
|---|---|---|
| Routes | /v1/chat/completions, /v1/embeddings, … |
/p/:projectSlug/* |
| Scheme | exact — single transfer to Galliun treasury |
exact_split — atomic provider + platform USDC |
| Wallet option | inferenceWallet |
wallet |
Chains and asset
Payments run on Sui or Solana mainnet in USDC. See Supported chains.
Protected marketplace paths
Marketplace APIs are reached at:
/p/{projectSlug}/{endpointPath}
Discover published APIs with client.marketplace.directory. Call them with client.marketplace.call or callEndpoint.
What you receive
- Inference responses may include
usage,cost, andpaymentfields - Marketplace responses are the upstream API body; payment is handled via headers during the 402 flow
Details: Payment proofs and cost.