Selling LLM Inference Per-Call to AI Agents: 99% Margin With x402
Description and use
Providing LLM inference per call with a 99 % margin via x402, where agents pay 0.02 USDC per request and the service automatically handles payments and returns JSON responses.
Problem
Providing high‑margin, payment‑gated LLM inference services to AI agents without building a full billing system.
Outcome
The service runs on a $4/month VPS, costs ~$0.0001 per call, and charges 0.02 USDC, yielding >99% margin. No billing system or accounts are required.
Workflow
- 1. Agent sends POST to /analyze with product and text.
- 2. API responds 402 with payment requirements.
- 3. Agent pays 0.02 USDC on Base and retries with PAYMENT‑SIGNATURE header.
- 4. API forwards request to cheap LLM, receives result.
- 5. API returns strict JSON to agent.
- 6. PayAI facilitator settles payment automatically.
Evidence
My cost per call is roughly $0.0001; the price is $0.02. That's a >99% margin
Day one, zero paying callers across all three services.
- Record date: 2026-09-13T10:17:03.945Z