{"uid":"cap_MgzZnw-ZU2LEPO8w6iZa5","slug":"urlgate-create-pay-to-open-link-7b3bfa79","name":"URLGate Create Pay-to-Open Link","description":"Turn any URL into a link that charges USDC to open. Built on x402 v2, so AI agents can pay as easily as people.","url":"https://urlgate.xyz/api/urlgate/create?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Destination (http / https) revealed after payment"},"price":{"type":"string","description":"USDC, e.g. \"0.05\". Minimum 0.01, max 6 decimals"},"title":{"type":"string","maxLength":120},"wallet":{"type":"string","description":"Payout wallet (receives 99.7% of opens (0.3% platform fee)). Optional: defaults to the signed-in wallet (or the agent key owner), else the wallet paying the creation fee; any other address is refused (403)"},"afterPay":{"enum":["receipt","redirect"],"type":"string"},"networks":{"type":"array","items":{"type":"string"},"minItems":1,"description":"CAIP-2 ids to sell on: at least one, all from GET /api/v2/networks. Omit for every enabled network. [] → 400 networks_required; a disabled or unknown id → 400 network_unavailable"},"shortcode":{"type":"string","pattern":"^[A-Za-z0-9_-]{3,20}$"},"description":{"type":"string","maxLength":500}}},"responseSchema":{"type":"json","example":{"price":"0.050000","title":"Example article","success":true,"shortUrl":"https://urlgate.xyz/Gp1qJx","createdAt":"2026-01-01T00:00:00.000Z","shortcode":"Gp1qJx","agentCreated":true,"creationMode":"paid","feeBreakdown":{"appliesTo":"each paid open","buyerPays":"0.050000","serviceFee":"0.000150","creatorReceives":"0.049850","creatorPercentage":99.7,"serviceFeePercentage":0.3},"creatorWallet":"0x1111111111111111111111111111111111111111","destinationUrl":"https://example.com/article"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_BJiqDOUnDd3W5qId70eQB","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Wraps any destination URL in a USDC paywall, returning a short link that only reveals the content after payment","exampleAgentPrompt":"Create a URLGate pay-to-open link for https://mydomain.com/exclusive-report that charges 0.05 USDC per open, title it 'Q1 Market Report', and redirect the buyer straight to the page after they pay.","exampleUseCases":[{"title":"Monetize a paywalled article","prompt":"Turn https://myblog.com/premium/deep-dive-ai into a URLGate link that charges 0.10 USDC to open, call it 'AI Deep Dive', and redirect buyers straight to the article after they pay."},{"title":"Sell access to a private file download","prompt":"Create a pay-to-open link for https://downloads.example.com/template.zip that costs 0.25 USDC, title it 'Premium Template Pack', and show a receipt page after payment so buyers can save proof."},{"title":"Agent-accessible paid API endpoint","prompt":"Gate https://api.myservice.io/private/data behind a URLGate link that charges 0.01 USDC per open on the Base network only, so other AI agents can pay and access it automatically."}],"resultDescription":"Returns a JSON object with the shortened pay-to-open URL, unique shortcode, creation timestamp, destination URL, USDC price, fee breakdown showing the 99.7% creator share and 0.3% platform fee, payout wallet address, and a flag indicating whether the link was created by an agent.","failureModes":["400 networks_required — networks array was provided but empty","400 network_unavailable — one or more CAIP-2 IDs are disabled or unrecognized","403 — wallet address supplied does not match the authenticated wallet or agent key owner","402 — creation fee of $0.01 USDC not paid or payment failed","422 — price below minimum 0.01 USDC or more than 6 decimal places","409 — requested shortcode already taken","400 — destination URL is not a valid http/https URI","400 — title exceeds 120 characters or description exceeds 500 characters"],"whenToPreferThis":"Choose this endpoint when you need to monetize access to any URL with per-open USDC micropayments, especially when AI agents are either the creators or expected consumers of the link. It is the right choice over generic URL shorteners when payment gating is required, and over custom smart-contract paywalls when you need instant setup, a hosted short URL, and built-in x402 v2 agent-payment compatibility with automatic fee splitting.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T12:39:46.819Z","isFirstParty":false,"canonicalSlug":"urlgate-create-pay-to-open-link-7b3bfa79"}