Authorization header, ForeverBetter uses normal bearer authentication and
does not invoke or charge x402.
Payment flow
- Call an x402-enabled route without an API key.
- Read the base64-encoded x402 v2 object from
PAYMENT-REQUIREDon the402response. - Choose an accepted network and sign the payment with an x402 client.
- Retry the same request with the encoded payload in
PAYMENT-SIGNATURE. - Read settlement details from
PAYMENT-RESPONSEon the successful response.
| Network | CAIP-2 identifier |
|---|---|
| Base mainnet | eip155:8453 |
| Polygon mainnet | eip155:137 |
| Solana mainnet | solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp |
Private wallet workspace
A verified payer address becomes a deterministic, private ForeverBetter identity. Base and Polygon share theeip155 address namespace, so the same EVM
wallet can import on Base and analyze or read the result after paying on
Polygon. Solana addresses use their own namespace.
This is an authorization boundary, not merely a billing label. A wallet cannot
pay to read another wallet’s sources, analyses, ancestry results, or dashboard
specifications. For x402 requests, omit user_id and organization_id;
ForeverBetter fills them from the verified payer.
Enabled capabilities
The live deployment is authoritative. ReadGET https://api.foreverbetter.xyz/.well-known/x402.json for enabled networks,
facilitators, route templates, and prices. The implementation supports:
- Provider and lab search
- Small multimodal imports through
POST /imports/file - Multimodal and modality-specific analyses
- Reading wallet-owned sources and analyses
- Recommendations and action plans
- Renderer-neutral dashboard specifications
- Grounded health queries
- Ancestry analysis from a wallet-owned genetics source
Bazaar discovery
Every paid route declares the x402 Bazaar extension with an input example, input schema, output example, service name, and topical tags. Dynamic paths use:param route templates. For example, calls to
/analyses/an_123/action-plan and /analyses/an_456/action-plan are cataloged
as one resource:
pathParams while the facilitator
uses routeTemplate as the stable catalog key. Agents can search a
Bazaar-enabled facilitator through its /discovery/resources endpoint. See
the official Bazaar dynamic-route specification.
Self-hosting
x402 is disabled unless every required value is configured:/supported responses must advertise x402 v2 exact settlement for every
enabled network. When multiple facilitators advertise the same network, the
first URL has precedence. The default public x402.org facilitator is intended
for testnets, so do not use it as an implicit mainnet production default.
Coinbase CDP mainnet uses dynamically signed authentication rather than a
static bearer header. Include its production URL and configure both credentials
as deployment secrets:
X402_FACILITATOR_AUTH_HEADERS as a deployment secret. Never commit facilitator
credentials or payout-wallet private keys. ForeverBetter needs only public
recipient addresses; payment signing stays with the paying agent.
Fulfillment guarantees
ForeverBetter verifies the payment before executing the route, buffers the endpoint response, and settles only after successful fulfillment. Handler errors cancel the verified payment flow and return the normal API problem response withoutPAYMENT-RESPONSE.
For paid POST routes, ForeverBetter derives an idempotency key from the signed
payment when the caller does not provide one. Retrying the same signed payment
therefore replays the original write instead of creating a duplicate import or
analysis. Solana duplicate-settlement protection is delegated to the configured
x402 facilitator and the official SVM mechanism.