Setting up an agent on URLGate
For people who run a bot that creates paid links. The short, technical version for the bot itself is /agents.
Which path is right for you?
| Your bot… | What it costs | Where earnings go | What you need |
|---|---|---|---|
| has its own wallet | Free: 10 links a day (100 with Premium; 3 a day while a wallet is new to URLGate). Then 0.01 USDC per link. | The bot's wallet | The bot signs in with its wallet (a free signature) |
| has no wallet | Free within the daily cap you give its agent key. Then 0.01 USDC per link. | Your wallet | An agent key you create in your dashboard |
| doesn't sign in at all | 0.01 USDC per link, paid in USDC with x402 | The wallet that pays | USDC and an x402 client |
Making links yourself on the website is always free.
Create and revoke an agent key
- Sign in to your dashboard and open Settings → Agent keys.
- Give the key a name (for example the bot's name), a daily cap and an expiry. You can also limit which payment networks its links sell on.
- Copy the key right away: it is shown once. URLGate keeps only a fingerprint of it, so nobody (not even URLGate) can show it to you again.
- Give the key to your bot. It sends it as
Authorization: Bearer ugk_…when creating links. The key can only create links: it can't read your links, change settings or spend money. - To stop the bot, press Revoke next to the key. It stops working immediately. Expired keys stop on their own.
Links made with a key belong to your wallet, and you can see and manage them like any other link. Free plans can have 3 active keys; Premium 20.
Test before going live
URLGate has a free payment check that pretends to pay without moving any money. Run it before your bot buys or sells anything.
On the test network (recommended first)
- Use a wallet on Base Sepolia (eip155:84532) holding test USDC (e.g. faucet.circle.com). Only signatures are needed, no gas.
- Call payment_compat_check on the preview testnet deployment (urlgate-preview) without payment: you get a two-leg PaymentRequired.
- 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.
- verdict "ok" = your client can pay URLGate. Nothing is ever settled.
On production
- Call payment_compat_check on production (https://urlgate.xyz/api/v2/payments/compat-check) without payment: a two-leg PaymentRequired on mainnet (Base).
- 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).
- verdict "ok" = you meet the two-signature requirement: proceed with the real paid tools (open_link with main leg + fee leg).
- 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.
Why opening a link takes two payments
When someone opens a paid link, the price is split: the creator gets 99.7% and URLGate keeps a 0.3% platform fee. Each USDC payment authorization can only go to one recipient, so the buyer signs two at once: the main payment to the creator and the small platform fee to URLGate. Both are from the same wallet, in the same request, and the buyer pays nothing on top of the price. If a bot sends only the main payment, nothing is charged and it is told what's missing (fee_leg_missing). Creating a link and buying Premium are a single payment.
Safety and abuse rules
- Links must follow the Acceptable Use policy. Some domains are blocked outright.
- Bots are rate-limited per wallet, per key and per network address. Creating the same link twice in a few minutes returns the first one.
- New links may be checked against a malware and phishing list in the background. A bad result pauses the link until a moderator looks at it; nothing is deleted automatically.
- Reported links are reviewed by people. If moderators warn about or remove your bot's links, those count as strikes: after 2 the wallet or key can no longer create free links, after 4 it is suspended.
- URLGate can pause free creation for everyone during an attack. Paid creation keeps working.
- See something wrong? Report a link.