Lumière PayCheck Free API key

Payments on Base + Solana + Keeta + Tempo, cards via Stripe

Spending Limits for AI Agents That Pay for APIs

· updated · 4 min read

To limit what an AI agent spends on x402 APIs, combine three things: a per-payment cap in your x402 client, a check of each seller before paying, and per-agent spend limits. Recent x402 clients add a default cap (starting with @x402/core 2.23, $1 per payment unless you change it), and Lumière PayCheck covers the other two: a free check before every payment, and agent keys with spend limits in its paid plans.

This article explains how to keep spending predictable when building AI agents that interact with paid APIs. We will cover the technical checks, the account settings, and the verification steps needed to maintain control over your agent’s expenses.

Why Agents Need Spending Limits

x402 is a protocol where an API returns a 402 Payment Required response. This response includes a quote with a price, network, token, and payout wallet. The client signs a payment for that amount and sends it in a header with the retried request. The API then returns the data.

There is no account, API key, or invoice involved in x402 itself. A per-payment cap stops one huge charge, but it can't tell a reliable seller from a broken one, or stop many small payments adding up. Without a limit, an agent might pay for a malicious or broken endpoint. Developers need a system to verify the quote before the money moves.

> For teams: PayCheck plans: scoped agent keys, spending limits, approvals, signed receipts and a full audit trail.

> Free tool: x402 endpoint checker: paste any x402 URL to see its grade, uptime, price and payout-wallet history before your agent pays it.

Step 1: Check Endpoints Before Paying

The most effective way to set a spending limit is to filter out bad endpoints before your agent pays them. Lumière PayCheck monitors over 146,000 x402 endpoints. It checks if the 402 quote is valid and if the payout wallet is stable.

Your agent should call the free check-payment endpoint before making any payment. Use the POST /v1/check-payment endpoint with the URL, amount, and payTo from the 402 quote. This returns an allow true or false answer with reasons. If the verdict is avoid, your agent should not pay. The caution verdict means the endpoint is not fully confirmed yet, but it does not mean you must never pay. Only avoid means do not pay.

You can also use the GET /v1/score?url=<endpoint> endpoint for a quick grade. This gives you a score from 0 to 100 and a verdict. Use these tools in your agent logic to enforce a hard limit on risky endpoints.

Step 2: Use Agent Keys with Spend Limits

If you want to cap the total money an agent can spend, use the Lumière PayCheck plans. The Builder plan costs $9 per month. It includes three agent keys with spend limits, signed receipts and a 30-day audit trail. This is useful for small projects where you need strict budget control.

The Business plan costs $49 per month. It includes 25 agent keys, human review for anomalies, and a one-year audit trail you can export as CSV. These plans help you track spending across multiple agents.

To get started, visit the free API key page to generate your keys. You can also start a 30-day team trial to test the features.

Step 3: Verify Delivery with Paid Tests

A payment receipt only shows that a payment happened. It does not prove the API delivered the right data. To protect your budget, you need to know if the endpoint works.

Lumière PayCheck makes real paid test calls to confirm an endpoint delivers what it advertises. This is marked as "Paid and delivered." Every paid test PayCheck makes itself has a signed receipt with an Ed25519 signature. These receipts are public at GET /v1/test-receipts?url=<endpoint>.

Agents can report the outcome of their payments using the MCP tool report_outcome. This helps the system learn which endpoints are reliable. Sellers whose endpoints cost more than our tester pays on its own can fund a paid test of their own endpoint, so buyers see a confirmed result.

Step 4: Monitor Wallets and Prices

Spending limits also involve watching for changes that could increase costs. PayCheck flags payout-wallet changes, which might indicate a hijack. It also flags price increases and lookalike sellers who try to trick agents.

The system screens wallets against the OFAC sanctions list. This protects you from paying illegal addresses. You can check the 30-day volume and the number of independent buyers for any endpoint. This data helps you decide if an endpoint is stable enough for your budget.

Use the MCP server or the npm package lumiere-paycheck-mcp to access these tools. The tools include check_endpoint, check_payment, and report_outcome. You can also use top_endpoints and catalog_stats to see market trends.

FAQ

What happens if an endpoint has a caution verdict? Caution means the endpoint is not fully confirmed yet. It does not mean you must never pay. You should review the score and reasons before deciding. Avoid is the only verdict that means do not pay.

How do I set a hard dollar limit for my agent? Use the Builder or Business plans to create agent keys with spend limits. The Builder plan costs $9 per month for three keys. The Business plan costs $49 per month for 25 keys. These keys help you cap total spending.

Does PayCheck hold my money? No. Lumière PayCheck never moves your money. It doesn't process, route or hold your payments; it checks endpoints before you pay and records the decision.

Start checking your x402 endpoints for free at https://lumierepaycheck.org/.

Check an endpoint before your agent pays it. Free grades and allow-or-deny checks: lumierepaycheck.org · Every x402 endpoint, graded · Docs

More from the blog