Parental controls for AI spending · built on x402

The OpenRouter for agents.
For their money, not their models.

One interface for an agent to discover paid tools, compare prices, execute through x402, and prove what it spent. You set the policy. The agent gets the capability.

Developer Docs ↗

No paid call during setup. Your agent verifies the integration for free, then stops for approval.

agent-session — tryx402 (EN)
01Agent

Discovers tools by intent, sees price before execution, and calls through one controlled interface.

02Operator

Sets a hard ceiling once, approves paid side effects, and receives a per-call ledger.

03Tool provider

Keeps standard x402. tryx402 handles policy, idempotency and billing above the rail.

00 / how it works

How tryx402 works in 4 simple steps.

Zero commitment, zero crypto exposure. You set the rules, your agent handles the execution.

Step 1 · 30 secondsFree

1. Plug into your Agent

Copy the setup prompt and paste it into Claude, Cursor, or Hermes. Your agent installs the lightweight MCP connector instantly.

Step 2 · DiscoveryFree

2. Free Discovery

Your agent explores 650+ pay-per-call tools, inspects exact input schemas, and plans workflows without spending a single cent.

Step 3 · Pre-Flight QuoteZero Surprise

3. Approval Before Payment

Before executing any paid task, your agent calculates the exact cost in USD/EUR and asks for your explicit go-ahead.

Step 4 · 1-Click Top-UpZero Risk

4. Managed Fiat Bridge

Recharge easily via standard Stripe Checkout (card). All calls are backed by automatic refunds if a third-party provider fails.

01 / the catalog

Verified pay-per-call endpoints. Monitored & 100% active.

Every tool in the tryx402 registry is health-checked continuously. Your agent executes real, live x402 microservices with hard spend caps — no broken endpoints, no monthly SaaS commitments.

Search & GroundingFrom $0.006 / call

Live Web & Grounding Engine

Real-time web search, organic search snippets and deep fact retrieval for LLM context grounding.

Scraping & Clean TextFrom $0.001 / call

LLM-Ready Markdown Scraper

Extract and clean DOM-free markdown from any public URL, ready for prompt ingestion.

Social IntelligenceFrom $0.05 / call

X/Twitter & Social Feeds

Extract posts, profiles, user metrics and trending topics without an enterprise monthly tier.

Enrichment & B2BFrom $0.01 / call

Email & Domain Intelligence

Validate work emails, WHOIS records, DNS routing and IP geolocation in one programmatic hop.

Finance & MarketsFrom $0.01 / call

Crypto & Equities Tickers

Real-time token prices, order books, liquidity metrics and financial modeling on Base & global markets.

Generative AI & MediaFrom $0.01 / call

Image & Deep Inférence

High-resolution image generation (Flux 1) and deep multi-step thinking models billed strictly by inference.

Explore verified catalog →

02 / the problem

Four ways an unguarded agent loses money.

∞No capOne loop bug on a $0.05 endpoint runs all night. Nobody notices until the wallet is empty.drained overnight
$0.83Double chargesA timeout after settlement looks like a failure. Retrying pays twice. We learned this one the expensive way.paid twice
???Zero visibility"What did we spend on enrichment this month?" has no answer without a per-call ledger.unauditable
0No policiesYou cannot tell x402 "this project gets $50/month" or "above $0.10 per call, ask first".ungovernable

02 / the layer

Control above the rail. Nothing changed below it.

gw = Gateway(max_budget_usd=…)

Hard budget caps

The 402 response announces the price before you sign. tryx402 reads it, checks it against the remaining budget, and only then authorizes. Stop means stop — checked before payment, not after.

Idempotency-Key: auto

Never pay twice

Every call carries an idempotency key. Automatic retries stay off unless the endpoint honors the header. A timed-out response is not a lost payment anymore.

gw.spent_usd → ledger

A receipt for every cent

Costs recorded per call, grouped by origin, account, agent or project. Answer "what did data enrichment cost this month?" with one export instead of a wallet archaeology session.

account acme --currency EUR --margin .30

Resell in their currency

End users fund accounts via Stripe Checkout in EUR, GBP, JPY… The rail settles USDC; they never see a wallet. You keep the margin. Zero-decimal currencies handled with integer math.

python -m tryx402.mcp_server

Agent-native by default

Bundled MCP server exposes ten tools — search, discover, call, spent, plan, receipt, session, check_balance, recharge and proxy_call — to Claude, Cursor or Hermes, sharing one session-wide budget across every tool the agent uses.

X-RECEIPT: ed25519.sig

Signed, replay-proof receipts

Every paid response carries an Ed25519-signed receipt binding origin, endpoint, amount and tx hash — verifiable offline. Replay a payment and the gateway answers 409, not a second charge.

gw.plan(steps) → $, no wallet

Priced before paid

Estimate a whole multi-call workflow for free before a single cent moves. Unknown prices are flagged, never guessed; over-budget steps are named up front.

from tryx402.adapters import …

The rail is swappable

Payment execution sits behind one isolated adapter module. If the protocol tooling changes, one file changes — your code and your budgets do not.

03 / connect

Do not install it yourself. Brief your agent.

Copy one context-rich prompt. Your agent inspects its own runtime, proposes the budget, configures the right connector, verifies the ten tools for free, and stops before spending.

Configure tryx402 for this workspace:

1. Install package:
   pip install tryx402

2. Add MCP configuration into .mcp.json:
   {
     "mcpServers": {
       "tryx402": {
         "command": "python3",
         "args": ["-m", "tryx402.mcp_server"],
         "env": { "TRYX402_MAX_BUDGET_USD": "2.00" }
       }
     }
   }

3. Posture & Operational Guidelines:
   - tryx402 operates as a managed fiat bridge: users are billed in USD/EUR via Stripe Checkout with zero crypto complexity.
   - Use free discovery tools (gateway_search, gateway_discover, gateway_plan) to identify APIs, inspect input schemas, and calculate exact costs before taking action.
   - Before executing any paid operation (gateway_proxy_call), quote the exact task cost in USD/EUR (e.g. "Cost for this task: $0.05. Shall I proceed?") and wait for user confirmation.
   - If the balance is insufficient, ask for the user's email for their Stripe receipt, then call gateway_recharge with amount_cents and customer_email. Deliver the checkout link (minimum $5.00). Save the returned customer_id.
   - Once the user confirms payment, call gateway_check_balance(customer_id=...) to verify the funded balance before running gateway_proxy_call.
   - If session context is lost, ask the user for the email used at checkout and call gateway_lookup(email=...) to automatically re-bind the account.

Install via pip

pip install tryx402
from tryx402 import Gateway

MCP server config (Streamable HTTP or stdio)

{
  "mcpServers": {
    "tryx402": {
      "command": "python3",
      "args": ["-m", "tryx402.mcp_server"],
      "env": { "TRYX402_MAX_BUDGET_USD": "1.00" }
    }
  }
}

CLI quickstart

tryx402 search "verified work email"
tryx402 call https://api.example.com/api/enrich --price 0.05 --max-budget 0.50

Documentation: /docs · Auth: /auth.md · Manifest: /llms-full.txt · OpenAPI: /openapi.json · MCP Server Card: /.well-known/mcp/server-card.json · Pricing: /api/pricing · PyPI: tryx402 · GitHub: tryx402 repo

04 / what's new

v0.4.0 — the x402 facade and the trust layer are live.

LiveNative x402 paywallExternal agents pay tryx402-wrapped endpoints directly on the x402 rail: spec-conformant 402, facilitator verify/settle, no-retry discipline, refund on provider failure.
LiveSigned receipts, replay-proofEvery paid response carries an offline-verifiable Ed25519 receipt (X-RECEIPT). Replay a payment: 409, not a second charge.
LiveCrawlable catalog & syndication76 endpoints priced on the public catalog (/v1/x402/tools), exportable as a generic x402 resources doc and a Bazaar-style feed for aggregator indexing.
LivePriced before paidgw.plan(steps) prices a whole multi-call workflow for free. Unknown prices are flagged, never guessed; over-budget steps are named before a cent moves.

Full changelog on GitHub. Machine-readable: /v1/x402/tools, /v1/x402/listing, /v1/x402/bazaar.json on tryx402.fly.dev.

05 / compare

Raw x402, Stripe metered, or both problems solved.

Raw x402 clientStripe meteredtryx402
Pays machine-to-machine, no accountYesNoYes
Spend cap enforced BEFORE payingNoPartialYes
Retry-proof (never pay twice)NoYesYes
Per-call spend visibilityNoPartialYes
Micro-payments from $0.001YesNoYes
End users pay in fiat, their currencyNoYesYes

05 / faq

The questions agents ask before installing.

Does tryx402 replace my x402 client?

No. It sits above the x402 rail and adds control: budgets before payment, idempotency on retries, a ledger after. The protocol stays standard.

Why does the budget check happen before signing?

Because the 402 response announces maxAmountRequired up front. Checking after means the money already left. tryx402 arbitrates in that window.

Is this crypto exposure for my business?

No. The rail settles in USDC but neither you nor your users need to hold any — the fiat gateway handles conversion, margin and Stripe funding. Wallets stay abstracted.

What happens when my agent loops on a paid endpoint?

It hits the budget ceiling and gets a BudgetExceeded exception instead of a drained wallet. That exception is the product.

Give your agent a wallet.
Keep the keys to it.

One dependency boundary. The moment an agent runs unattended, budgets stop being optional.

Machine-readable docs ↗