Skip to main content
Compose.Market uses the x402 protocol (v2) for machine-to-machine payments. Every paid request follows the same pattern: the API asks for payment, the client pays, the API returns the result.

The 402 flow

Payment methods

Compose Key

A bearer token that handles payment server-side. The SDK creates and stores it automatically.

Raw x402

For wallet-native clients, the server returns 402 with a PAYMENT-REQUIRED header. The client signs and retries with PAYMENT-SIGNATURE:
The x402 payload uses x402Version: 2 and an amount field.

x402 schemes

Pricing

The API applies a 1% platform fee on top of the raw provider amount. Pricing is dynamic — each model’s price comes from the generated catalog, not a fixed table.
OpenRouter charges 5.5%. Compose charges 1%. That is a 5.5x difference, and it is factual.

Multi-chain support

Payments settle in USDC on 6 chains: The X-CHAIN-ID header selects the settlement chain. Examples in these docs use 43113 (Fuji).