{"version":1,"resources":["https://stableflare.dev/api/browser/content","https://stableflare.dev/api/replicate/models/search","https://stableflare.dev/api/replicate/models/get","https://stableflare.dev/api/replicate/models/versions","https://stableflare.dev/api/replicate/collections/list","https://stableflare.dev/api/replicate/collections/get","https://stableflare.dev/api/replicate/predictions/create-image","https://stableflare.dev/api/replicate/predictions/create-video","https://stableflare.dev/api/replicate/predictions/create-audio","https://stableflare.dev/api/replicate/predictions/create-text","https://stableflare.dev/api/replicate/predictions/get","https://stableflare.dev/api/replicate/predictions/cancel","https://stableflare.dev/api/browser/screenshot","https://stableflare.dev/api/browser/pdf","https://stableflare.dev/api/browser/markdown","https://stableflare.dev/api/browser/json","https://stableflare.dev/api/browser/scrape","https://stableflare.dev/api/browser/links","https://stableflare.dev/api/browser/crawl","https://stableflare.dev/api/browser/crawl/poll","https://stableflare.dev/api/images/upload","https://stableflare.dev/api/images/transform"],"mppResources":["https://stableflare.dev/api/browser/content","https://stableflare.dev/api/replicate/predictions/create-image","https://stableflare.dev/api/replicate/predictions/create-video","https://stableflare.dev/api/replicate/predictions/create-audio","https://stableflare.dev/api/replicate/predictions/create-text","https://stableflare.dev/api/browser/screenshot","https://stableflare.dev/api/browser/pdf","https://stableflare.dev/api/browser/markdown","https://stableflare.dev/api/browser/json","https://stableflare.dev/api/browser/scrape","https://stableflare.dev/api/browser/links","https://stableflare.dev/api/browser/crawl","https://stableflare.dev/api/images/upload","https://stableflare.dev/api/images/transform"],"description":"Replicate AI models and Cloudflare Browser Rendering via x402 micropayments. No API keys needed.","instructions":"# Cloudflare API\n> Replicate AI models and Cloudflare Browser Rendering via x402/MPP micropayments. All endpoints POST.\n\n## Base URL\nhttps://cloudflare-api.dev\n\n## Auth\nx402/MPP payment (USDC on Base, Solana, or Tempo). Use check_endpoint_schema on any endpoint to get its request schema before calling.\n\n---\n\n## Replicate — AI Models (official models only)\n\n### Workflow (read this first)\n1. **models/search** to find candidates. Each result has a `category` field (`image` | `video` | `audio` | `text`) — use that to pick the create endpoint, not a guess from the name.\n2. **models/get** before running any model. The returned `latest_version.openapi_schema` shows per-parameter types AND descriptions that contain hidden constraints (max audio duration, supported aspect ratios, required formats, etc). Input schemas vary wildly per model — omni-human takes image+audio, sync/lipsync takes video+audio, seedance takes prompt+duration+resolution. Do not guess inputs.\n3. **create-{image,video,text}** with `{ \"model\": \"owner/name\", \"input\": {...} }`. Returns `{ id, status }` immediately. Payment settles on submission.\n4. **predictions/get** to poll status. Poll every 30–60s — faster wastes requests and may hit Replicate rate limits. Video/audio runs routinely take 1–10 minutes.\n\n### Discovery (free, SIWX)\n/api/replicate/models/search — Search official models. Returns owner, name, category, description.\nExample: POST /api/replicate/models/search { \"query\": \"flux image generation\" }\n\n/api/replicate/models/get — Model details including latest_version.openapi_schema. **Call this before every first run of a model.**\nExample: POST /api/replicate/models/get { \"owner\": \"black-forest-labs\", \"name\": \"flux-schnell\" }\n\n/api/replicate/models/versions — List versions for a specific model\n/api/replicate/collections/list — List curated collections\n/api/replicate/collections/get — Get models in a collection by slug\n\n### Run models\n/api/replicate/predictions/create-image ($0.10) — image generation, editing, upscaling\nExample: POST /api/replicate/predictions/create-image { \"model\": \"black-forest-labs/flux-schnell\", \"input\": { \"prompt\": \"a cat wearing a top hat\" } }\n\n/api/replicate/predictions/create-video ($1.00) — video generation, editing, animation, lipsync, image-to-video\n/api/replicate/predictions/create-audio ($1.00) — text-to-speech, music generation, voice cloning, audio generation\n/api/replicate/predictions/create-text ($0.05) — language models, chat, completion, embeddings, speech-to-text\n\n/api/replicate/predictions/get (free, SIWX) — poll prediction status\n/api/replicate/predictions/cancel (free, SIWX) — cancel a running prediction\n\n### Important: failures are not refunded\nPayment settles when you POST to create-*. If the prediction later fails (status `failed`, upstream error, timeout) you are NOT automatically refunded. **Always call models/get and validate your input against `latest_version.openapi_schema` before submitting** — especially for create-video ($1.00). Constraints like \"audio ≤15s\" live in parameter `description` fields, not in the top-level schema.\n\n---\n\n## Browser Rendering — Cloudflare headless browser\n\n/api/browser/screenshot — Capture screenshot of any URL ($0.05)\nExample: POST /api/browser/screenshot { \"url\": \"https://example.com\", \"screenshotOptions\": { \"fullPage\": true } }\n\n/api/browser/pdf — Render URL as PDF ($0.05)\nExample: POST /api/browser/pdf { \"url\": \"https://example.com\" }\n\n/api/browser/markdown — Extract clean Markdown ($0.02)\nExample: POST /api/browser/markdown { \"url\": \"https://example.com\" }\n\n/api/browser/json — AI-powered structured data extraction ($0.05)\nExample: POST /api/browser/json { \"url\": \"https://example.com\", \"prompt\": \"Extract all product names and prices\" }\n\n/api/browser/scrape — Scrape elements by CSS selector ($0.02)\nExample: POST /api/browser/scrape { \"url\": \"https://example.com\", \"elements\": [{ \"selector\": \"h1\" }, { \"selector\": \"a\" }] }\n\n/api/browser/content — Fetch fully rendered HTML ($0.02)\nExample: POST /api/browser/content { \"url\": \"https://example.com\" }\n\n/api/browser/links — Extract all links from a page ($0.02)\nExample: POST /api/browser/links { \"url\": \"https://example.com\", \"visibleLinksOnly\": true }\n\nAll browser endpoints support: cookies, authenticate, userAgent, waitForSelector, gotoOptions.\n\n/api/browser/crawl — Start an async crawl job ($0.10)\nExample: POST /api/browser/crawl { \"url\": \"https://example.com/docs/\", \"limit\": 10, \"depth\": 2, \"formats\": [\"markdown\"] }\nReturns { \"token\": \"<jwt>\" } — use the token to poll for results.\n\nGET /api/browser/crawl/poll?token=<jwt> — Poll crawl results (free, SIWX auth)\nReturns crawled pages with markdown/html/json content. Only the wallet that started the crawl can poll.\n\n---\n\n## Images — Cloudflare Images upload + on-the-fly transforms\n\n/api/images/upload — Upload an image by URL ($0.01)\nExample: POST /api/images/upload { \"url\": \"https://example.com/photo.jpg\" }\nReturns { \"id\": \"abc123\", \"variants\": [\"https://imagedelivery.net/.../public\"], ... }\n\n/api/images/transform — Generate a transformed delivery URL ($0.01)\nExample: POST /api/images/transform { \"image_id\": \"abc123\", \"width\": 800, \"format\": \"webp\", \"quality\": 80 }\nReturns { \"url\": \"https://imagedelivery.net/.../w=800,format=webp,quality=80\", ... }\n\nSupports: width, height, fit (scale-down/contain/cover/crop/pad), quality, format (webp/avif/jpeg/png), gravity (auto/face), rotate, blur, sharpen, brightness, contrast, dpr, metadata.\n\nWorkflow: upload once, then generate as many transform URLs as needed. Transforms are cached on CF's edge.\n"}