MeterCall DOCS Get an API key

Examples

Six integrations, copy-paste-ready. Every snippet uses real module slugs and real endpoints.

1. Build a Bloomberg replacement #

Bloomberg charges $24k per terminal per year. With the bloomberg-replacement module you pay per lookup.

curl -X POST https://metercall.ai/v1/module/bloomberg-replacement/call \
  -H "Authorization: Bearer mc_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "action": "quote",
    "symbol": "NVDA",
    "fields": ["price", "volume", "pe", "news"]
  }'

Response includes price, 24h volume, P/E, and the three latest news links. Cost: $0.003 per quote.

2. Route a Stripe charge through MeterCall #

Use stripe-replacement to keep a single metered surface even if you later swap providers (Adyen, Checkout.com). The module forwards to Stripe and logs a receipt on your side.

curl -X POST https://metercall.ai/v1/module/stripe-replacement/call \
  -H "Authorization: Bearer mc_live_..." \
  -H "Idempotency-Key: order-98231" \
  -d '{
    "action": "charge",
    "amount": 4900,
    "currency": "usd",
    "source": "pm_card_visa",
    "description": "Pro plan, monthly"
  }'

3. Agent-pays-agent via x402 #

An orchestrator agent (Buyer) calls a specialist agent's module (Seller). Seller is paid directly, MeterCall takes a 20% toll.

# 1) Buyer hits the endpoint with no payment
curl -i -X POST https://metercall.ai/v1/module/legal-brief-writer/call \
  -d '{"action":"summarize","url":"https://example.com/contract.pdf"}'
# → 402 Payment Required  X-Price-Cents: 12  X-Nonce: n_abc...

# 2) Buyer signs the payment blob & retries
curl -X POST https://metercall.ai/v1/module/legal-brief-writer/call \
  -H "X-Payment: eyJ2ZXIiOiJ4NDAyLjEi..." \
  -d '{"action":"summarize","url":"https://example.com/contract.pdf"}'
# → 200 OK with result + signed receipt. Seller is paid $0.096, MeterCall $0.024.

See Agent-pay for the full handshake.

4. Notion replacement with your OpenAI key #

Some modules support BYO-key — you supply your own upstream credential and only pay MeterCall's thin toll.

curl -X POST https://metercall.ai/v1/module/notion/call \
  -H "Authorization: Bearer mc_live_..." \
  -H "X-BYO-Key: sk-openai-abc123..." \
  -d '{
    "action": "smart_create_page",
    "database": "db_01HY...",
    "prompt": "Draft a launch retro for the Q2 release",
    "model": "gpt-4.1"
  }'

The BYO-key header is never logged and never leaves the module's process.

5. Fire an alert on spend > $100 #

curl -X POST https://metercall.ai/api/alerts \
  -H "Authorization: Bearer mc_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Spend cap",
    "metric": "spend_cents",
    "op": ">",
    "threshold": 10000,
    "window": "month",
    "channel": "webhook",
    "target": "https://acme.co/hooks/metercall"
  }'

When you cross $100 in a calendar month, MeterCall POSTs an alert.triggered event (see Webhooks).

6. Embed a module iframe #

Every module has an optional hosted UI at /embed/:slug. Drop it anywhere:

<iframe
  src="https://metercall.ai/embed/weather?key=mc_pub_abc&theme=dark"
  width="400"
  height="240"
  loading="lazy"
  allow="payment"></iframe>

Use a publishable key (mc_pub_) — secret keys (mc_live_) should never land in HTML. The embed posts call.made events to its parent via postMessage.

Want more?Open the module catalog and click Try it on any module — it generates a ready-to-run curl for you.