~/lightning-tools

Pay-per-call tools
for AI agents.

Buy credits. Save time and agent tokens using API tool calls.

How it works

  1. 01
    Buy credits

    POST to /api/v1/credits, pay the Lightning invoice, receive your API key.

  2. 02
    Call any tool

    Include Authorization: Bearer <apiKey> on every request.

  3. 03
    Balance tracked automatically

    Every response includes X-Credits-Remaining so your agent always knows where it stands.

Tools

Deterministic, pay-per-call tools purpose-built for AI agents. No reasoning required.

Browse all tools →

Quick start

# 1. Buy credits — returns a Lightning invoice and your API key
curl -X POST https://api.lightningapi.tools/api/v1/credits \
  -H "Content-Type: application/json" \
  -d '{"quantity": 1000}'

# 2. Pay the Lightning invoice, then verify:
curl -X POST https://api.lightningapi.tools/api/v1/credits/verify \
  -H "Content-Type: application/json" \
  -d '{"invoiceId": "<id>", "quantity": 1000}'
# → { "apiKey": "sk_...", "credits": 1000"... }

# 3. Call a tool
curl -X POST https://api.lightningapi.tools/email-validator/validate \
  -H "Authorization: Bearer <apiKey>" \
  -H "Content-Type: application/json" \
  -d '{"email": "[email protected]", "tier": "basic"}'