2s

2s API

The full 2s REST catalog: 575 operations (470 GET, 105 POST) in one OpenAPI 3.1.0 document with servers[] https://2s.io, one tag per operation across 112 groups, a unique operationId (group_name) and an x-2s-id (group.name) on every operation, a per-call price in x-2s-price / x-payment-info, and a single x402Payment security scheme (PAYMENT-SIGNATURE header) applied everywhere. Responses use a normalized {data {ok, items, total, source, meta}, meta} envelope with per-response provenance, or raw bytes on ten media endpoints. Stateful groups (store, lock, queue, pubsub, schedule, watchers) are scoped to the paying wallet. Every endpoint accepts ?trial=1 for one free real call per hour; batch_run runs up to 50 calls behind one payment.

Operations 575

Showing the first 250 of 575. The full set is in the contract, and via get_provider_operations.

POST /api/agent/knowledge-delta What's happened in a given topic since a given date? #
GET /api/agriculture/drought US Drought Monitor severity for a county (5-digit FIPS) or... #
GET /api/agriculture/stats USDA NASS QuickStats - authoritative US agricultural... #
POST /api/ai/chat OpenAI-compatible chat completions across every frontier... #
POST /api/ai/classify Zero-shot text classification. #
POST /api/ai/council Ask several frontier models the same question and get one... #
POST /api/ai/describe-image Describe an image. POST { imageUrl, instruction? }. Returns... #
POST /api/ai/entities Named-entity recognition. #
POST /api/ai/extract Extract structured data from a webpage. #
POST /api/ai/image Generate images from a text prompt across the gateway's... #
POST /api/ai/moderate Content moderation. POST { text }. Flags content across... #
POST /api/ai/ocr OCR + layout extraction. #
POST /api/ai/pii PII detection. POST { text }. Finds personally identifiable... #
POST /api/ai/research Grounded research brief. #
POST /api/ai/screenshot Render a URL as a screenshot. #
POST /api/ai/sentiment Sentiment analysis. POST { text }. Returns overall... #
POST /api/ai/summarize Summarize a webpage. POST { url, instruction? }. Returns {... #
POST /api/ai/translate Translate text. POST { text, targetLanguage... #
POST /api/ai/web-answer Answer a question from the live web. #
GET /api/airport/lookup Look up an airport by 3-letter IATA (e.g. #
GET /api/airport/near Airports within a radius of a coordinate, sorted by distance. #
GET /api/aviation/accidents Search the NTSB civil aviation accident & incident database... #
GET /api/aviation/metar Current aviation weather observation (METAR) for one or... #
GET /api/aviation/sigmet Active in-flight weather hazard advisories (SIGMETs and... #
GET /api/aviation/taf Terminal Aerodrome Forecast (TAF) for one or more airports... #
GET /api/bank/lookup FDIC-insured US bank directory lookup. #
POST /api/barcode/generate Generate QR / Aztec / Data Matrix / PDF417 codes from... #
POST /api/batch/run Run up to 50 endpoint calls behind ONE x402 payment. #
GET /api/bio/gene Look up a gene by its official symbol (e.g. #
GET /api/bio/protein Look up a protein in UniProtKB by accession (e.g. #
GET /api/bio/species Resolve any organism by scientific or common name to the... #
GET /api/bls/series US Bureau of Labor Statistics time-series data. #
GET /api/business/br-cnpj Brazilian company registry lookup by CNPJ (the 14-digit... #
GET /api/business/entity-match Fuzzy entity resolution: resolve a messy, free-text company... #
GET /api/business/entity-profile Full business-entity dossier from a state registry - master... #
GET /api/business/entity-screen KYC in one call: look up a business in a US state registry... #
GET /api/business/fi-companies Official Finnish company registry search (PRH/YTJ... #
GET /api/business/fr-companies Official French company registry search (annuaire des... #
GET /api/business/id-resolve Resolve a legal entity across identifier systems. #
GET /api/business/kyb-360 Full Know-Your-Business (KYB) intelligence dossier on a... #
GET /api/business/lei Look up or search the global LEI (Legal Entity Identifier)... #
GET /api/business/lei-hierarchy Corporate ownership graph for a legal entity by LEI (GLEIF... #
GET /api/business/lei-isins ISIN LEI mapping (GLEIF, live, CC0). #
GET /api/business/naics Look up or search NAICS 2022 industry classification codes... #
GET /api/business/no-companies Official Norwegian company registry search (Brnnysund... #
GET /api/business/pl-krs Official Polish company registry lookup by KRS number (KRS... #
GET /api/business/uk-companies Official UK company registry (Companies House). #
GET /api/calendar/business-days Holiday-aware business-day calculator for 200+ countries. #
GET /api/calendar/earnings Earnings release calendar - which US-listed companies... #
GET /api/calendar/holidays List the official holidays for a country and year, with... #
GET /api/calendar/ipo IPO calendar - companies going public (or recently public)... #
GET /api/census/demographics US Census ACS 5-year demographics for a state or county. #
GET /api/census/zipcode US Census ACS 5-year demographics for a ZIP code (ZCTA). #
GET /api/chem/compound Look up a chemical compound by CID, common/IUPAC name... #
GET /api/chinese/convert Convert Chinese text between Simplified and Traditional... #
GET /api/chinese/detect Detect Chinese in text: whether it contains Han characters... #
GET /api/chinese/pinyin Convert Chinese (Hanzi) text to pinyin romanization. #
GET /api/class/industry-resolve Cross-walk an industry classification code across the four... #
GET /api/climate/station-history Historical daily weather observations from NOAA GHCN-Daily... #
GET /api/climate/station-near Find NOAA GHCN-Daily weather stations near a coordinate. #
GET /api/clinical/study-detail Full ClinicalTrials.gov study record by NCT id - the deep... #
GET /api/code/repo-lookup Look up a public GitHub repository by "owner/name" slug. #
GET /api/convert/currency Convert an amount between currencies at a live or... #
GET /api/convert/unit Convert a value between units of measure: mass (g, kg, mg... #
GET /api/countdown/gif Animated countdown GIF from the current UTC time to endDate. #
GET /api/country/financials Country-level financial and credit reference data... #
GET /api/country/lookup Look up country metadata via REST Countries. #
GET /api/crypto/address-history Transaction history for an Ethereum address (via Etherscan V2). #
GET /api/crypto/address-safety Malicious-wallet screen (via GoPlus, free/keyless). #
GET /api/crypto/address-screen Sanctions-screen a crypto wallet address against the US... #
GET /api/crypto/address-validate Validate a cryptocurrency address with full checksum... #
GET /api/crypto/balances Live native + ERC-20 token balances for an EVM address... #
GET /api/crypto/btc-address Bitcoin address summary (free/keyless): confirmed balance... #
GET /api/crypto/btc-fees Current Bitcoin network fee rates and mempool backlog from... #
GET /api/crypto/btc-mempool Bitcoin mempool state (free/keyless): current unconfirmed... #
GET /api/crypto/btc-tx Bitcoin transaction lookup by txid (free/keyless)... #
GET /api/crypto/btc-utxos Unspent transaction outputs (UTXOs) for a Bitcoin address... #
GET /api/crypto/cex-klines Centralized-exchange OHLCV candlesticks for a spot trading... #
GET /api/crypto/cex-ticker Centralized-exchange 24h ticker for a spot pair (e.g. #
GET /api/crypto/chain-tvl-history Historical total DeFi TVL time series for a blockchain (e.g. #
GET /api/crypto/coin Full coin profile by CoinGecko id (e.g. #
GET /api/crypto/coin-history Historical market chart for a coin by CoinGecko id... #
GET /api/crypto/contract Decode an EVM smart contract. #
POST /api/crypto/decode-calldata Decode raw EVM transaction calldata. #
GET /api/crypto/defi DeFi total-value-locked (TVL) metrics via DefiLlama. #
GET /api/crypto/defi-chains DeFi TVL leaderboard across all chains (via DefiLlama... #
GET /api/crypto/defi-fees Protocol fees/revenue or DEX trading volume leaderboards... #
GET /api/crypto/defi-protocol-history Historical total-value-locked (TVL) time series for a DeFi... #
GET /api/crypto/defi-yields DeFi yield & lending rates across protocols (via DefiLlama... #
GET /api/crypto/dex-networks List the 100+ blockchain networks supported by the on-chain... #
GET /api/crypto/dex-ohlcv OHLCV candlesticks for a DEX pool (via GeckoTerminal... #
GET /api/crypto/dex-pools Trending or newly-created DEX liquidity pools on a network... #
GET /api/crypto/dex-token-pools All DEX pools trading a given token, by contract address... #
GET /api/crypto/ens-resolve Resolve ENS (Ethereum Name Service) names and addresses... #
GET /api/crypto/fear-greed The Crypto Fear & Greed Index - a 0-100 market-sentiment... #
GET /api/crypto/gas-oracle Live EVM gas oracle. Returns latest block baseFeePerGas +... #
GET /api/crypto/global Whole-crypto-market overview: total market cap (USD), total... #
GET /api/crypto/hyperliquid-funding Live perp funding rates, open interest, and mark/oracle/mid... #
GET /api/crypto/hyperliquid-predicted-funding Predicted next funding rates per coin across venues... #
GET /api/crypto/kimchi-premium The "kimchi premium" - how much higher a crypto asset... #
GET /api/crypto/markets Top cryptocurrencies by market cap with live price, market... #
GET /api/crypto/nft Live ERC-721 NFT read (Base, Ethereum, Polygon, Arbitrum... #
GET /api/crypto/nft-security NFT collection risk screening via GoPlus (free, keyless). #
GET /api/crypto/stablecoins Stablecoin supply leaderboard (via DefiLlama... #
GET /api/crypto/token-info On-chain token metrics by contract address (via... #
GET /api/crypto/token-metadata Live on-chain token metadata for an ERC-20 or ERC-721... #
GET /api/crypto/token-price Current spot price and market data for crypto assets. #
GET /api/crypto/token-safety Token honeypot & rug-pull risk screen (via GoPlus... #
GET /api/crypto/token-transfers ERC-20 token transfer history for an Ethereum address (via... #
GET /api/crypto/tx Live EVM transaction status and receipt lookup. #
GET /api/crypto/vrf Verifiable random function - deterministic, publicly... #
POST /api/dev/csv-to-json Convert CSV/TSV text to a JSON array. #
POST /api/dev/diff-json Structured deep diff of two JSON values. #
POST /api/dev/flatten-json Flatten a nested JSON object/array into dot-notation keys. #
POST /api/dev/json-to-csv Convert a JSON array of objects to CSV. #
POST /api/dev/json-to-typescript Infer a TypeScript interface from a sample JSON value. #
POST /api/dev/json-to-zod Infer a Zod schema from a sample JSON value. #
POST /api/dev/jwt-decode Decode a JWT without verifying its signature. #
POST /api/dev/preflight Check whether a shell command is runnable before you (or an... #
POST /api/dev/regex-test Test a JavaScript regular expression against input text. #
GET /api/dev/rfc Look up an IETF RFC by number. #
GET /api/dev/uuid Generate UUIDs. version v4 (random) or v7 (time-ordered... #
GET /api/dns/lookup Resolve a hostname over public DNS and return parsed records. #
GET /api/domain/ct-logs Certificate Transparency recon for a domain - discover its... #
GET /api/domain/email-security Grade a domain's email-authentication and DNS-security... #
GET /api/domain/intel Domain intelligence in one call - composes DNS, WHOIS/RDAP... #
GET /api/domain/whois Modern WHOIS via RDAP. Query: domain (e.g. example.com)... #
GET /api/earth/events Global natural events tracker via NASA EONET v3 (Earth... #
GET /api/earth/now Situational awareness for a coordinate: recent earthquakes... #
GET /api/econ/commodity Latest benchmark commodity price with the prior value + %... #
GET /api/econ/cot CFTC Commitments of Traders (COT) - weekly futures... #
GET /api/econ/fred Any series in the Federal Reserve's FRED database (800k+ US... #
GET /api/econ/fred-categories Browse the Federal Reserve FRED category tree to DISCOVER... #
GET /api/econ/fred-regional Federal Reserve regional economic data: one snapshot of a... #
GET /api/econ/fred-releases The US economic-data release CALENDAR - when official... #
GET /api/econ/fred-vintage Point-in-time (vintage) economic data from FRED's ALFRED... #
GET /api/econ/indicator Latest reading of a curated US macroeconomic indicator... #
GET /api/econ/recession Composite US recession-signal dashboard: the NY Fed model's... #
GET /api/econ/yield-curve Current US Treasury yield curve - the market yield at every... #
POST /api/edi/ack Generate the ANSI ASC X12 997 Functional Acknowledgment for... #
POST /api/edi/edifact Parse a raw UN/EDIFACT document (the B2B EDI format used... #
POST /api/edi/edifact-generate Generate an outbound UN/EDIFACT document from JSON - the... #
POST /api/edi/generate Generate a ready-to-send ANSI ASC X12 EDI document from... #
POST /api/edi/parse Parse a raw ANSI ASC X12 EDI document (the format used for... #
GET /api/edu/college-scorecard Search US colleges + universities via the Department of... #
GET /api/edu/school-lookup Look up any US public K-12 school (~102k, NCES Common Core... #
GET /api/email/validate Validate an email address and return structured signals... #
GET /api/energy/carbon-intensity-uk Great Britain electricity grid carbon intensity (current... #
GET /api/energy/electricity-rates Retail electricity price and sales for a US state by... #
GET /api/energy/fuel-stations Locate alternative-fuel stations across the US via NREL... #
GET /api/energy/generation-mix Electricity generation mix by fuel type for a US state... #
GET /api/energy/prices US energy benchmark prices from the EIA (Energy Information... #
GET /api/energy/solar-forecast Solar irradiance + PV-yield forecast for any coordinate... #
GET /api/energy/solar-resource Get average solar resource estimates for any... #
GET /api/energy/utility-rates Which electric utility serves a US latitude/longitude, and... #
POST /api/feedback/send Send a message straight to the 2s team. #
GET /api/finance/amortize Compute a loan or mortgage amortization schedule. #
GET /api/finance/bank-id-resolve Resolve a bank / financial institution across identifier... #
GET /api/finance/bin Identify a payment card from its BIN/IIN (Bank... #
GET /api/finance/central-bank-rates Headline central-bank policy/benchmark rates side-by-side... #
GET /api/finance/cik-ticker Resolve SEC CIK <-> ticker in both directions. #
GET /api/finance/company-facts Curated XBRL financial metrics for a US public company by... #
GET /api/finance/company-profile Company 360 - a US public company's SEC picture in one call... #
GET /api/finance/figi Map a security identifier to its FIGI (Financial Instrument... #
GET /api/finance/form-144 SEC Form 144 filings - notices of PROPOSED insider stock... #
GET /api/finance/ifsc-india Indian bank branch lookup by IFSC code (the 11-character... #
GET /api/finance/insider-trades Recent SEC Form 4 insider transactions for a US public... #
GET /api/finance/mortgage-pulse Packaged US mortgage & housing-rate snapshot in one call... #
GET /api/finance/sec-filings Recent SEC EDGAR filings for a US publicly-traded company... #
GET /api/finance/security-resolve Universal security-identifier resolver. #
GET /api/finance/thirteen-f Parsed institutional holdings from a 13F-HR filing. #
GET /api/finance/xbrl-frames SEC EDGAR XBRL Frames - one financial concept reported by... #
GET /api/flight/airport-board Live airport activity board. #
GET /api/flight/route-schedule Scheduled flights between two airports over a date window. #
GET /api/flight/status Live flight status and tracking. #
GET /api/food/barcode-lookup Resolve a food product barcode (UPC, EAN-13, EAN-8, etc.)... #
GET /api/food/hygiene-uk UK Food Standards Agency food hygiene ratings (FHRS) for an... #
GET /api/fx/rates Daily reference exchange rates from the European Central... #
GET /api/fx/timeseries Historical daily exchange-rate series from the European... #
GET /api/geo/elevation Ground elevation above sea level for a coordinate, anywhere... #
GET /api/geo/flood-zone Determine the FEMA flood zone for a coordinate. #
GET /api/geo/ip Geolocate a single IPv4 or IPv6 address. #
GET /api/geo/location-dossier Static risk & context dossier for a US location. #
GET /api/geo/nearby Everything around a coordinate in one call: nearby airports... #
GET /api/geo/postal Resolve a postal/ZIP code to its place name(s)... #
GET /api/geo/zip-resolve Resolve a US ZIP code to the census tract(s), county, CBSA... #
GET /api/geocode/address Forward geocoding - free-text address or place name... #
GET /api/geocode/reverse Reverse geocoding - latitude/longitude nearest formatted... #
GET /api/github/branches Branches of a repository: name, head commit sha, and... #
GET /api/github/commits Commit history for a repository: sha, message, author name... #
GET /api/github/contributors Top contributors to a repository, ranked by commit count... #
GET /api/github/issues List issues for a repository (pull requests excluded)... #
GET /api/github/languages Programming-language breakdown of a repository: each... #
GET /api/github/pulls List pull requests for a repository: number, title, state... #
GET /api/github/readme Fetch a repository's README, decoded to UTF-8 text (name... #
GET /api/github/releases List a repository's releases: tag, name, draft/prerelease... #
GET /api/github/repo GitHub repository metadata: full name, owner, description... #
GET /api/github/repos List a user or organization's repositories (each with... #
GET /api/github/search-code Search code across GitHub with the code-search syntax (e.g. #
GET /api/github/search-repos Search GitHub repositories with the full query syntax (e.g. #
GET /api/github/tags Git tags of a repository (name + commit sha), most recent... #
GET /api/github/user GitHub user or organization profile: login, name, company... #
GET /api/gov/bea-gdp Quarterly real GDP by US state from the Bureau of Economic... #
GET /api/gov/bill-summaries Stream the latest US Congressional bill summaries via... #
GET /api/gov/carrier-safety FMCSA motor-carrier (trucking/bus company) safety profile. #
GET /api/gov/congress-amendment Look up or list US Congressional amendments via Congress.gov. #
GET /api/gov/congress-bill Look up or search US Congressional bills via the Library of... #
GET /api/gov/congress-committee List or look up US Congressional committees (Library of... #
GET /api/gov/congress-filings Track US House members' financial-disclosure filings... #
GET /api/gov/congress-hearing Look up or list US Congressional hearings via Congress.gov. #
GET /api/gov/congress-member Look up or search members of the US Congress via Library of... #
GET /api/gov/congress-nomination Look up or list US presidential nominations (cabinet... #
GET /api/gov/congress-record List daily Congressional Record issues via Congress.gov... #
GET /api/gov/congress-trades Search individual US Congress member stock trades, parsed... #
GET /api/gov/congress-treaty Look up or list international treaties transmitted to the... #
GET /api/gov/contract-opportunities Search ACTIVE US federal contract opportunities... #
GET /api/gov/counterparty Federal counterparty due-diligence dossier on one name, in... #
GET /api/gov/disaster-assistance FEMA disaster assistance dollars - how much federal aid was... #
GET /api/gov/disaster-declarations FEMA federal disaster & emergency declarations - every... #
GET /api/gov/district Resolve a US street address to its congressional district... #
GET /api/gov/entity Look up entities registered to do business with the US... #
GET /api/gov/epa-facilities EPA Facility Registry Service (FRS) - every regulated... #
GET /api/gov/eu-tenders Search EU public-procurement notices from TED (Tenders... #
GET /api/gov/exclusions Check whether a person or company is excluded (debarred or... #
GET /api/gov/fair-market-rent HUD Fair Market Rents (FMR) for a US county or state... #
GET /api/gov/fcc-id Resolve an FCC ID (printed on US wireless/electronic... #
GET /api/gov/fda-animalvet-events FDA animal and veterinary adverse event reports, newest first. #
GET /api/gov/fda-device-events FDA medical device adverse event reports (MAUDE), newest... #
GET /api/gov/fda-drug-events Adverse drug event reports from FDA's Adverse Event... #
GET /api/gov/fda-food-recalls FDA food recall enforcement reports, newest first by report... #
GET /api/gov/fda-recalls FDA drug recall enforcement reports, newest first. #
GET /api/gov/fec US federal campaign finance from the FEC (openFEC). #
GET /api/gov/fec-candidate Search US federal political candidates via the OpenFEC API. #
GET /api/gov/fec-committee Search US federal political committees (PACs, super PACs... #
GET /api/gov/fec-contributions Search FEC Schedule A - every itemized contribution to a... #
GET /api/gov/fec-expenditures Search FEC Schedule B - every itemized disbursement (spend... #
GET /api/gov/fec-totals Aggregate financial summaries (receipts, disbursements... #
GET /api/gov/federal-register-recent Newest Federal Register documents by publication date... #
GET /api/gov/foreign-agents Search currently-active FARA (Foreign Agents Registration... #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/2s-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

2s-io-openapi.json Raw ↑
{"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