DEV Community

FreeTier
FreeTier

Posted on

Pay-per-call endpoints for AI agents: model prices, MCP servers, holidays, page checks (x402, USDC on Base)

Disclosure: I built this with help from AI tools, and it is my own paid service. Prices and limits below are what the API charges today.

I run a small pay-per-call API for AI agents: FreeTier Agent API. There's no signup and no API key. Your agent calls an endpoint, gets HTTP 402 with x402 payment requirements, pays a few cents in USDC on Base, and gets JSON. If the request fails on my side, the payment isn't settled.

This week I added 19 endpoints. Each one is built on data that may legally be reused, and every response has a sources field so the agent can see where the answer came from.

Endpoint Price What it returns
/api/llm-pricing $0.001 List prices for ~3,000 models (per 1M input/output/cached tokens, context window, vision/tools flags), plus verified free tiers
/api/llm-cost $0.001 Cost of one job across up to 15 models; tokens from counts or estimated from text
/api/mcp-servers $0.001 Search 4,259 MCP servers by keyword, category, language, OS, official flag
/api/page-check $0.001 Status, title, meta, canonical, plus an "agent-friendliness" score (llms.txt, sitemap, JSON-LD, AI-crawler rules in robots.txt)
/api/link-check $0.001 Status and redirects for up to 20 URLs
/api/page-markdown $0.001 Page → clean Markdown (respects robots.txt)
/api/country $0.001 ISO codes, currency, languages, time zones, current local time
/api/holidays $0.001 Public holidays 2026-2027 by country, or "is this date a holiday?"
/api/currency $0.001 ECB daily reference rates (~30 currencies), any pair between them
/api/base-gas $0.001 Current Base gas price and block, from public RPCs
/api/email-verify $0.001 Syntax, MX/DNS, disposable-domain and role-address flags. No SMTP probing, nothing stored
/api/extract-json $0.001 Messy text + JSON Schema in, typed JSON out (small LLM on Workers AI, heuristic fallback)
/api/x402-services, /api/agent-tools $0.001 Search ~8,900 x402 APIs and 4,259 MCP servers
/api/dump/* $5-$9 Full JSON dumps: MCP directory, model pricing, world reference

Free, no payment needed: /api/mcp-servers/sample, /api/llm-pricing/sample, /api/x402-services/sample, /openapi.json, /llms.txt, /.well-known/x402. There is also a remote MCP server at /mcp (listed in the official MCP Registry). Its paid tools return the x402 payment details.

Where the data comes from

  • Model prices: BerriAI/litellm price table (MIT). These are list prices, so check the provider's page before you commit real spend.
  • MCP servers: punkpeye/awesome-mcp-servers (MIT).
  • Countries and time zones: GeoNames (CC BY 4.0).
  • Holidays: python-holidays (MIT). Lunar and decree-based dates can move.
  • Currency: the European Central Bank daily reference rates.
  • x402 service list: nohumans.directory (CC BY 4.0).
  • Disposable email domains: disposable-email-domains (CC0).
  • The page tools only fetch public URLs and send an identifying User-Agent. /api/page-markdown also refuses pages that robots.txt disallows.

No personal data anywhere.

Try it

curl -i "https://freetier-agent-api.pages.dev/api/llm-cost?models=gpt-4o-mini,claude-sonnet-4-5&input_tokens=1000&output_tokens=500&calls=1000"
# -> 402 + PAYMENT-REQUIRED header; pay with any x402 client (@x402/fetch, x402 for Python)
Enter fullscreen mode Exit fullscreen mode

It runs on Cloudflare Pages' free plan, with the data bundled into the worker. Settlement goes through public facilitators, so there are no keys on my side. The endpoints are listed on x402scan, x402dash, 402index and nohumans.directory.

What would you want an agent to be able to buy for a cent? Tell me in the comments. I only add data I can cite.

Want every kit? The All-Access Bundle has 147 kits for $39 (card/PayPal guest checkout).

Top comments (0)