{"openapi":"3.1.0","info":{"title":"SWARM","version":"1.0.0","description":"Small services for AI agents, paid per request in USDC on Base over x402. No account, no API key, no subscription.","x-guidance":"SWARM sells six small services, each paid per request in USDC on Base over x402 v2 (no account, no API key). Instant, no AI: POST /services/utilities (UUIDs, hashes, encodings, passwords, timestamps), /services/site-check (is a URL up), /services/read-page (URL to clean text) and /services/code-health (static scan of a public GitHub repo). Researched on the live web: /services/summary (one-page brief, 60-120 s) and /services/report (full report, 2-4 minutes). Each takes the JSON body described in its requestBody schema. Call with no payment first: the 402 reply quotes the price and how to pay. Then repeat the request with the PAYMENT-SIGNATURE header (X-PAYMENT also accepted). Nothing is charged if the request is refused or the work fails. GET /offers lists what can be served right now. Using AgentCash? `npx agentcash add https://swarm-agent.net` adds these services to your agent, paid from your AgentCash wallet.","contact":{"email":"contact@swarm-agent.net"}},"servers":[{"url":"https://swarm-agent.net"}],"paths":{"/services/utilities":{"post":{"operationId":"utilities","summary":"Deterministic utilities","description":"SWARM Utilities - UUIDs, hashes, base64/URL encoding, secure passwords and timestamp conversion. Pick one with `op`. Instant, no AI. $0.02.","tags":["AI","Search","Research"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.020000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"op":{"type":"string","enum":["uuid","hash","base64-encode","base64-decode","url-encode","url-decode","password","timestamp"],"description":"Which utility to run. Anything other than the listed ones is treated as `timestamp`."},"text":{"type":"string","description":"The input for hash, base64-* and url-*."},"n":{"type":"integer","minimum":1,"maximum":100,"description":"How many UUIDs (op=uuid). Default 1."},"algo":{"type":"string","description":"Hash algorithm (op=hash). Default sha256."},"length":{"type":"integer","minimum":4,"maximum":128,"description":"Password length (op=password). Default 16."},"t":{"type":"string","description":"The timestamp to convert (op=timestamp)."}},"required":["op"]},"example":{"op":"uuid","n":2}}}},"responses":{"200":{"description":"The finished work.","content":{"application/json":{"schema":{"type":"object","properties":{"op":{"type":"string","description":"The operation that was run, echoed back."}},"required":["op"],"additionalProperties":true,"description":"Always carries `op`; the rest depends on it — `uuids` for uuid, `hash` for hash, `encoded` or `decoded` for the base64 and url operations, `password` for password."}}}},"402":{"description":"Payment Required"}}}},"/services/code-health":{"post":{"operationId":"code-health","summary":"Code health check","description":"SWARM Code Health - Static health check of a public GitHub repo: TODO/FIXME debt, oversized files, possible committed secrets, README/.gitignore/LICENSE. Requires `repo` (https://github.com/owner/name); repos over 25 MB are refused before payment. $0.05.","tags":["AI","Search","Research"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.050000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"repo":{"type":"string","description":"Public GitHub repository URL, e.g. https://github.com/owner/name."}},"required":["repo"]},"example":{"repo":"https://github.com/expressjs/express"}}}},"responses":{"200":{"description":"The finished work.","content":{"application/json":{"schema":{"type":"object","properties":{"report":{"type":"object","description":"The findings, structured."},"markdown":{"type":"string","description":"The same findings written up as a Markdown report."}},"required":["report","markdown"]}}}},"402":{"description":"Payment Required"}}}},"/services/summary":{"post":{"operationId":"summary","summary":"Research brief","description":"SWARM Research Brief - One-page brief on any topic, researched on the live web at request time, every source linked. Requires `topic`. 60-120 s (allow 180 s). Not billed if it fails. $0.75.","tags":["AI","Search","Research"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.750000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"topic":{"type":"string","minLength":1,"description":"What to research."},"context":{"type":"string","description":"Optional background you already have."},"requirements":{"type":"string","description":"Optional format or angle to follow."}},"required":["topic"]},"example":{"topic":"Stablecoin payment volume on Base over the last 30 days"}}}},"responses":{"200":{"description":"The finished work.","content":{"application/json":{"schema":{"type":"object","properties":{"markdown":{"type":"string","description":"The work itself, in Markdown, with every source linked."},"wordCount":{"type":"integer","description":"Length of the Markdown, in words."},"generatedAt":{"type":"string","format":"date-time","description":"When it was produced."},"topic":{"type":"string","description":"The topic as it was researched."}},"required":["markdown","wordCount","generatedAt","topic"]}}}},"402":{"description":"Payment Required"}}}},"/services/report":{"post":{"operationId":"report","summary":"Research report","description":"SWARM Research Report - Full Markdown report on any topic, researched on the live web, every claim linked to its source. Requires `topic`. 2-4 min (allow 360 s). Not billed if it fails. $0.99.","tags":["AI","Search","Research"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.990000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"topic":{"type":"string","minLength":1,"description":"What to research."},"context":{"type":"string","description":"Optional background you already have."},"requirements":{"type":"string","description":"Optional format or angle to follow."}},"required":["topic"]},"example":{"topic":"The x402 payment protocol: adoption, facilitators and open problems"}}}},"responses":{"200":{"description":"The finished work.","content":{"application/json":{"schema":{"type":"object","properties":{"markdown":{"type":"string","description":"The work itself, in Markdown, with every source linked."},"wordCount":{"type":"integer","description":"Length of the Markdown, in words."},"generatedAt":{"type":"string","format":"date-time","description":"When it was produced."},"topic":{"type":"string","description":"The topic as it was researched."}},"required":["markdown","wordCount","generatedAt","topic"]}}}},"402":{"description":"Payment Required"}}}},"/services/site-check":{"post":{"operationId":"site-check","summary":"Website up check","description":"SWARM Site Check - Website uptime and link check in one call: is a URL up, its HTTP status, final URL after redirects, response time and TLS/certificate errors. Use when an agent monitors sites on a schedule, verifies a link or domain is reachable before scraping or citing it, or needs to detect a non-200 answer or a broken redirect. Requires `url`. Instant, no AI. $0.002.","tags":["AI","Search","Research"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Public http(s) URL, ports 80/443 only, e.g. https://example.com."}},"required":["url"]},"example":{"url":"https://example.com"}}}},"responses":{"200":{"description":"The finished work.","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"The URL as requested."},"up":{"type":"boolean","description":"true if it answered with HTTP 2xx or 3xx."},"status":{"type":["integer","null"],"description":"HTTP status, or null if it did not answer."},"finalUrl":{"type":["string","null"],"description":"Where it ended up after redirects."},"redirects":{"type":"integer","description":"How many redirects were followed (max 5)."},"responseMs":{"type":"integer","description":"Time to the answer, in milliseconds."},"https":{"type":"boolean","description":"Whether the final URL is HTTPS (certificate errors show in `error`)."},"contentType":{"type":"string","description":"Content-Type of the answer."},"title":{"type":"string","description":"The page title, if it is HTML."},"error":{"type":["string","null"],"description":"Why it is down: timed out, ENOTFOUND, a TLS error..."},"checkedAt":{"type":"string","format":"date-time","description":"When it was checked."}},"required":["url","up","status","responseMs","checkedAt"]}}}},"402":{"description":"Payment Required"}}}},"/services/read-page":{"post":{"operationId":"read-page","summary":"Read a web page","description":"SWARM Read Page - Retrieve the content of a URL as clean, LLM-ready text (headings with #, lists with -; menus, scripts, styles and markup removed). Use when an agent needs to read a web page, article or docs page without paying model tokens for raw HTML: on 15 public pages we measured, the text was a median 97% smaller than the HTML (about 67,000 fewer tokens per page). Requires `url`; HTML or text up to 3 MB. Not billed if the page cannot be read. $0.002.","tags":["AI","Search","Research"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Public http(s) URL, ports 80/443 only, e.g. https://example.com."}},"required":["url"]},"example":{"url":"https://example.com"}}}},"responses":{"200":{"description":"The finished work.","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"The URL as requested."},"finalUrl":{"type":"string","description":"Where it ended up after redirects."},"status":{"type":"integer","description":"HTTP status of the page."},"title":{"type":"string","description":"The page title."},"text":{"type":"string","description":"The readable text, headings marked with #, list items with -."},"wordCount":{"type":"integer","description":"Words in `text`."},"truncated":{"type":"boolean","description":"true if the page or the text hit the size limit."},"contentType":{"type":"string","description":"Content-Type of the page."},"fetchedAt":{"type":"string","format":"date-time","description":"When it was read."}},"required":["url","finalUrl","title","text","wordCount"]}}}},"402":{"description":"Payment Required"}}}}}}