---
name: free3d-x402-payment
description: Pay for free3d.io model access using x402 v2 EIP-3009 or API keys
---

# free3d.io x402 Payment

Use when an AI agent receives HTTP **402** or **401** with a `PAYMENT-REQUIRED` header from `https://free3d.io`.

## Before you pay (required)

1. `GET https://free3d.io/x402/pricing.json` — networks, amounts, `default_accepts`.
2. Optional: `GET https://free3d.io/.well-known/agent-card.json`
3. Decode `PAYMENT-REQUIRED` (base64 JSON) **or** read the 402 JSON body — same `accepts[]`.

## Steps

1. Choose an entry from `accepts[]` / `pricing.json`:
   - **EVM gasless (recommended):** Base USDC `eip155:8453` → EIP-3009 + `PAYMENT-SIGNATURE`.
   - **Solana:** `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` + SPL mint → on-chain, then `X-Payment: <signature>:solana`.
   - **TRON:** `tron:0x2b6653dc` → on-chain, then `X-Payment: <txid>:tron`.
2. Build `PaymentPayload` = `{ x402Version: 2, accepted, payload: { signature, authorization } }`.
3. Retry the **original resource URL** with:
   - `PAYMENT-SIGNATURE: <base64(JSON)>` (x402 v2), **or**
   - `X-PAYMENT: <base64(JSON)>` (x402 v1 clients), **or**
   - raw JSON in either header (accepted by free3d.io).
4. Do **not** call `POST /x402/verify` for EIP-3009. `/verify` needs
   `{ "tx_hash", "network", "resource_id" }` after a legacy on-chain transfer only.
5. Optional merchant identity: `boogiemuffin.cloudflare.pay` in `extensions` — same x402 headers, no redirect.
6. Bulk access: request `X-API-Key` via free3dio@pm.me.

## Common mistakes

- Empty POST to `/x402/verify` → `missing_fields` (you need a real on-chain tx first).
- Putting a non-base64 / non-JSON string in `PAYMENT-SIGNATURE` → `invalid_payment_payload`.
- Using `X-Payment: not-a-valid-format` → use `tx_hash:network` or a PaymentPayload.

## References

- Pricing: https://free3d.io/x402/pricing.json
- Docs: https://free3d.io/x402/docs.html
- Policy: https://free3d.io/llms.txt
- Agent card: https://free3d.io/.well-known/agent-card.json
- Cloudflare Wallet: https://cloudflare.pay/ (handle: boogiemuffin.cloudflare.pay)
