Every API here is available over the APIs.io API and to AI agents over MCP.
{"openapi":"3.1.0","info":{"title":"2s — the (most) everything API","version":"1","summary":"The (most) everything API.","description":"The (most) everything API for AI agents: 575+ pay-per-call endpoints on one origin. More live, ground-truth data than any other x402 service — public records, finance & SEC filings, crypto & web3, security & CVEs, legal, medical, weather, geocoding, and B2B/EDI. A full AI gateway: chat, image, and multi-model consensus across every major model, priced per request in the 402 before you pay. And agent infrastructure with no account: wallet-scoped storage (kv/docs/vectors/files), locks, queues, scheduled callbacks, pub/sub, and watchers that push signed webhooks when the world changes. Pay per call in USDC on Base or Solana via x402 — no API keys, no signup, no subscription. The first x402 API with upto billing: on AI endpoints, authorize the quoted max and settle only your actual usage. Try before you buy: add ?trial=1 (or header X-2s-Trial: 1) to any endpoint for one free real call per endpoint per hour — no wallet needed. New endpoints land constantly.","contact":{"name":"2s","url":"https://2s.io","email":"alley@2s.io"},"x-logo":{"url":"https://2s.io/icon-512.png","altText":"2s"},"x-guidance":"Pay-per-call REST API for AI agents — hundreds of endpoints returning ground-truth data (US public records, company & legal identifiers, finance/SEC, crypto/web3, security & CVEs, medical codes, weather & geocoding, agriculture, energy, maritime, music, and more). Every endpoint is paid per call in USDC via x402 (Base or Solana) — no API key, no signup. Call any endpoint with no auth to get a 402 PaymentRequirements envelope, sign it (EIP-3009 on Base, partial SPL transfer on Solana), and retry with the PAYMENT-SIGNATURE header. Add ?trial=1 for one free real call per endpoint per hour to test before paying. To discover the right endpoint: GET https://2s.io/api/directory for the full catalog, or GET https://2s.io/api/search/endpoints?q=<natural-language task> for a ranked match. Per-call price is on each operation as x-payment-info (from $0.001). Batch up to 50 calls behind one payment via POST https://2s.io/api/batch/run."},"servers":[{"url":"https://2s.io"}],"components":{"responses":{"BadRequest":{"description":"Bad request — invalid parameters."},"PaymentRequired":{"description":"Payment required. Body contains the x402 PaymentRequirements envelope with a multi-network accepts array; the per-call price is in accepts[].amount (and on the operation as x-2s-price). Sign for whichever rail you hold USDC on (EIP-3009 for Base, partial SPL transfer for Solana) and retry with the PAYMENT-SIGNATURE header (X-PAYMENT also accepted for v1 clients).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/X402PaymentRequiredV2"}}}},"MethodNotAllowed":{"description":"Method not allowed — see `Allow` header for the supported method."},"ServerError":{"description":"Internal server error."},"UpstreamError":{"description":"Upstream provider error."}},"parameters":{"TrialMode":{"name":"trial","in":"query","required":false,"description":"Try before you buy. Set to 1 for one free real call per endpoint per hour — no wallet or payment needed — to verify the endpoint before paying. Equivalent to sending the \"X-2s-Trial: 1\" request header. Works on every endpoint.","schema":{"type":"integer","enum":[1]}}},"securitySchemes":{"x402Payment":{"type":"apiKey","in":"header","name":"PAYMENT-SIGNATURE","description":"x402 protocol v2: base64-encoded PaymentPayload. Call any paid endpoint without auth to receive a 402 with a multi-network PaymentRequirements envelope. Sign for either rail: EIP-3009 transferWithAuthorization (Base USDC) OR a partial SPL token transfer (Solana USDC). Retry with PAYMENT-SIGNATURE header. X-PAYMENT is also accepted for v1 buyer clients. See https://x402.org."}},"schemas":{"Source":{"type":"object","description":"Provenance of the data: upstream provider, source URL, and license.","properties":{"provider":{"type":"string","description":"Upstream data provider."},"url":{"type":"string","description":"Source URL or documentation link."},"license":{"type":"string","description":"License / usage terms for the data."}}},"CallMeta":{"type":"object","description":"Per-call meta envelope — endpoint id, cost, caller kind, settlement details."},"X402PaymentRequiredV2":{"type":"object","description":"x402 v2 PaymentRequired envelope. Pick any entry from accepts[], sign for that rail, retry with the PAYMENT-SIGNATURE header.","required":["x402Version","accepts"],"properties":{"x402Version":{"type":"integer","const":2},"error":{"type":"string","description":"Human-readable reason payment is required."},"resource":{"type":"string","description":"The resource URL being purchased."},"accepts":{"type":"array","description":"Payment requirement options, one per supported network (Base USDC, Solana USDC).","items":{"type":"object","required":["scheme","network","amount","asset","payTo","maxTimeoutSeconds"],"properties":{"scheme":{"type":"string","enum":["exact"]},"network":{"type":"string","description":"CAIP-2 network id, e.g. \"eip155:8453\" (Base) or \"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp\"."},"amount":{"type":"string","description":"Price in atomic asset units (USDC has 6 decimals)."},"asset":{"type":"string","description":"Asset contract address / mint."},"payTo":{"type":"string","description":"Treasury address to pay."},"maxTimeoutSeconds":{"type":"integer"},"extra":{"type":"object","description":"Rail-specific extras (EVM: EIP-712 domain name/version; Solana: feePayer).","additionalProperties":true}}}},"extensions":{"type":"object","description":"Optional discovery metadata (e.g. bazaar input/output schemas).","additionalProperties":true}}}}},"paths":{"/api/agent/knowledge-delta":{"post":{"tags":["agent"],"summary":"What's happened in a given topic since a given date?","description":"What's happened in a given topic since a given date? Pass a free-text topic + ISO date; receive a deduplicated, ranked list of recent events drawn from US federal regulations, US House + Senate roll-call votes, academic papers (arXiv + PubMed + Semantic Scholar), and federal court opinions. Each event includes title, 1-2 sentence summary, date, source label, source URL, and a 1-5 significance score. Designed so an AI agent can spend one call to catch up on a domain since its LLM training cutoff. LLM-backed source routing and synthesis.","operationId":"agent_knowledge-delta","deprecated":false,"security":[{"x402Payment":[]}],"responses":{"200":{"description":"Normalized envelope: items = [delta] (one knowledge-delta document: query echo, sourcesQueried, deduplicated+ranked events); total = 1; meta.rawHits = raw hit count.","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"query":{"type":"object","properties":{"topic":{"type":"string"},"since":{"type":"string"},"until":{"type":"string"},"maxEvents":{"type":"integer"}},"required":["topic","since","until","maxEvents"],"additionalProperties":false},"sourcesQueried":{"type":"array","items":{"type":"string"}},"events":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"summary":{"type":"string"},"date":{"type":"string","nullable":true},"source":{"type":"string"},"sourceLabel":{"type":"string"},"sourceUrl":{"type":"string","nullable":true},"significance":{"type":"integer","minimum":1,"maximum":5}},"required":["title","summary","date","source","sourceLabel","sourceUrl","significance"],"additionalProperties":false}}},"required":["query","sourcesQueried","events"],"additionalProperties":false}},"total":{"type":"integer","nullable":true,"description":"Total matching rows upstream; null when unknown."},"source":{"$ref":"#/components/schemas/Source"},"meta":{"type":"object","properties":{"rawHits":{"type":"integer","description":"Total raw hits before dedup/ranking."}},"required":["rawHits"],"additionalProperties":false}},"required":["ok","items","total","source"],"additionalProperties":false},"meta":{"$ref":"#/components/schemas/CallMeta"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"402":{"$ref":"#/components/responses/PaymentRequired"},"405":{"$ref":"#/components/responses/MethodNotAllowed"},"500":{"$ref":"#/components/responses/ServerError"},"502":{"$ref":"#/components/responses/UpstreamError"}},"x-2s-id":"agent.knowledge-delta","x-2s-version":null,"x-2s-price":{"usd":0.15},"x-2s-accepts":["x402"],"x-2s-response-shape":"normalized","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.150000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"topic":{"type":"string","minLength":2,"maxLength":200,"description":"Free-text domain. Examples: \"oncology immunotherapy\", \"Rust language ecosystem\", \"SEC enforcement against crypto exchanges\"."},"since":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Earliest date (YYYY-MM-DD). Typically the agent's LLM training cutoff date."},"until":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Latest date (YYYY-MM-DD). Default = today."},"maxEvents":{"type":"integer","minimum":1,"maximum":50,"default":20,"description":"Max events to return (1-50). Default 20."}},"required":["topic","since"],"additionalProperties":false}}}},"parameters":[{"$ref":"#/components/parameters/TrialMode"}]}},"/api/agriculture/drought":{"get":{"tags":["agriculture"],"summary":"US Drought Monitor severity for a county (5-digit FIPS) or...","description":"US Drought Monitor severity for a county (5-digit FIPS) or state (2-letter code). Returns the weekly percent of area in each drought category — None, D0 (Abnormally Dry), D1 (Moderate), D2 (Severe), D3 (Extreme), D4 (Exceptional) — newest week first, plus the worst category present each week. Keyless, public-domain (NDMC/USDA/NOAA). This is the official metric behind USDA disaster-program eligibility; use for crop-risk, water, and insurance reasoning.","operationId":"agriculture_drought","deprecated":false,"security":[{"x402Payment":[]}],"responses":{"200":{"description":"Normalized envelope: items = weekly drought breakdowns (newest first); total = week count; meta carries area + areaType.","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","nullable":true},"none":{"type":"number","nullable":true},"d0":{"type":"number","nullable":true},"d1":{"type":"number","nullable":true},"d2":{"type":"number","nullable":true},"d3":{"type":"number","nullable":true},"d4":{"type":"number","nullable":true},"worst":{"type":"string"}},"required":["date","none","d0","d1","d2","d3","d4","worst"],"additionalProperties":false}},"total":{"type":"integer","nullable":true,"description":"Total matching rows upstream; null when unknown."},"source":{"$ref":"#/components/schemas/Source"},"meta":{"type":"object","properties":{"area":{"type":"string"},"areaType":{"type":"string"}},"required":["area","areaType"],"additionalProperties":false}},"required":["ok","items","total","source"],"additionalProperties":false},"meta":{"$ref":"#/components/schemas/CallMeta"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"402":{"$ref":"#/components/responses/PaymentRequired"},"405":{"$ref":"#/components/responses/MethodNotAllowed"},"500":{"$ref":"#/components/responses/ServerError"},"502":{"$ref":"#/components/responses/UpstreamError"}},"x-2s-id":"agriculture.drought","x-2s-version":null,"x-2s-price":{"usd":0.0025},"x-2s-accepts":["x402"],"x-2s-response-shape":"normalized","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002500"},"protocols":[{"x402":{}}]},"parameters":[{"name":"area","in":"query","required":true,"description":"Area.","schema":{"type":"string","minLength":2,"maxLength":5}},{"name":"weeks","in":"query","required":false,"description":"Weeks.","schema":{"type":"integer","minimum":1,"maximum":260}},{"$ref":"#/components/parameters/TrialMode"}]}},"/api/agriculture/stats":{"get":{"tags":["agriculture"],"summary":"USDA NASS QuickStats - authoritative US agricultural...","description":"USDA NASS QuickStats — authoritative US agricultural statistics: crop yields, acreage, production, livestock inventory, and prices received. Filter by commodity (e.g. CORN, SOYBEANS, CATTLE), year (or year__GE/year__LE range), state (2-letter), county, statistic category (YIELD, PRODUCTION, AREA HARVESTED, PRICE RECEIVED), and aggregation level (NATIONAL/STATE/COUNTY). Returns normalized rows with value + unit. QuickStats caps results at 50,000 rows, so narrow broad queries (a 400 RESULT_TOO_LARGE tells you to add filters). Public-domain federal data.","operationId":"agriculture_stats","deprecated":false,"security":[{"x402Payment":[]}],"responses":{"200":{"description":"Normalized envelope: items = matching NASS statistics rows; total = row count.","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"commodity":{"type":"string","nullable":true},"year":{"type":"number","nullable":true},"state":{"type":"string","nullable":true},"county":{"type":"string","nullable":true},"category":{"type":"string","nullable":true},"dataItem":{"type":"string","nullable":true},"value":{"type":"number","nullable":true},"valueRaw":{"type":"string","nullable":true},"unit":{"type":"string","nullable":true}},"required":["commodity","year","state","county","category","dataItem","value","valueRaw","unit"],"additionalProperties":false}},"total":{"type":"integer","nullable":true,"description":"Total matching rows upstream; null when unknown."},"source":{"$ref":"#/components/schemas/Source"}},"required":["ok","items","total","source"],"additionalProperties":false},"meta":{"$ref":"#/components/schemas/CallMeta"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"402":{"$ref":"#/components/responses/PaymentRequired"},"405":{"$ref":"#/components/responses/MethodNotAllowed"},"500":{"$ref":"#/components/responses/ServerError"},"502":{"$ref":"#/components/responses/UpstreamError"}},"x-2s-id":"agriculture.stats","x-2s-version":null,"x-2s-price":{"usd":0.0025},"x-2s-accepts":["x402"],"x-2s-response-shape":"normalized","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002500"},"protocols":[{"x402":{}}]},"parameters":[{"name":"commodity_desc","in":"query","required":true,"description":"Commodity desc.","schema":{"type":"string","minLength":2,"maxLength":60}},{"name":"year","in":"query","required":false,"description":"Four-digit calendar year.","schema":{"type":"string","pattern":"^\\d{4}$"}},{"name":"year__GE","in":"query","required":false,"description":"Year ge.","schema":{"type":"string","pattern":"^\\d{4}$"}},{"name":"year__LE","in":"query","required":false,"description":"Year le.","schema":{"type":"string","pattern":"^\\d{4}$"}},{"name":"state_alpha","in":"query","required":false,"description":"State alpha.","schema":{"type":"string","minLength":2,"maxLength":2}},{"name":"county_name","in":"query","required":false,"description":"County name.","schema":{"type":"string","maxLength":60}},{"name":"statisticcat_desc","in":"query","required":false,"description":"Statisticcat desc.","schema":{"type":"string","maxLength":60}},{"name":"agg_level_desc","in":"query","required":false,"description":"Agg level desc.","schema":{"type":"string","maxLength":30}},{"name":"short_desc","in":"query","required":false,"description":"Short desc.","schema":{"type":"string","maxLength":200}},{"name":"freq_desc","in":"query","required":false,"description":"Freq desc.","schema":{"type":"string","maxLength":20}},{"$ref":"#/components/parameters/TrialMode"}]}},"/api/ai/chat":{"post":{"tags":["ai"],"summary":"OpenAI-compatible chat completions across every frontier...","description":"OpenAI-compatible chat completions across every frontier model on one endpoint — GPT-5, Claude, Gemini, Grok, DeepSeek, Llama, Mistral and ~290 more. POST { model, messages, max_tokens?, temperature?, top_p?, stop? } and get back a standard chat.completion (choices[].message + usage). Pay per call in USDC via x402 — no accounts, no provider keys, no subscriptions. Price scales with the model and max_tokens and is quoted in the 402. List selectable models at GET /api/ai/models.","operationId":"ai_chat","deprecated":false,"security":[{"x402Payment":[]}],"responses":{"200":{"description":"OK"},"400":{"$ref":"#/components/responses/BadRequest"},"402":{"$ref":"#/components/responses/PaymentRequired"},"405":{"$ref":"#/components/responses/MethodNotAllowed"},"500":{"$ref":"#/components/responses/ServerError"},"502":{"$ref":"#/components/responses/UpstreamError"}},"x-2s-id":"ai.chat","x-2s-version":null,"x-2s-price":{"usd":0.0025},"x-2s-accepts":["x402"],"x-2s-response-shape":"legacy","x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.002500","max":"50.000000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":80,"description":"Gateway model id, e.g. openai/gpt-5, anthropic/claude-opus-4.8, google/gemini-3-pro-preview. Full list: GET /api/ai/models."},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant"],"description":"Role."},"content":{"type":"string","description":"Content."}},"required":["role","content"],"additionalProperties":false},"minItems":1,"description":"OpenAI-style message list."},"max_tokens":{"type":"integer","minimum":1,"maximum":8192,"description":"Max output tokens (default 1024)."},"temperature":{"type":"number","minimum":0,"maximum":2,"description":"Temperature."},"top_p":{"type":"number","minimum":0,"maximum":1,"description":"Top p."},"stop":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Stop."}},"required":["model","messages"],"additionalProperties":false}}}},"parameters":[{"$ref":"#/components/parameters/TrialMode"}]}},"/api/ai/classify":{"post":{"tags":["ai"],"summary":"Zero-shot text classification.","description":"Zero-shot text classification. POST { text, labels[], multiLabel? }. Assigns the text to one of your labels (or several when multiLabel=true) with a confidence score and a one-line rationale. No training data needed — define the labels at call time. Great for routing, tagging, triage, and intent detection.","operationId":"ai_classify","deprecated":false,"security":[{"x402Payment":[]}],"responses":{"200":{"description":"Normalized: items = [classification].","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"labels":{"type":"array","items":{"type":"string"}},"top":{"type":"string","nullable":true},"confidence":{"type":"number","nullable":true},"reasoning":{"type":"string","nullable":true}},"required":["labels","top","confidence","reasoning"],"additionalProperties":false}},"total":{"type":"integer","nullable":true,"description":"Total matching rows upstream; null when unknown."},"source":{"$ref":"#/components/schemas/Source"}},"required":["ok","items","total","source"],"additionalProperties":false},"meta":{"$ref":"#/components/schemas/CallMeta"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"402":{"$ref":"#/components/responses/PaymentRequired"},"405":{"$ref":"#/components/responses/MethodNotAllowed"},"500":{"$ref":"#/components/responses/ServerError"},"502":{"$ref":"#/components/responses/UpstreamError"}},"x-2s-id":"ai.classify","x-2s-version":null,"x-2s-price":{"usd":0.045},"x-2s-accepts":["x402"],"x-2s-response-shape":"normalized","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.045000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":12000,"description":"Text."},"labels":{"type":"array","items":{"type":"string","minLength":1,"maxLength":60},"minItems":2,"maxItems":20,"description":"Candidate labels to choose from."},"multiLabel":{"type":"boolean","description":"Allow multiple labels (default single)."}},"required":["text","labels"],"additionalProperties":false}}}},"parameters":[{"$ref":"#/components/parameters/TrialMode"}]}},"/api/ai/council":{"post":{"tags":["ai"],"summary":"Ask several frontier models the same question and get one...","description":"Ask several frontier models the same question and get one synthesized answer. Choose a preset council — fast (3 quick models), balanced (3 strong models with a peer-refine round), or deep (5 models plus refine) — or supply your own set of 2–8 models. A chairman model merges the responses into a single consensus with a confidence score and any points of dissent, and each member’s individual answer is returned alongside. Price scales with the council size and answer length, and is quoted up front in the 402. Models auto-resolve to their latest available version; any unavailable model simply drops out (at least 2 are needed).","operationId":"ai_council","deprecated":false,"security":[{"x402Payment":[]}],"responses":{"200":{"description":"Normalized envelope: items = [the consensus result]; total = 1. meta carries the mode, chairman model, and how many members answered.","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"consensus":{"type":"string","description":"The synthesized best answer."},"confidence":{"type":"number","description":"0–1 confidence; high when the council agreed."},"agreement":{"type":"string","description":"One-line note on what the council agreed on."},"dissent":{"type":"array","items":{"type":"string"},"description":"Notable disagreements or points one model added; empty on full agreement."},"models":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string"},"answered":{"type":"boolean"},"answer":{"type":"string","nullable":true}},"required":["model","answered","answer"],"additionalProperties":false},"description":"Each council member and its individual answer (null if it did not respond)."}},"required":["consensus","confidence","agreement","dissent","models"],"additionalProperties":false}},"total":{"type":"integer","nullable":true,"description":"Total matching rows upstream; null when unknown."},"source":{"$ref":"#/components/schemas/Source"},"meta":{"type":"object","properties":{"mode":{"type":"string"},"chairman":{"type":"string"},"modelCount":{"type":"integer"},"answered":{"type":"integer"}},"required":["mode","chairman","modelCount","answered"],"additionalProperties":false}},"required":["ok","items","total","source"],"additionalProperties":false},"meta":{"$ref":"#/components/schemas/CallMeta"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"402":{"$ref":"#/components/responses/PaymentRequired"},"405":{"$ref":"#/components/responses/MethodNotAllowed"},"500":{"$ref":"#/components/responses/ServerError"},"502":{"$ref":"#/components/responses/UpstreamError"}},"x-2s-id":"ai.council","x-2s-version":null,"x-2s-price":{"usd":0.03},"x-2s-accepts":["x402"],"x-2s-response-shape":"normalized","x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.030000","max":"50.000000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":12000,"description":"The question to put to the council."},"mode":{"type":"string","enum":["fast","balanced","deep"],"description":"Preset council. Default balanced. Ignored if `models` is given."},"models":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"minItems":2,"maxItems":8,"description":"Custom council of 2–8 gateway model ids, e.g. [\"openai/gpt-5\",\"anthropic/claude-opus\",\"google/gemini-3-pro\"] (overrides `mode`). Full selectable list + live prices: GET /api/ai/council/menu."},"maxTokens":{"type":"integer","minimum":128,"maximum":4096,"description":"Max output tokens per model. Default 640."}},"required":["prompt"],"additionalProperties":false}}}},"parameters":[{"$ref":"#/components/parameters/TrialMode"}]}},"/api/ai/describe-image":{"post":{"tags":["ai"],"summary":"Describe an image. POST { imageUrl, instruction? }. Returns...","description":"Describe an image. POST { imageUrl, instruction? }. Returns { imageUrl, altText (5-15 word accessibility text), description (2-3 sentences), contentType (photograph|illustration|screenshot|diagram|document|mixed|other), text (verbatim OCR transcription, \"\" if none), mainObjects[], dominantColors[] (hex) }. Accepts JPEG, PNG, GIF, WebP. 1MB image size cap.","operationId":"ai_describe-image","deprecated":false,"security":[{"x402Payment":[]}],"responses":{"200":{"description":"Normalized envelope: items = [description] (one structured image description: altText, description, OCR text, main objects, dominant colors); total = 1.","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"imageUrl":{"type":"string"},"altText":{"type":"string","description":"Short accessibility text (~5-15 words)."},"description":{"type":"string","description":"2-3 sentence description."},"contentType":{"type":"string","enum":["photograph","illustration","screenshot","diagram","document","mixed","other"]},"text":{"type":"string","description":"Verbatim OCR transcription, \"\" if no text present."},"mainObjects":{"type":"array","items":{"type":"string"},"description":"Salient objects/subjects in the image."},"dominantColors":{"type":"array","items":{"type":"string"},"description":"Hex color codes (e.g. \"#1a3b5f\") of dominant colors."}},"required":["imageUrl","altText","description","contentType","text","mainObjects","dominantColors"],"additionalProperties":false}},"total":{"type":"integer","nullable":true,"description":"Total matching rows upstream; null when unknown."},"source":{"$ref":"#/components/schemas/Source"}},"required":["ok","items","total","source"],"additionalProperties":false},"meta":{"$ref":"#/components/schemas/CallMeta"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"402":{"$ref":"#/components/responses/PaymentRequired"},"405":{"$ref":"#/components/responses/MethodNotAllowed"},"500":{"$ref":"#/components/responses/ServerError"},"502":{"$ref":"#/components/responses/UpstreamError"}},"x-2s-id":"ai.describe-image","x-2s-version":null,"x-2s-price":{"usd":0.045},"x-2s-accepts":["x402"],"x-2s-response-shape":"normalized","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.045000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"imageUrl":{"type":"string","format":"uri","maxLength":2048,"description":"HTTPS URL of a JPEG, PNG, GIF, or WebP image (≤1MB)."},"instruction":{"type":"string","maxLength":1000,"description":"Optional caller-supplied focus hint, e.g. \"describe the chart axes\"."}},"required":["imageUrl"],"additionalProperties":false}}}},"parameters":[{"$ref":"#/components/parameters/TrialMode"}]}},"/api/ai/entities":{"post":{"tags":["ai"],"summary":"Named-entity recognition.","description":"Named-entity recognition. POST { text }. Extracts people, organizations, locations, dates, money, products, laws, events and more — each with a standard type and mention count. For knowledge extraction, redaction prep, and document indexing.","operationId":"ai_entities","deprecated":false,"security":[{"x402Payment":[]}],"responses":{"200":{"description":"Normalized: items = [{ entities, count }].","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"entities":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"type":{"type":"string"},"mentions":{"type":"number","nullable":true}},"required":["text","type","mentions"],"additionalProperties":false}},"count":{"type":"number"}},"required":["entities","count"],"additionalProperties":false}},"total":{"type":"integer","nullable":true,"description":"Total matching rows upstream; null when unknown."},"source":{"$ref":"#/components/schemas/Source"}},"required":["ok","items","total","source"],"additionalProperties":false},"meta":{"$ref":"#/components/schemas/CallMeta"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"402":{"$ref":"#/components/responses/PaymentRequired"},"405":{"$ref":"#/components/responses/MethodNotAllowed"},"500":{"$ref":"#/components/responses/ServerError"},"502":{"$ref":"#/components/responses/UpstreamError"}},"x-2s-id":"ai.entities","x-2s-version":null,"x-2s-price":{"usd":0.09},"x-2s-accepts":["x402"],"x-2s-response-shape":"normalized","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.090000"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":12000,"description":"Text."}},"required":["text"],"additionalProperties":false}}}},"parameters":[{"$ref":"#/components/parameters/TrialMode"}]}},"/api/ai/extract":{"post":{"tags":["ai"],"summary":"Extract structured data from a webpage.","description":"Extract structured data from a webpage. POST { url, schema, instruction? }. The schema is a JSON Schema object (top-level type:\"object\") describing the shape you want back; output is guaranteed to conform. Returns { url, finalUrl, extracted, meta:{ truncated } }.","operationId":"ai_extract","deprecated":false,"security":[{"x402Payment":[]}],"responses":{"200":{"description":"Normalized envelope: items = [extraction] (one object: the schema-conforming extracted data, source URLs, truncation flag); total = 1.","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"items":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"Requested URL."},"finalUrl":{"type":"string","description":"Final URL after redirects."},"extracted":{"type":"object","additionalProperties":{},"description":"The extracted object, conforming to the caller-supplied JSON Schema."},"truncated":{"type":"boolean","description":"True if the source page was truncated before extraction."}},"required":["url","finalUrl","extracted","truncated"],"additionalProperties":false}},"total":{"type":"integer","nullable":true,"description":"Total matching rows upstream; null when unknown."},"source":{"$ref":"#/components/schemas/Source"}},"required":["ok","items","total","source"],"additionalProperties":false},"meta":{"$ref":"#/components/schemas/CallMeta"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"402":{"$ref":"#/components/responses/PaymentRequired"},"405":{"$ref":"#/components/responses/MethodNotAllowed"},"500":{"$ref":"#/components/responses/ServerError"},"502":{"$ref":"#/components/responses/UpstreamError"}},"x-2s-id":"ai.extract","x-2s-version":null,"x-2s-price":{"usd":0.1875},"x-2s-accepts":["x402"],"x-2s-response-shape":"normalized","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.187500"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","maxLength":2048,"description":"URL to process."},"schema":{"type":"object","additionalProperties":{},"description":"Schema."},"instruction":{"type":"string","maxLength":2000,"description":"Instruction."}},"required":["url","schema"],"additionalProperties":false}}}},"parameters":[{"$ref":"#/compon
# --- truncated at 32 KB (1914 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/2s-io/refs/heads/main/openapi/2s-io-openapi.json