Idea 05
API Marketplace for AI Agents
An app store where an agent discovers an API and pays per request.
- Category
- Agentic Commerce
- Difficulty
- Intermediate
- Theme
- Agentic Commerce
- Soroban
- USDC
- x402
- MPP
Problem
An agent that needs the latest EUR/USD rate should not need an API key, a subscription, or a Stripe account. Today every API assumes a human set up billing first.
Idea
Developers list an API and a USDC price. The agent finds “FX Oracle API — $0.001/request”, calls it, receives HTTP 402, pays on Stellar, and gets the result. x402 covers one request. MPP covers a high-frequency session.
Why now
Stellar’s x402 path uses Soroban authorization. MPP supports SAC transfers and payment channels, which fits agents that call the same API hundreds of times.
User story
A developer lists an FX endpoint at $0.001. An agent discovers it, pays the 402, and reads the rate. No key is issued.
Architecture
01
Developer lists an API and a USDC price
02
Agent discovers the listing
03
HTTP request returns 402
04
Agent pays on Stellar
05
Service returns the result
MVP
- A listing with name, endpoint, asset, and price.
- The API returns HTTP 402 with machine-readable payment terms.
- An agent pays through Stellar and retries.
- The service returns the payload after payment.
- Support x402 for one request and MPP for a session.
Soroban contracts
Catalog
Registers endpoint, price, asset, and seller.
Receipt
Records that a payment authorized a response.
Stellar features
- HTTP 402 with Soroban auth via x402
- MPP charge for per-request SAC transfer
- MPP session channels for high-frequency calls
Suggested integrations
- x402
- MPP
- USDC
- @stellar/mpp
Build sequence
01
Listing
A catalog entry: endpoint, USDC price, seller address.
02
402 + x402
One endpoint that challenges, gets paid, and returns data.
03
MPP session
A second path that opens a channel for repeated calls.
04
Agent demo
An agent discovers the FX API and pays without an API key.
Stretch goals
- Reputation, discovery, SLA history, and a machine-readable service manifest.