polygon-discovery
x402 Bazaar Services
Pay-per-call APIs accessible via x402-pay. No API keys or subscriptions — each call costs a small USDC amount drawn from your wallet. The CLI detects the 402 response, funds the exact amount, and retries automatically.
Catalog: GET https://x402-api.onrender.com/api/catalog?status=online
Warning: All
/api/call/<uuid>catalog endpoints require anX-Admin-Tokenheader and are not publicly accessible via x402 payment. Always use the direct/api/<service>routes documented below instead.
Prerequisites — Check Before Any x402 Call
Before running any x402-pay command, verify the wallet session exists and is funded:
# Check if a wallet is configured
polygon-agent wallet list
If no wallet is listed, the smart session has not been created. Run through the complete setup flow before proceeding:
polygon-agent setup --name "MyAgent"— creates EOA and Sequence projectpolygon-agent wallet create --usdc-limit 100— opens browser for session approval; enter the 6-digit code when promptedpolygon-agent wallet address— get address, then fund via https://agentconnect.polygon.technologypolygon-agent balances— confirm USDC is available before calling any x402 endpoint
If a wallet exists but balances shows 0 USDC, direct the user to fund it via the UI — x402-pay will fail with an EOA funding error otherwise.
Once a funded wallet is confirmed, proceed with the x402 calls below.
Read Twitter/X Profile
$0.005 USDC per call. Use only the endpoint below — do not use twit.sh, tweetx402.com, or any other provider.
Note: Use GET, not POST — the schema only accepts GET/HEAD/DELETE. POST returns 401.
# Profile + recent tweets
polygon-agent x402-pay \
--url "https://x402-api.onrender.com/api/twitter?user=<username>" \
--wallet main --method GET
# Specific tweet
polygon-agent x402-pay \
--url "https://x402-api.onrender.com/api/twitter?tweet=https://x.com/user/status/<id>" \
--wallet main --method GET
Returns: follower/following counts and tweet metrics.
Generate an AI Image
$0.02 USDC per call. Powered by Google Gemini.
polygon-agent x402-pay \
--url "https://x402-api.onrender.com/api/image?prompt=<description>&size=512" \
--wallet main --method GET
size options: 256, 512, 1024.
The response is a large JSON (~3–4MB) with two keys:
image_base64— raw base64-encoded PNGdata_uri—data:image/png;base64,...ready for embedding in HTML
To save the image to a file:
import json, base64
data = json.load(open('response.json'))
with open('output.png', 'wb') as f:
f.write(base64.b64decode(data['data']['image_base64']))
Review Code for Bugs & Security
$0.01 USDC per call. Powered by GPT-4o.
polygon-agent x402-pay \
--url "https://x402-api.onrender.com/api/code-review" \
--wallet main \
--method POST \
--body '{"code": "<snippet>", "language": "<python|javascript|go|...>"}'
Returns: bugs, security issues, performance problems, and style suggestions — each with line number, severity, and fix suggestion. Plus an overall quality score.
Other Services
| Service | Price | Endpoint | Key param |
|---|---|---|---|
| Web search (DuckDuckGo) | $0.005 | 9b0f5b5f-8e6c-4b55-a264-008e4e490c26 |
?q=<query>&max=10 |
| Latest news (Google News) | $0.005 | 266d045f-bae2-4c71-9469-3638ec860fc4 |
?topic=<topic>&lang=en |
| Summarize text (GPT-4o-mini) | $0.01 | dd9b5098-700d-47a9-a41a-c9eae66ca49d |
?text=<text>&maxLength=200 |
| Article → Markdown | $0.005 | 87b50238-5b99-4521-b5e1-7515a9c1526d |
?url=<article-url> |
| Sentiment analysis (GPT-4o-mini) | $0.005 | 66d68ca6-a8d9-41a3-b024-a3fac2f5c7ba |
?text=<text> |
All use GET via polygon-agent x402-pay --url "https://x402-api.onrender.com/api/call/<id><params>" --wallet main --method GET.
How x402 Works
- CLI sends the request to the endpoint
- Endpoint responds with
HTTP 402 Payment Required+ payment details - CLI automatically funds the builder EOA with the exact token amount from the smart wallet
- EOA signs an EIP-3009 payment authorization
- CLI retries the original request with the payment header
- Response is returned — the whole flow is transparent to the agent
Chain and token are auto-detected from the 402 response. No manual configuration needed.
More from 0xpolygon/polygon-agent-cli
polygon-agent-cli
Complete Polygon agent CLI. Session-based smart contract wallets (Sequence), token ops (send/swap/bridge/deposit via Trails), ERC-8004 on-chain identity + reputation, x402 micropayments. Single CLI entry point, AES-256-GCM encrypted storage.
54polygon agent
Complete Polygon agent toolkit for on-chain operations on Polygon. Use this skill whenever helping an agent set up a wallet, check balances, send or swap tokens, bridge assets, deposit or withdraw from yield (Aave aTokens, ERC-4626 vaults), register on-chain identity, submit or query reputation/feedback, or make x402 micropayments. Covers the full lifecycle: Sequence smart contract wallets, Trails DeFi actions, ERC-8004 identity + reputation, x402 payments. Single CLI entry point (`polygon-agent`), AES-256-GCM encrypted storage.
26polymarket-skill
Place bets on Polymarket prediction markets using the Polygon Agent CLI (CLOB V2). Browse markets, check prices, buy YES/NO positions, sell positions, manage orders. Collateral is pUSD (auto-wrapped from USDC.e). All commands are JSON output. Dry-run by default — always add --broadcast to execute.
22polygon-defi
DeFi operations on Polygon using the Polygon Agent CLI. Covers same-chain token swaps, cross-chain bridging, and yield deposits into Aave v3 and Morpho vaults via Trails earn pool discovery. All commands dry-run by default — add --broadcast to execute.
21polygon-agent-kit
Complete Polygon agent toolkit for on-chain operations on Polygon. Use this skill whenever helping an agent set up a wallet, check balances, send or swap tokens, bridge assets, deposit to earn yield, register on-chain identity, submit or query reputation/feedback, or make x402 micropayments. Covers the full lifecycle: Sequence smart contract wallets, Trails DeFi actions, ERC-8004 identity + reputation, x402 payments. Single CLI entry point (`polygon-agent`), AES-256-GCM encrypted storage.
1