{"components":{"securitySchemes":{"x402":{"description":"x402 micropayment. Call without X-Payment to get 402+terms. Sign EIP-3009 USDC transfer. Retry with X-Payment header.","scheme":"x402","type":"http"}}},"info":{"description":"Utilities for agents that need cheaper context. Read webpages to markdown, extract JSON, reduce long prompts, ask Claude cheaper. USDC on Base via x402.","title":"romefeller.app","version":"1.0.0"},"openapi":"3.1.0","paths":{"/ask-cheap":{"post":{"description":"Accepts a prompt or multi-turn chat history, internally reduces the input, then sends it to Claude and returns the answer along with token savings statistics. From $0.015 USDC.","requestBody":{"content":{"application/json":{"schema":{"properties":{"fidelity":{"description":"Semantic fidelity target 0.0-1.0, default 0.95","type":"number"},"messages":{"description":"Chat messages to send to Claude","items":{"properties":{"content":{"type":"string"},"role":{"type":"string"}},"required":["role","content"],"type":"object"},"type":"array"},"model":{"description":"Claude model to use, default claude-sonnet-4-6","type":"string"},"preserve_mode":{"enum":["strict"],"type":"string"}},"required":["messages"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"answer":{"description":"Claude's response","type":"string"},"compression_ratio":{"description":"optimized/original token ratio","type":"number"},"model":{"description":"Model used","type":"string"},"optimized_tokens":{"description":"Input tokens after reduction","type":"integer"},"original_tokens":{"description":"Input tokens before reduction","type":"integer"},"saved_input_tokens":{"description":"Input tokens saved","type":"integer"}},"type":"object"}}},"description":"Successful result"},"400":{"description":"Invalid request"},"402":{"description":"Payment required. Body contains x402 payment terms."},"500":{"description":"Internal error"}},"security":[{"x402":[]}],"summary":"Ask Claude through an optimized context path","x-agent-keywords":["cheap Claude","Claude with compressed context","optimized context QA","LLM answer API","reduce Claude cost"],"x-bazaar-discovery":{"buyer_intents":["I need to ask Claude cheaply","I need to answer a long-context question","I need Claude with compressed input","I need a paid x402 LLM answer endpoint"],"description":"Reduce input context first, then ask Claude and return the answer with token savings statistics.","enabled":true},"x-payment-required":true}},"/health":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"earned_usdc":{"type":"string"},"network":{"type":"string"},"requests":{"type":"object"},"status":{"type":"string"},"uptime":{"type":"integer"}},"type":"object"}}},"description":"Status, uptime, per-route counts, earned USDC"}},"summary":"Health check and earnings"}},"/jsonify":{"post":{"description":"Given any text and a JSON Schema, extract matching structured data. Works for invoices, emails, contracts, receipts, anything. From $0.015 USDC.","requestBody":{"content":{"application/json":{"schema":{"properties":{"schema":{"description":"JSON Schema describing the fields to extract","type":"object"},"text":{"description":"Input text to extract from","type":"string"}},"required":["text","schema"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"confidence":{"description":"Field name to confidence score (0.0-1.0)","type":"object"},"data":{"description":"Extracted fields matching the schema","type":"object"},"missing":{"description":"Required fields not found in text","items":{"type":"string"},"type":"array"}},"type":"object"}}},"description":"Successful result"},"400":{"description":"Invalid request"},"402":{"description":"Payment required. Body contains x402 payment terms."},"500":{"description":"Internal error"}},"security":[{"x402":[]}],"summary":"Extract JSON from text using a JSON Schema","x-agent-keywords":["text to JSON","schema extraction","JSON extraction","invoice parser","receipt parser","email parser","contract extraction"],"x-bazaar-discovery":{"buyer_intents":["I need to extract JSON from text","I need to parse invoices","I need to convert emails into JSON","I need schema-based extraction"],"description":"Extract structured JSON from messy text using a caller-supplied JSON Schema.","enabled":true},"x-payment-required":true}},"/read":{"post":{"description":"Fetch any webpage or PDF URL and return readable article text, clean markdown, page title, language, and publication date. Ideal for research agents, content ingestion, and web research pipelines. Flat $0.002 USDC per call.","requestBody":{"content":{"application/json":{"schema":{"properties":{"url":{"description":"The URL to fetch and convert to markdown","format":"uri","type":"string"}},"required":["url"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"language":{"description":"Detected language code","type":"string"},"markdown":{"description":"Clean markdown content","type":"string"},"published_at":{"description":"Publication date if found","type":"string"},"title":{"description":"Page title","type":"string"}},"type":"object"}}},"description":"Successful result"},"400":{"description":"Invalid request"},"402":{"description":"Payment required. Body contains x402 payment terms."},"500":{"description":"Internal error"}},"security":[{"x402":[]}],"summary":"Fetch any URL or PDF to clean markdown","x-agent-keywords":["webpage to markdown","PDF to markdown","AI crawler","RAG ingestion","article extraction","URL extraction","x402 paid scraping"],"x-bazaar-discovery":{"buyer_intents":["I need to read a webpage as markdown","I need to convert a PDF URL to markdown","I need content for RAG ingestion","I need an x402 paid web extraction API"],"description":"Convert a webpage or PDF URL into clean markdown for AI crawlers, research agents, RAG ingestion, and content extraction.","enabled":true},"x-payment-required":true}},"/token-reducer":{"post":{"description":"Reduce a long prompt or multi-turn chat history into a smaller task-preserving form. Keeps critical constraints, code, URLs, numbers, and explicit facts. Returns optimized messages plus token savings statistics. From $0.005 USDC.","requestBody":{"content":{"application/json":{"schema":{"properties":{"fidelity":{"description":"Semantic fidelity target 0.0-1.0, default 0.95","type":"number"},"messages":{"description":"Chat messages to compact","items":{"properties":{"content":{"type":"string"},"role":{"type":"string"}},"required":["role","content"],"type":"object"},"type":"array"},"preserve_mode":{"description":"Default: strict","enum":["strict"],"type":"string"},"target_model":{"description":"Target model name, default claude-sonnet-4-6","type":"string"}},"required":["messages"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"compression_ratio":{"description":"optimized/original token ratio","type":"number"},"estimated_savings_pct":{"description":"Percentage reduction","type":"number"},"messages":{"description":"Optimized messages","type":"array"},"optimized_tokens":{"description":"Token count after compression","type":"integer"},"original_tokens":{"description":"Token count before compression","type":"integer"},"protected_spans_preserved":{"description":"Count of verbatim-preserved spans","type":"integer"},"saved_tokens":{"description":"Tokens saved","type":"integer"},"warnings":{"items":{"type":"string"},"type":"array"}},"type":"object"}}},"description":"Successful result"},"400":{"description":"Invalid request"},"402":{"description":"Payment required. Body contains x402 payment terms."},"500":{"description":"Internal error"}},"security":[{"x402":[]}],"summary":"Compact a long prompt or chat history","x-agent-keywords":["prompt compression","token reducer","context compression","Claude token optimizer","LLM cost reduction","agent memory compression"],"x-bazaar-discovery":{"buyer_intents":["I need to reduce prompt tokens","I need to compress chat history","I need to lower Claude input cost","I need to fit context into a smaller model window"],"description":"Compress long prompts and chat histories while preserving constraints, facts, code, URLs, and numbers.","enabled":true},"x-payment-required":true}}},"servers":[{"description":"base-mainnet","url":"https://romefeller.app"}],"x-discovery":{"agent":"https://romefeller.app/.well-known/agent.json","capabilities":"https://romefeller.app/.well-known/capabilities.json","commerce":"https://romefeller.app/commerce.txt","health":"https://romefeller.app/health","llms_txt":"https://romefeller.app/llms.txt","mcp":"https://romefeller.app/mcp.json","openapi":"https://romefeller.app/openapi.json","x402_catalog":"https://romefeller.app/.well-known/x402.json"},"x-x402":{"currency":"USDC","discovery":"/.well-known/x402.json","network":"base-mainnet","payTo":"0x2a4dcdf273be222903629ff3a2222065b017309d","preview":"/preview","protocol":"x402"}}