{"openapi":"3.1.0","info":{"title":"Agent Hub","version":"1.0.0","description":"Pay-per-call utilities for AI agents. Every route is x402: call it, get HTTP 402 with a USDC price, pay inline, get the result. No API key, no signup."},"servers":[{"url":"https://agents.torbrooknews.com"}],"paths":{"/v1/search":{"post":{"summary":"Web search for AI agents","description":"Web search for AI agents. Send a natural-language query, get ranked results with title, url and snippet. Use when you need fresh information from the live web.\n\nPrice: $0.008 USDC per call via x402 (HTTP 402).","tags":["search","web"],"x-price":"$0.008","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"results":[{"title":"...","url":"https://...","snippet":"..."}],"count":5}}}},"402":{"description":"Payment required. PAYMENT-REQUIRED header carries x402 requirements."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","description":"Search query"},"limit":{"type":"integer","description":"Max results, default 10, max 20"}},"required":["query"]},"example":{"query":"best vr flight simulators 2026","limit":5}}}}}},"/v1/markdown":{"post":{"summary":"Fetch any public web page with a real headless browser (JavaScript rendered) and return clean Markdown","description":"Fetch any public web page with a real headless browser (JavaScript rendered) and return clean Markdown. Use to read articles, docs, product pages or SPAs that a plain fetch cannot render.\n\nPrice: $0.01 USDC per call via x402 (HTTP 402).","tags":["scrape","markdown","read"],"x-price":"$0.01","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"url":"https://example.com","markdown":"# Example Domain ...","chars":230}}}},"402":{"description":"Payment required. PAYMENT-REQUIRED header carries x402 requirements."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Page URL"}},"required":["url"]},"example":{"url":"https://example.com"}}}}}},"/v1/extract":{"post":{"summary":"Extract structured JSON from any web page","description":"Extract structured JSON from any web page. Give a URL plus a JSON schema or a plain-English prompt describing the fields you want; a headless browser renders the page and an LLM fills the schema.\n\nPrice: $0.03 USDC per call via x402 (HTTP 402).","tags":["scrape","extract","json"],"x-price":"$0.03","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"url":"https://example.com/product/123","data":{"name":"...","price":19.99,"inStock":true}}}}},"402":{"description":"Payment required. PAYMENT-REQUIRED header carries x402 requirements."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"schema":{"type":"object","description":"JSON schema of the fields to extract"},"prompt":{"type":"string","description":"Alternative to schema: describe what to extract"}},"required":["url"]},"example":{"url":"https://example.com/product/123","prompt":"product name, price, in stock"}}}}}},"/v1/scrape":{"post":{"summary":"Scrape text and attributes from a rendered web page using CSS selectors","description":"Scrape text and attributes from a rendered web page using CSS selectors. Returns every match per selector.\n\nPrice: $0.01 USDC per call via x402 (HTTP 402).","tags":["scrape","css","selectors"],"x-price":"$0.01","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"url":"https://example.com","results":[{"selector":"h1","items":[{"text":"Example Domain"}]}]}}}},"402":{"description":"Payment required. PAYMENT-REQUIRED header carries x402 requirements."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"selectors":{"type":"array","items":{"type":"string"},"description":"CSS selectors"}},"required":["url","selectors"]},"example":{"url":"https://example.com","selectors":["h1","a"]}}}}}},"/v1/pdf":{"post":{"summary":"Render a URL or raw HTML to a PDF file with a headless browser","description":"Render a URL or raw HTML to a PDF file with a headless browser. Returns the PDF bytes. Use for invoices, reports, receipts, archiving pages.\n\nPrice: $0.02 USDC per call via x402 (HTTP 402).","tags":["pdf","render","document"],"x-price":"$0.02","responses":{"200":{"description":"OK","content":{"application/pdf":{"example":{"contentType":"application/pdf","body":"<binary PDF bytes>"}}}},"402":{"description":"Payment required. PAYMENT-REQUIRED header carries x402 requirements."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"html":{"type":"string","description":"Raw HTML instead of url"}}},"example":{"html":"<h1>Invoice 42</h1>"}}}}}},"/v1/screenshot":{"post":{"summary":"Full-page PNG screenshot of any public URL rendered by a real browser","description":"Full-page PNG screenshot of any public URL rendered by a real browser. Returns PNG bytes.\n\nPrice: $0.02 USDC per call via x402 (HTTP 402).","tags":["screenshot","render","image"],"x-price":"$0.02","responses":{"200":{"description":"OK","content":{"image/png":{"example":{"contentType":"image/png","body":"<binary PNG bytes>"}}}},"402":{"description":"Payment required. PAYMENT-REQUIRED header carries x402 requirements."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"fullPage":{"type":"boolean"}},"required":["url"]},"example":{"url":"https://example.com","fullPage":true}}}}}},"/v1/llm":{"post":{"summary":"Pay-per-call LLM chat completion (Llama 3.1 8B, fast), no API key","description":"Pay-per-call LLM chat completion (Llama 3.1 8B, fast), no API key. Send OpenAI-style messages, get the assistant reply. Flat price per request, up to 2k output tokens.\n\nPrice: $0.005 USDC per call via x402 (HTTP 402).","tags":["llm","chat","inference"],"x-price":"$0.005","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"model":"llama-3.1-8b-instruct","content":"x402 lets clients pay for HTTP resources inline.","usage":{"prompt_tokens":20,"completion_tokens":25}}}}},"402":{"description":"Payment required. PAYMENT-REQUIRED header carries x402 requirements."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"content":{"type":"string"}}}},"max_tokens":{"type":"integer"},"temperature":{"type":"number"}},"required":["messages"]},"example":{"messages":[{"role":"user","content":"Summarize the x402 protocol in one line."}]}}}}}},"/v1/llm/large":{"post":{"summary":"Pay-per-call LLM chat completion on Llama 3.3 70B for harder reasoning, no API key","description":"Pay-per-call LLM chat completion on Llama 3.3 70B for harder reasoning, no API key. Same OpenAI-style messages body as /v1/llm. Flat price per request, up to 2k output tokens.\n\nPrice: $0.02 USDC per call via x402 (HTTP 402).","tags":["llm","chat","inference","70b"],"x-price":"$0.02","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"model":"llama-3.3-70b-instruct","content":"- x402 ...","usage":{"prompt_tokens":20,"completion_tokens":80}}}}},"402":{"description":"Payment required. PAYMENT-REQUIRED header carries x402 requirements."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"content":{"type":"string"}}}},"max_tokens":{"type":"integer"},"temperature":{"type":"number"}},"required":["messages"]},"example":{"messages":[{"role":"user","content":"Compare x402 and MPP in three bullets."}]}}}}}},"/v1/sentiment":{"post":{"summary":"Sentiment and tone classification for text (positive / negative / neutral with confidence, plus a one-line reason)","description":"Sentiment and tone classification for text (positive / negative / neutral with confidence, plus a one-line reason). Batch up to 20 texts per call.\n\nPrice: $0.002 USDC per call via x402 (HTTP 402).","tags":["nlp","sentiment","classify"],"x-price":"$0.002","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"results":[{"text":"Love this headset...","label":"positive","confidence":0.97,"reason":"enthusiastic praise"}]}}}},"402":{"description":"Payment required. PAYMENT-REQUIRED header carries x402 requirements."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"texts":{"type":"array","items":{"type":"string"},"description":"1 to 20 texts"}},"required":["texts"]},"example":{"texts":["Love this headset, best purchase this year."]}}}}}},"/v1/email/verify":{"get":{"summary":"Verify an email address: syntax check, domain MX lookup, disposable-domain and role-account flags","description":"Verify an email address: syntax check, domain MX lookup, disposable-domain and role-account flags. Use before sending or storing an address.\n\nPrice: $0.001 USDC per call via x402 (HTTP 402).","tags":["email","verify","validation"],"x-price":"$0.001","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"email":"someone@example.com","valid":true,"syntax":true,"mx":true,"disposable":false,"role":false,"domain":"example.com"}}}},"402":{"description":"Payment required. PAYMENT-REQUIRED header carries x402 requirements."}},"parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string"}}]}},"/v1/fx":{"get":{"summary":"Live foreign-exchange rates (ECB reference, 30+ currencies) and conversion","description":"Live foreign-exchange rates (ECB reference, 30+ currencies) and conversion. Query base, symbols and an optional amount.\n\nPrice: $0.002 USDC per call via x402 (HTTP 402).","tags":["finance","forex","rates"],"x-price":"$0.002","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"base":"USD","date":"2026-10-10","rates":{"EUR":0.92,"CAD":1.36},"converted":{"EUR":92,"CAD":136}}}}},"402":{"description":"Payment required. PAYMENT-REQUIRED header carries x402 requirements."}},"parameters":[{"name":"base","in":"query","required":false,"schema":{"type":"string","description":"ISO code, default USD"}},{"name":"symbols","in":"query","required":false,"schema":{"type":"string","description":"Comma list, e.g. EUR,CAD"}},{"name":"amount","in":"query","required":false,"schema":{"type":"number"}}]}},"/v1/rpc/{chain}":{"post":{"summary":"JSON-RPC read access to EVM chains (base, ethereum, polygon, arbitrum, optimism) with no API key","description":"JSON-RPC read access to EVM chains (base, ethereum, polygon, arbitrum, optimism) with no API key. Send a standard JSON-RPC body (eth_call, eth_getBalance, eth_blockNumber, eth_getLogs).\n\nPrice: $0.001 USDC per call via x402 (HTTP 402).","tags":["blockchain","rpc","evm"],"x-price":"$0.001","responses":{"200":{"description":"OK","content":{"application/json":{"example":{"jsonrpc":"2.0","id":1,"result":"0x1a2b3c"}}}},"402":{"description":"Payment required. PAYMENT-REQUIRED header carries x402 requirements."}},"parameters":[{"name":"chain","in":"path","required":true,"schema":{"type":"string","description":"base | ethereum | polygon | arbitrum | optimism"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string"},"id":{},"method":{"type":"string"},"params":{"type":"array"}},"required":["method"]},"example":{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}}}}}}}}