Metera is the billing infrastructure for AI agents on Solana. It implements the x402 HTTP payment protocol — the open standard backed by Google, Microsoft, Stripe, Coinbase and Cloudflare — and exposes it as a managed platform.
If you have an API, Metera lets AI agents pay you automatically in USDC, per call, with no billing setup, no credit cards, and no human approval.
If you have an AI agent, Metera gives it a Solana wallet, spending limits, and access to hundreds of paid APIs — controllable through a three-tier approval system.
No banks. No credit cards. No humans in the loop — unless you want them.
Metera detects the x402 flow, verifies payment on-chain, proxies the request, and credits USDC to your wallet.
For AI agents
1
Create an agent wallet
Solana wallet created via Privy. No seed phrase. No crypto knowledge needed.
2
Deposit USDC
Deposit via Pix (BRL). USDC arrives on Solana mainnet.
3
Your agent pays automatically
Read your skill.md URL. The agent detects HTTP 402, pays in USDC, retries — zero extra code.
Quickstart: List your first API
5 minutes from zero to a live, monetized endpoint.
1
Create an account
Go to metera.xyz and sign in. No credit card required.
2
Go to /proxy and click "Register API"
The proxy dashboard is where you manage all your hosted endpoints.
3
Fill in the details
Enter your upstream URL (e.g. https://api.openweathermap.org/data/2.5/weather), set a name, category, and price per call in USDC. The minimum price is 0.001 USDC per call.
4
Your public proxy endpoint is live
Metera auto-generates a slug from your API name.
5
Test it with curl
Without a payment header, the endpoint returns HTTP 402:
bash
# Your Metera endpoint:
$ curl https://api.metera.xyz/p/weather-api
# Returns 402 Payment Required — as expected for unauthenticated calls
Your API is now discoverable in the Metera Marketplace and callable by any AI agent that uses the x402 protocol.
Quickstart: Make your first paid API call
1
Create an account at metera.xyz
Sign in — no crypto wallet required.
2
Go to /agents and create an agent wallet
Click "Create agent wallet", give it a name and optional spending limits. A Solana mainnet wallet is created automatically via Privy. No seed phrase.
3
Deposit USDC via Pix
Click "Deposit" on your wallet. Enter a BRL amount (minimum R$10). You'll receive a Pix QR code. Pay with any Brazilian bank app. USDC arrives on Solana mainnet — allow up to 72 hours for first-time settlement.
4
Get your skill.md URL
Copy the skill URL from your agent wallet card. It looks like: https://api.metera.xyz/skill/YOUR_AGENT_KEY
5
Connect to your AI agent
In Claude Code, Cursor, or any MCP-compatible client:
bash
Read https://api.metera.xyz/skill/YOUR_AGENT_KEY and follow the instructions
Your agent can now make paid API calls automatically. It reads the skill.md, learns its wallet address, spending limits, and available APIs, then pays in USDC when it encounters an x402 endpoint.
Agent wallets
Agent wallets are managed Solana wallets created by Metera on your behalf using Privy infrastructure. Each wallet has its own address, agent key, spending limits, and tier configuration.
Wallets run on Solana mainnet. Funds are held in USDC (mint: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v).
Create a wallet
1
Go to metera.xyz/agents
Sign in with any auth method.
2
Click "Create agent wallet"
Give it a name. Optionally set spending limits now — you can change them later.
3
Wallet created
A Solana address and unique agent key are generated instantly. No seed phrase. No private key setup.
Each agent wallet has:
→walletAddress — your Solana address (e.g. 4Ui3P6mXH...)
→agentKey — UUID used to authenticate agent proxy calls
Spending limits protect your agent from runaway costs. All limits are denominated in USDC.
maxPerCallMaximum USDC paid per individual API call. Calls exceeding this are blocked.$0.01
maxPerHourRolling hourly spend cap tracked in Redis.$1.00
maxPerDayRolling daily spend cap tracked in Redis.$5.00
maxPerMonthRolling monthly spend cap tracked in Redis.$20.00
All limits are optional. A null value means no limit is enforced for that window.
3-tier spending governance
Every call through the agent proxy is evaluated by the tier router before execution. The tier is determined by the call amount relative to your configured thresholds.
TIER 1 — AUTO
Condition: amount ≤ maxPerCall
Executes immediately. For paid plans (Starter, Pro, Enterprise) this limit is enforced on-chain by a Squads v4 SpendingLimit PDA — not just in the database.
Condition: amount > maxPerCall but ≤ tier2ThresholdUsdc, OR rate/pattern anomaly detected
Two sub-cases: (1) above_tier1 — executes but logs for review. (2) rate_exceeded or pattern_detected — soft-blocked with HTTP 429, retryAfter: 60 seconds.
Example: Calling same endpoint 10x in 60s triggers pattern detection
TIER 3 — HUMAN
Condition: amount > tier3ThresholdUsdc
Call is held pending. An approval email is sent to you. You approve or reject from the Metera dashboard at metera.xyz/agents. The agent receives HTTP 402 with a TIER3_APPROVAL_REQUIRED code and an approvalId.
Example: amount = $5.00, tier3ThresholdUsdc = $1.00 → held for human approval
Tier thresholds (tier2ThresholdUsdc and tier3ThresholdUsdc) are configurable per wallet via PATCH /api/agent-wallets/:id.
Deposit USDC via Pix
Metera uses 4P Finance to convert BRL to USDC on Solana via Pix. This is currently the primary deposit method.
1
Click "Deposit" on your agent wallet card
Found at metera.xyz/agents.
2
Enter a BRL amount
Minimum deposit is R$10. There is no published maximum — contact support for large amounts.
3
Enter your CPF
Required by 4P Finance for Brazilian regulatory compliance. Stored after first use — you only need to enter it once.
4
Pay the Pix
Scan the QR code or copy the Pix Copia e Cola string. Pay from any Brazilian bank app. The QR code expires in 30 minutes.
5
Wait for USDC
Once 4P Finance confirms the Pix, they convert BRL to USDC and send it to your Solana wallet on mainnet. Allow up to 72 hours for first-time deposits.
The Pix QR code expires after 30 minutes. If you miss the window, create a new deposit from the dashboard. Your wallet is never at risk — the deposit intent simply expires.
You can poll deposit status at GET /api/deposit/status/:depositIntentId. Status transitions: pending → completed (or expired).
skill.md — agent configuration
Every agent wallet exposes a public Markdown file that teaches AI agents (Claude, Cursor, GPT) how to use Metera automatically.
bash
# Your skill URL
https://api.metera.xyz/skill/YOUR_AGENT_KEY
# In Claude Code or Cursor:
Read https://api.metera.xyz/skill/YOUR_AGENT_KEY and follow the instructions
→How to make a paid call via the agent proxy endpoint
→How to check balance
→Which marketplace APIs are available
The skill.md is public — it contains no private keys or secrets. The agentKey authenticates calls through the proxy, not access to funds.
On-chain protection — Squads v4
For paid plans (Starter, Pro, Enterprise), Metera creates a Squads Protocol v4 multisig for each agent wallet. This adds on-chain enforcement of the per-call spending limit — not just a database check.
multisigPdaThe Squads multisig account address
vaultPdaThe vault that holds funds
spendingLimitPdaThe SpendingLimit PDA that enforces maxPerCall on-chain
Free plan wallets use database-only enforcement. The database limit is still enforced — Squads adds a second, immutable layer on top.
Register your API
No code required. Go to metera.xyz/proxy, paste your upstream API URL and set a price. Metera generates a public proxy endpoint instantly.
example
# Your API URL:
https://your-api.com/data
# Metera endpoint (auto-generated):
→ https://api.metera.xyz/p/your-data-api
Proxy endpoints
Each registered API becomes a proxy endpoint. Agents call the Metera URL, Metera verifies payment on-chain, then proxies the request to your upstream API with your API key injected automatically.
When you create an endpoint you can configure:
targetUrlUpstream API URL. No localhost in production.required
nameDisplay name. Used to auto-generate the slug.required
pricePerCallUSDC amount charged per successful call. Default: 0.001optional
categoryCategory tag for marketplace discovery. Default: "data"optional
targetApiKeyYour upstream API key — injected server-side. Never exposed to callers.optional
targetApiHeaderHeader name to inject the API key into. Default: "x-api-key"optional
isPublicWhether to list in the public marketplace. Default: trueoptional
methodsAllowed HTTP methods, e.g. ["GET","POST"]. Default: ["GET"]optional
The public proxy URL is always: https://api.metera.xyz/p/{slug}
How agents pay
When an agent calls your endpoint without a payment header, Metera returns HTTP 402 with payment instructions. The agent signs a USDC transaction on Solana, includes the signature in the next request, and Metera verifies it on-chain before proxying.
payment flow
$ GET https://api.metera.xyz/p/your-api (no payment)
$ GET https://api.metera.xyz/p/your-api -H "x-payment-signature: TX_HASH"
→ ← HTTP 200: { your API response }
# Total time: ~400ms. No human involved.
You receive 100% of the payment directly in your Solana wallet. Metera takes no fee from your revenue.
Browse the marketplace
The Metera Marketplace at metera.xyz/marketplace lists all public APIs available for AI agents. Browse by category, search by keyword, or sort by popularity or recency.
Each listing shows price per call in USDC, uptime %, average latency in ms, and total calls — so agents can evaluate quality before using an API.
Supported categories include: data, ai, media, finance, and others.
bash
# Browse all marketplace APIs
curl https://api.metera.xyz/api/marketplace
# Filter by category
curl "https://api.metera.xyz/api/marketplace?category=finance&sort=popular"
# Search by keyword
curl "https://api.metera.xyz/api/marketplace?search=weather"
# Get one API's full details
curl https://api.metera.xyz/api/marketplace/weather-api
List your API
Any endpoint registered with isPublic: true appears automatically in the marketplace. There is no manual review or approval process.
Agents across the Metera network discover and call your API autonomously — no signup flow, no API keys distributed to callers, no billing setup on either side.
The x402 protocol
x402 is an open HTTP standard for machine-to-machine micropayments. The HTTP status code 402 ("Payment Required") has existed since HTTP/1.1 but was never standardized. The x402 Foundation defines the spec.
When a server returns 402, the response body includes:
Settlement up to 72 hours applies mainly to first-time deposits. Subsequent deposits are typically faster. If your deposit is pending beyond 72 hours, contact support.
Plans
Metera plans control how many proxy endpoints and agent wallets you can create, and which analytics features are available. All plans include the core x402 payment functionality.
Feature
Free
Starter
Pro
Enterprise
Monthly price
$0
$29
$99
Custom
Proxy endpoints
3
10
Unlimited
Unlimited
Agent wallets
1
5
20
Unlimited
Calls visible
5
20
50
Unlimited
Analytics window
7 days
30 days
90 days
Unlimited
CSV export
—
—
Yes
Yes
MRR projection
—
—
Yes
Yes
Latency percentiles
—
—
Yes
Yes
Top paying agents
—
—
Yes
Yes
Revenue breakdown
—
—
Yes
Yes
White-label
—
—
—
Yes
Squads v4 on-chain protection
—
Yes
Yes
Yes
Free plan agent wallets use database-only spending limit enforcement. Paid plans (Starter, Pro, Enterprise) also get on-chain enforcement via Squads Protocol v4 — the SpendingLimit PDA is immutable and not bypassable via the database.
Pro plan analytics (revenue breakdown, latency percentiles, top paying agents, MRR projection, CSV export) are available at metera.xyz/analytics — gated by the requirePro middleware on the server.
API reference — Authentication
All private API endpoints require a Bearer JWT in the Authorization header. You can obtain this from your session after signing in.
The agent proxy endpoints (/agent/:agentKey/*) and marketplace endpoints are public — authenticated by the agentKey UUID or no auth at all.
bash
# Private endpoints
curl https://api.metera.xyz/api/agent-wallets \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
# Public endpoints — no auth
curl https://api.metera.xyz/agent/YOUR_AGENT_KEY/balance
curl https://api.metera.xyz/api/marketplace
Agent wallets endpoints
GET/api/agent-walletsList all agent wallets for the authenticated user
POST/api/agent-walletsCreate a new agent wallet (Privy + optional Squads v4)
GET/api/agent-wallets/:idGet a single wallet by ID
# Direct call — will get 402 if no payment
curl https://api.metera.xyz/p/weather-api
# Via the agent proxy (handles payment automatically)
curl -X POST https://api.metera.xyz/agent/YOUR_AGENT_KEY/fetch \
-H "Content-Type: application/json" \
-d '{ "url": "https://api.metera.xyz/p/weather-api", "method": "GET" }'
Marketplace endpoints
GET/api/marketplaceList public APIs — supports ?category, ?search, ?sort, ?limit, ?cursorpublic
GET/api/marketplace/:slugGet full details, stats, and usage examples for one APIpublic
GET /api/marketplace — query params
categoryFilter by category (data, ai, media, finance, …)
searchFull-text search on name and description
sort"popular" (default) or "recent"
limitResults per page — max 50, default 20
cursorPagination cursor from previous response
Deposit endpoints
POST/api/deposit/fourpInitiate a Pix deposit via 4P Finance — returns pixCopiaECola QR string
GET/api/deposit/intent/:idPoll deposit intent status (authenticated)
GET/api/deposit/status/:idPoll deposit status — public, lightweight, UUID-securedpublic
Metera is designed around a defense-in-depth model for AI agent spending. Multiple layers of enforcement prevent any single point of failure from draining an agent's wallet.
On-chain enforcement
Squads v4 SpendingLimit PDAs enforce the per-call limit immutably on Solana mainnet for paid plans.
Database enforcement
Per-call, per-hour, per-day, and per-month limits are checked before every proxy call for all plans.
Tier governance
Three-tier router gates every call. Tier 3 requires explicit human approval from the dashboard.
Anti-replay protection
Every Solana transaction hash can only be used once. Replay attacks are blocked at the blockchain level.
Squads Protocol v4
Squads Protocol v4 is the leading multisig and treasury management standard on Solana. Metera uses it to create a SpendingLimit PDA for each agent wallet on paid plans.
The SpendingLimit PDA enforces maxAutoApproveUsdc (your maxPerCall value) at the protocol level. No server-side code can bypass this limit — the blockchain rejects the transaction.
Setup happens automatically when you create a wallet on a paid plan. The multisig, vault, and spending limit PDAs are stored on the wallet record and visible in the dashboard.
On-chain enforcement requires the Metera treasury wallet to be funded on mainnet. If Squads setup fails at wallet creation (non-blocking), the wallet falls back to database-only enforcement. This is logged and will be hardened in a future release.
3-tier spending governance
The tier router runs on every proxied call before any payment is made. See the Tier system section above for the full decision table.
Key security properties:
→Tier thresholds are per-wallet and configurable by the wallet owner only
→Tier 3 approvals expire — a pending approval that is not acted on cannot be retried indefinitely
→Tier 2 pattern detection resets when the agent switches to a different endpoint
→All tier decisions are logged for audit
Anti-replay protection
Every USDC payment on Solana produces a unique transaction signature. Metera verifies that each signature corresponds to a real, confirmed, correctly-sized payment on-chain.
Solana's block hash mechanism means transaction signatures cannot be reused. Attempting to replay a transaction will fail at the network level before Metera even sees it.
Metera never holds funds in custody. Every payment goes directly wallet-to-wallet on Solana. Your USDC is in your wallet — not in Metera's.