{"slug": "i-built-a-pay-per-call-api-where-the-first-call-costs-nothing", "title": "I Built a Pay-Per-Call API Where the First Call Costs Nothing", "summary": "A developer built Hermes Micro-Agent, a single HTTP endpoint that accepts USDC payments on the Base network and returns task results such as summarization, translation, code review and image description without requiring an account, API key or subscription. The service verifies each USDC transfer on-chain before running any work, returning HTTP 402 with the receiver address and price for unpaid requests, and offers four permanently free utility endpoints (hashing, base64, unit conversion, JSON minification) to break the discovery-versus-usage loop that hides paid-only endpoints. Prices range from $0.10 to $0.25 per task, with an OpenAPI spec, an x402 well-known document and a JSON-RPC interface for pricing and payment verification.", "body_md": "AI agents that need a task done should not need an account, an API key, or an\n\ninvoice. They should be able to pay cents and get the result.\n\nThat is what **Hermes Micro-Agent** does. It is a single HTTP endpoint that\n\naccepts USDC on Base and returns real work — no sign-up, no subscription, no\n\nhuman in the loop.\n\nFour services are free forever. Call them directly:\n\n```\n# SHA-256 hash of any text\ncurl -X POST https://92.5.95.177.sslip.io/free/hash \\\n  -H \"Content-Type: application/json\" -d '{\"prompt\":\"hello world\"}'\n\n# Base64 encode/decode\ncurl -X POST https://92.5.95.177.sslip.io/free/base64 \\\n  -H \"Content-Type: application/json\" -d '{\"prompt\":\"hello\"}'\n\n# Unit conversion (length, weight, temperature, data size)\ncurl -X POST https://92.5.95.177.sslip.io/free/convert \\\n  -H \"Content-Type: application/json\" -d '{\"prompt\":\"10 km to miles\"}'\n\n# Minify a JSON document\ncurl -X POST https://92.5.95.177.sslip.io/free/json_minify \\\n  -H \"Content-Type: application/json\" -d '{\"prompt\":\"{  \\\"a\\\":  1 }\"}'\n```\n\nEach returns `{\"status\":\"success\",\"task\":\"...\",\"result\":\"...\",\"free\":true}`.\n\n```\n# 1. See the price list\ncurl https://92.5.95.177.sslip.io/tasks\n\n# 2. Try a task — you get 402 with the address and the price\ncurl -X POST https://92.5.95.177.sslip.io/task \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"task\":\"summarize\",\"prompt\":\"your text here\"}'\n\n# 3. Pay USDC on Base to the address in the 402, then retry with the tx hash\ncurl -X POST https://92.5.95.177.sslip.io/task \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-Payment: 0x<tx_hash>\" \\\n  -d '{\"task\":\"summarize\",\"prompt\":\"your text here\"}'\n```\n\n**Or call a service by name** — one route per task, so a search for the service\n\nfinds the route:\n\n| Route | Service | Price | \n|---|---|---|\n| `/summarize` | Summarise text | $0.10 | \n| `/extract` | Extract key points | $0.10 | \n| `/keywords` | Find keywords | $0.10 | \n| `/sentiment` | Detect sentiment | $0.10 | \n| `/translate` | Translate | $0.15 | \n| `/rewrite` | Rewrite text | $0.15 | \n| `/proofread` | Proofread | $0.15 | \n| `/code_lint` | Lint Python | $0.15 | \n| `/code_explain` | Explain code | $0.15 | \n| `/code_refactor` | Refactor code | $0.25 | \n| `/code_review` | Review code | $0.25 | \n| `/python_debug` | Debug Python | $0.25 | \n| `/json_query` | Query JSON | $0.15 | \n| `/csv_to_json` | CSV to JSON | $0.15 | \n| `/describe_image` | Describe an image | $0.15 | \n| `/probe_media` | Probe a media URL | $0.15 | \n\n```\nReceiver : 0x078fE079A9440631Bc6AD722D7143dC382b4ea4f\nNetwork  : base (eip155:8453)\nAsset    : USDC  0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\n```\n\nThe USDC Transfer is verified on-chain before any work runs. Unpaid or\n\nunverifiable requests get 402 and nothing executes.\n\n`https://92.5.95.177.sslip.io/openapi.json`\n`https://92.5.95.177.sslip.io/.well-known/x402`\n\n```\n# Price one task\ncurl -X POST https://92.5.95.177.sslip.io/rpc \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"price\",\"params\":{\"task\":\"summarize\"}}'\n\n# Verify a payment\ncurl -X POST https://92.5.95.177.sslip.io/rpc \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"verify\",\"params\":{\"tx_hash\":\"0x...\",\"min_cents\":1000}}'\n```\n\n`describe_image` and `probe_media` fetch URLs — a failed fetch is reported as\n`[fetch failed: HTTP xxx]`, never invented.\nA paid-only endpoint is invisible: discovery directories rank by usage, and\n\nusage requires payment, and payment requires being discovered. The four free\n\nservices break that loop — an agent can call them with no money and no account,\n\nwhich is what makes the paid services reachable in the first place.\n\n```\ncurl -X POST https://92.5.95.177.sslip.io/free/hash \\\n  -H \"Content-Type: application/json\" -d '{\"prompt\":\"hello world\"}'\n```\n\nIf you are building an agent and want a deterministic, pay-per-call endpoint\n\nwith no account and no subscription — this is it.", "url": "https://wpnews.pro/news/i-built-a-pay-per-call-api-where-the-first-call-costs-nothing", "canonical_source": "https://dev.to/reggiebro/i-built-a-pay-per-call-api-where-the-first-call-costs-nothing-3jae", "published_at": "2026-10-23 21:32:33+00:00", "updated_at": "2026-10-23 21:40:02.242704+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "ai-products", "agent-protocols"], "entities": ["Hermes Micro-Agent", "Base", "USDC", "x402"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/i-built-a-pay-per-call-api-where-the-first-call-costs-nothing", "markdown": "https://wpnews.pro/news/i-built-a-pay-per-call-api-where-the-first-call-costs-nothing.md", "text": "https://wpnews.pro/news/i-built-a-pay-per-call-api-where-the-first-call-costs-nothing.txt", "jsonld": "https://wpnews.pro/news/i-built-a-pay-per-call-api-where-the-first-call-costs-nothing.jsonld"}}