URLGate for agents

Create pay-to-open links and earn from every paid open. Pick one of three paths. Machine-readable: /agents?format=json, the free MCP tool get_started, or GET /api/v2/agents/get-started (your live quota when you send credentials).

Three ways to create links

  1. Own wallet: free daily quota

    For: Agents that hold a wallet key. Cost: free: 10 links/day (100 with Premium; 3/day for wallets new to URLGate in their first 24 h). Then 0.01 USDC per link. Earnings: your wallet.

    1. GET https://urlgate.xyz/api/v2/auth/nonce?address=0x… → sign the message (EIP-191) → POST https://urlgate.xyz/api/v2/auth/verify {message, signature, kind:"agent"} → token (MCP: sign_in).
    2. POST https://urlgate.xyz/api/urlgate/agent/create {url, price} with Authorization: Bearer <token> (or a SIGN-IN-WITH-X header). MCP: create_link with token.
    3. The response has freeQuota { limit, used, remaining, resetsAt }. Over quota you get 402 code free_quota_exhausted: pay, upgrade, or wait.
  2. No wallet: agent key from a human

    For: Bots without a wallet, run for someone who has one. Cost: free within the key's daily cap (counts toward the owner's quota). Then 0.01 USDC per link. Earnings: the key owner's wallet.

    1. A human signs in at https://urlgate.xyz/dashboard.html#/settings/agent-keys and creates a key (name, daily cap, expiry, optional networks). It is shown once.
    2. POST https://urlgate.xyz/api/urlgate/agent/create {url, price} with Authorization: Bearer ugk_… (or X-URLGate-Agent-Key). MCP: create_link with token = the key.
    3. The key can only create links. The owner can revoke it at any time.

Free quotas reset at 00:00 UTC. Over quota, every limit error answers with nextSteps: sign_in, use_agent_key, pay_0.01, upgrade, wait.

Test your payments first (free, verify-only)

POST https://urlgate.xyz/api/v2/payments/compat-check or the MCP tool payment_compat_check. Nothing is ever settled.

Testnet

  1. Use a wallet on Base Sepolia (eip155:84532) holding test USDC (e.g. faucet.circle.com). Only signatures are needed, no gas.
  2. Call payment_compat_check on the preview testnet deployment (urlgate-preview) without payment: you get a two-leg PaymentRequired.
  3. Sign BOTH legs (an accepts[] entry + the extensions["platform-fee"].accepts[] entry on the same network) with the same wallet and call it again with both.
  4. verdict "ok" = your client can pay URLGate. Nothing is ever settled.

Production

  1. Call payment_compat_check on production (https://urlgate.xyz/api/v2/payments/compat-check) without payment: a two-leg PaymentRequired on mainnet (Base).
  2. Sign BOTH legs and call it again with both signatures. Verify-only: no funds move (the wallet only needs to hold the 0.001 USDC test amount for verification).
  3. verdict "ok" = you meet the two-signature requirement: proceed with the real paid tools (open_link with main leg + fee leg).
  4. Any other verdict names what to fix (fee_leg_missing, wrong_network, bad_signature, amount_mismatch, ...); fix it and re-run the check before paying.