{"openapi":"3.1.0","info":{"title":"SWARM","version":"1.0.0","description":"Research services paid per request in USDC on Base over x402. No account, no API key, no subscription.","x-guidance":"SWARM researches a topic on the live web and returns Markdown with every source linked. Two products: POST /services/summary for a one-page brief (typically 60-120 s), and POST /services/report for a full report (typically 2-4 minutes, never cut short). Both take a JSON body with a required `topic`, plus optional `context` (background you already have) and `requirements` (a format or angle to follow). Call the endpoint with no payment first: the 402 reply quotes the price and how to pay over x402 v2 (USDC on Base). Then repeat the request with the PAYMENT-SIGNATURE header (x402 v2; X-PAYMENT also accepted); the work comes back in the `markdown` field. GET /offers lists what can be served right now.","contact":{"email":"contact@swarm-agent.net"}},"servers":[{"url":"https://swarm-agent.net"}],"paths":{"/services/utilities":{"post":{"operationId":"utilities","summary":"Deterministic utilities","description":"UUIDs, hashes, base64, URL encoding, secure passwords and timestamp conversion. Deterministic, no inference, answers immediately. POST {\"op\":\"uuid\",\"n\":2}.","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":"Static scan of YOUR public GitHub repo: TODO/FIXME debt, oversized files, stray console.log, possible hardcoded secrets (heuristic), README/.gitignore/LICENSE. Deterministic, no AI. POST {\"repo\":\"https://github.com/owner/name\"}. Repos over 25 MB are refused before payment.","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":"A short brief, about one page, on a topic you specify, researched on the live web at the time of the request, with every source linked. Typically 60-120 s; allow 180 s. POST {\"topic\":\"...\"}.","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":"A full Markdown report on a topic you specify, researched on the live web at the time of the request, with every source linked. As long as the topic needs, never cut short. Typically 2-4 minutes; allow 360 s before giving up. POST {\"topic\":\"...\"}.","tags":["AI","Search","Research"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"2.000000"},"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"}}}}}}