How to Price Your API for AI Agents: The Complete Guide
Pricing for human customers is well-understood. Pricing for AI agents requires a completely different mental model.
Why Agent Pricing Is Different
Human buyers:
- Have budgets approved by committees
- Pay monthly/annually via credit card
- Need sales demos, contracts, procurement
- Churn when budget gets cut
Agent buyers:
- Have wallets with USDC
- Pay per transaction (micropayments)
- Discover via llms.txt/agents.json
- Pay instantly via x402 (HTTP 402)
- Zero human intervention
The Three Pricing Models
1. Per-Call (Recommended for Agents)
Price: $0.05 per API call
Free tier: 5 calls/day per IP
Pros: Fair, scalable, agents love it
Cons: Revenue unpredictable at low volume
2. Subscription + Overage
Base: $29/month for 1,000 calls
Overage: $0.03/call
Pros: Predictable revenue
Cons: Agents hate subscriptions, hard to cancel programmatically
3. Dynamic/Usage-Based
@monetize(price_usd=dynamic_price)
async def dynamic_endpoint(data):
price = calculate_price(
compute_cost=data.complexity,
latency_requirement=data.latency_requirement,
data_freshness=data.freshness_requirement
)
return {"price": price, "result": process(data)}
Pros: Optimal price discrimination
Cons: Complex, agents need predictable pricing
The $0.05 Sweet Spot
After testing, $0.05/call hits the sweet spot:
| Tier | Price | Daily Limit | Best For |
|---|---|---|---|
| Free | $0.00 | 5 calls/IP | Testing |
| Basic | $0.005 | 100 calls | Light agents |
| Premium | $0.05 | Unlimited | Production agents |
Why $0.05?
- Low enough for experimentation
- High enough to cover compute + margin
- Beats Stripe (2.9% + $0.30) for micro-transactions
- Becomes the market benchmark
The Volume Discount Trap
Don't offer volume discounts to agents.
Agents can spin up multiple identities:
- "1000 calls for $40" = agent spins up 10 identities
- Pays $40 for $50 value
- You lose revenue
Per-call pricing is identity-proof (mostly).
Dynamic Pricing (Advanced)
Next evolution: price per call based on:
@monetize(price_usd=dynamic_price)
async def dynamic_endpoint(data):
price = calculate_price(
compute_cost=data.complexity,
latency_requirement=data.latency_requirement,
data_freshness=data.freshness_requirement
)
return {"price": price, "result": process(data)}
Factors:
- Compute cost (heavy ops = higher price)
- Latency tier (fast lane = premium)
- Data freshness (real-time = premium)
- Agent reputation (trusted agents = discount)
The Free Tier Strategy
Free tier = acquisition funnel, not charity.
| Tier | Calls/Day | Purpose |
|---|---|---|
| Free | 3-5 | Acquisition, testing |
| Paid | Unlimited | Production |
Don't make free tier too generous. 5 calls/day -> agents test 5x and leave. Reduce to 3 calls/day for new APIs.
Price Discovery for Agents
Agents discover prices via:
-
llms.txt-- Lists your services + prices -
agents.json-- Schema.org Offer with price -
openapi.json-- With x-402-pricing extensions - x402 challenge response -- Real-time quote
Make all three consistent.
The Payment Protocol
Agents pay via x402 (HTTP 402):
- Agent calls your endpoint
- Your API returns HTTP 402 with price + wallet
- Agent pays USDC on Base (gasless, EIP-3009)
- Agent retries with signed receipt
- You return 200 OK
Live Example
Our parser API generates these files automatically:
Result: 2 agents found us organically, paid $0.125 total.
One-Line Integration
pip install nano-empire-tollbooth
from nano_empire_tollbooth import monetize
@monetize(price_usd=0.05)
@app.post("/api/your-endpoint")
async def your_endpoint(data: dict):
return {"result": your_logic(data)}
The SDK generates all three discovery files automatically.
Proof It Works
Our proof chain: $0.125 from 2 agents, 5 calls
View Live Proof Chain ->
Get Started
pip install nano-empire-tollbooth
The SDK generates all three discovery files + x402 middleware + proof chain.
Live proof: https://api.nanoempireai.com/proof/summary
*SDK: pip install nano-empire-tollbo
How to Price Your API for AI Agents: The Complete Guide
Pricing for human customers is well-understood. Pricing for AI agents requires a completely different mental model.
Why Agent Pricing Is Different
Human buyers:
- Have budgets approved by committees
- Pay monthly/annually via credit card
- Need sales demos, contracts, procurement
- Churn when budget gets cut
Agent buyers:
- Have wallets with USDC
- Pay per transaction (micropayments)
- Discover via llms.txt/agents.json
- Pay instantly via x402 (HTTP 402)
- Zero human intervention
The Three Pricing Models
1. Per-Call (Recommended for Agents)
Price: $0.05 per API call
Free tier: 5 calls/day per IP
Pros: Fair, scalable, agents love it
Cons: Revenue unpredictable at low volume
2. Subscription + Overage
Base: $29/month for 1,000 calls
Overage: $0.03/call
Pros: Predictable revenue
Cons: Agents hate subscriptions, hard to cancel programmatically
3. Dynamic/Usage-Based
@monetize(price_usd=dynamic_price)
async def dynamic_endpoint(data):
price = calculate_price(
compute_cost=data.complexity,
latency_requirement=data.latency_requirement,
data_freshness=data.freshness_requirement
)
return {"price": price, "result": process(data)}
Pros: Optimal price discrimination
Cons: Complex, agents need predictable pricing
The $0.05 Sweet Spot
After testing, $0.05/call hits the sweet spot:
| Tier | Price | Daily Limit | Best For |
|---|---|---|---|
| Free | $0.00 | 5 calls/IP | Testing |
| Basic | $0.005 | 100 calls | Light agents |
| Premium | $0.05 | Unlimited | Production agents |
Why $0.05?
- Low enough for experimentation
- High enough to cover compute + margin
- Beats Stripe (2.9% + $0.30) for micro-transactions
- Becomes the market benchmark
The Volume Discount Trap
Don't offer volume discounts to agents.
Agents can spin up multiple identities:
- "1000 calls for $40" = agent spins up 10 identities
- Pays $40 for $50 value
- You lose revenue
Per-call pricing is identity-proof (mostly).
Dynamic Pricing (Advanced)
Next evolution: price per call based on:
@monetize(price_usd=dynamic_price)
async def dynamic_endpoint(data):
price = calculate_price(
compute_cost=data.complexity,
latency_requirement=data.latency_requirement,
data_freshness=data.freshness_requirement
)
return {"price": price, "result": process(data)}
Factors:
- Compute cost (heavy ops = higher price)
- Latency tier (fast lane = premium)
- Data freshness (real-time = premium)
- Agent reputation (trusted agents = discount)
The Free Tier Strategy
Free tier = acquisition funnel, not charity.
| Tier | Calls/Day | Purpose |
|---|---|---|
| Free | 3-5 | Acquisition, testing |
| Paid | Unlimited | Production |
Don't make free tier too generous. 5 calls/day -> agents test 5x and leave. Reduce to 3 calls/day for new APIs.
Price Discovery for Agents
Agents discover prices via:
-
llms.txt-- Lists your services + prices -
agents.json-- Schema.org Offer with price -
openapi.json-- With x-402-pricing extensions - x402 challenge response -- Real-time quote
Make all three consistent.
The Payment Protocol
Agents pay via x402 (HTTP 402):
- Agent calls your endpoint
- Your API returns HTTP 402 with price + wallet
- Agent pays USDC on Base (gasless, EIP-3009)
- Agent retries with signed receipt
- You return 200 OK
Live Example
Our parser API generates these files automatically:
Result: 2 agents found us organically, paid $0.125 total.
One-Line Integration
pip install nano-empire-tollbooth
from nano_empire_tollbooth import monetize
@monetize(price_usd=0.05)
@app.post("/api/your-endpoint")
async def your_endpoint(data: dict):
return {"result": your_logic(data)}
The SDK generates all three discovery files automatically.
Proof It Works
Our proof chain: $0.125 from 2 agents, 5 calls
View Live Proof Chain ->
Get Started
pip install nano-empire-tollbooth
The SDK generates all three discovery files + x402 middleware + proof chain.
Live proof: https://api.nanoempireai.com/proof/summary
SDK: pip install nano-empire-tollbooth
Top comments (0)