{"openapi":"3.1.0","info":{"title":"Flop Scout","description":"Web search, page reading and FLOP network data for AI agents, priced per call in FLOP. Miner reliability ranking with settle-rate alerts. Human guide: https://flopscout.com/llms.txt","version":"0.8.0"},"paths":{"/api/health":{"get":{"summary":"Health","description":"Liveness plus whether the gateway actually accepts the key.\n\n`flop_key` used to mean \"a key string is configured\". `flop_key_accepted`\nmeans the gateway answered 200 to an authenticated request, so a revoked key\nshows red. `flop_key_checked_s_ago` says how old that verdict is.","operationId":"health_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/catalog":{"get":{"summary":"Catalog","operationId":"catalog_api_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/quote":{"post":{"summary":"Quote Preview","description":"Price a request before spending anything — no search, no inference, no ledger row.\n\nAn agent that cannot read a price before committing is not autonomous, it is\noptimistic. This is the cheapest endpoint on the box.\n\nWith `q` supplied it also reports the *miner's* inference cost, from the\ngateway's own estimator. That call needs no key and spends nothing, so the\ntwo numbers Scout has always kept apart are shown here side by side before\nanything happens at all.","operationId":"quote_preview_api_quote_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/answer":{"post":{"summary":"Answer","operationId":"answer_api_answer_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/read":{"post":{"summary":"Read Url","description":"Read one public web page and return its main text as Markdown.\n\nNo search and no model: one URL in, the page out, through r.jina.ai. The\nsame URL within 10 minutes is served from cache, free, without touching the\nreader or the caller's quota. Errors carry a stable `error` code: bad_url\nand unresolvable (422), blocked_by_target, target_error, empty_page,\nreader_refused and reader_error (502), reader_busy (503, with Retry-After),\nreader_timeout (504). A read that fails costs nothing and gives the quota\nslot back. Page reads have their own quota, so reading does not use up a\ncaller's answers.","operationId":"read_url_api_read_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/pricing":{"get":{"summary":"Price List","description":"Public price list — what Scout charges per service, in FLOP.\n\nServices the registry dropped (no backend configured) are still listed but\nflagged unavailable: a price for something you cannot buy is a bug, and\nsilently hiding it is a different bug.","operationId":"price_list_api_pricing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/router":{"get":{"summary":"Router State","description":"Live miner ranking from the smart router — chain reliability + local perf.","operationId":"router_state_api_router_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/inference-prices":{"get":{"summary":"Inference Prices","description":"What every FLOP model costs to run, from the gateway's own estimator.\n\nWhat this adds over `/v1/models` is the arithmetic a unit price cannot\nexpress: whole-request FLOP cost, the token split, GFLOPs and the gateway's\nlatency estimate. Measured, `estimated_cost_flop` is exactly\n`pricing.prompt x total_tokens` — no hidden floor or multiplier — so the\nnumber a caller budgets against is the number that will be charged.\n\nAnd it costs nothing to ask. The operation needs no key and spends nothing,\nso this answers while the devnet allowance is dead, which no other FLOP call\nhere does.\n\n`available_miners` is included but is *not* an independent capacity signal:\nmeasured against every live model it equals the count of `price_sources`\nexactly. It is here as a cross-check on Scout's own parse, and the UI should\nnot present it as a second opinion.\n\n`max_tokens` is clamped to the same 32–800 range `/api/answer` accepts, so a\nquote here cannot describe a request that endpoint would refuse.","operationId":"inference_prices_api_inference_prices_get","parameters":[{"name":"max_tokens","in":"query","required":false,"schema":{"type":"integer","default":250,"title":"Max Tokens"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/reliability":{"get":{"summary":"Reliability History","description":"How each miner's settlement rate moved over the window.\n\nThe router has always been snapshot-only. This is the history it lacked:\ndeltas between Scout's own settled/timeout snapshots, not the chain total.","operationId":"reliability_history_api_reliability_get","parameters":[{"name":"window","in":"query","required":false,"schema":{"type":"integer","default":86400,"title":"Window"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/stats":{"get":{"summary":"Stats","operationId":"stats_api_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/analytics":{"get":{"summary":"Analytics","description":"Demand aggregates for the public dashboard.\n\nNever returns question text (`q`) or client identifiers (`client` is the\ncaller's IP). Only counts, shares and per-day totals leave this function.","operationId":"analytics_api_analytics_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/miners":{"get":{"summary":"Miner Explorer","description":"Aggregate FLOP miners: explorer registry + gateway price_sources + local perf log.","operationId":"miner_explorer_api_miners_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/miners/{address}/history":{"get":{"summary":"Miner History","operationId":"miner_history_api_miners__address__history_get","parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string","title":"Address"}},{"name":"window","in":"query","required":false,"schema":{"type":"integer","default":604800,"title":"Window"}},{"name":"points","in":"query","required":false,"schema":{"type":"integer","default":96,"title":"Points"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sessions/coverage":{"get":{"summary":"Sessions Coverage","description":"How much of the explorer's session record Scout holds, and when it last synced.\n\nEvery figure under /api/sessions is a count of compute channels the explorer\nreturned, so anyone can recompute it from\nexplorer.devnet.flop.network/api/compute-channels.","operationId":"sessions_coverage_api_sessions_coverage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/sessions/network":{"get":{"summary":"Sessions Network","description":"Network settlement over a window, raw and over independent demand.\n\n`dominant_agents` lists agent wallets that opened more than 25% of the\nwindow's sessions. Their sessions are excluded from the independent rate,\nbecause on the devnet one such wallet opens most sessions and causes most\ntimeouts, which says more about that agent than about the miners it reached.\nOnly finished sessions (settled or timed out) count.","operationId":"sessions_network_api_sessions_network_get","parameters":[{"name":"window","in":"query","required":false,"schema":{"type":"integer","default":86400,"title":"Window"}},{"name":"buckets","in":"query","required":false,"schema":{"type":"integer","default":24,"title":"Buckets"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sessions/miners":{"get":{"summary":"Sessions Miners","description":"Per-miner settlement over a window from individual sessions, raw and independent.","operationId":"sessions_miners_api_sessions_miners_get","parameters":[{"name":"window","in":"query","required":false,"schema":{"type":"integer","default":86400,"title":"Window"}},{"name":"min_sessions","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Min Sessions"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sessions/miners/{address}":{"get":{"summary":"Sessions Miner","operationId":"sessions_miner_api_sessions_miners__address__get","parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string","title":"Address"}},{"name":"window","in":"query","required":false,"schema":{"type":"integer","default":604800,"title":"Window"}},{"name":"points","in":"query","required":false,"schema":{"type":"integer","default":96,"title":"Points"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/probes":{"get":{"summary":"Probes State","description":"Scout's own probe purchases: policy, caps, per-miner and per-model results, recent rows.\n\nThis is the half of the ranking that cannot be rebuilt from the explorer.\nDisabled until the FLOP testnet opens; the policy is published either way.","operationId":"probes_state_api_probes_get","parameters":[{"name":"window","in":"query","required":false,"schema":{"type":"integer","default":86400,"title":"Window"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/faucet/testnet/claim":{"post":{"summary":"Testnet Faucet Claim","description":"Relay a Testnet faucet claim that was signed in the browser.\n\nThe faucet takes JSON only and has no CORS preflight, so browsers cannot\npost to it directly. The claim is signed locally with the recipient key\n(`flop-faucet-agent/v1|<genesis>|<address>|<nonce>`); Scout only forwards\nit and never sees the key. One relay per client IP per 24h, since every\nrelayed claim counts against Scout's own IP limit at the faucet.","operationId":"testnet_faucet_claim_api_faucet_testnet_claim_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/wallet/{address}/balance":{"get":{"summary":"Wallet Balance","description":"Live on-chain FLOP balance for an SS58 address, read from the node RPC.\n\nThe explorer's `/api/accounts/{address}` reports `\"liveBalance\": false` and\n`\"balance\": \"0\"` on funded wallets, so Scout queries `System::Account` on\nthe Substrate RPC directly. Cached briefly (~2 blocks) per address.","operationId":"wallet_balance_api_wallet__address__balance_get","parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string","title":"Address"}},{"name":"network","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(devnet|testnet)$"},{"type":"null"}],"title":"Network"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/miners/{address}":{"get":{"summary":"Miner Detail","description":"One miner, same shape as a row on /api/miners. Agents should not have to\ndownload 300 rows to read one.","operationId":"miner_detail_api_miners__address__get","parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string","title":"Address"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/alerts":{"post":{"summary":"Create Alert","description":"Subscribe to a settle-rate alert for one miner (or all).\n\nReturns the alert id. Use GET /api/alerts/check to poll, or the service\nwill push to `channel` when the threshold is crossed.\n\nChannel `site` requires no credentials and suits agents that poll.\nChannel `telegram` delivers to the given handle when SCOUT_TG_BOT_TOKEN\nis set server-side; callers supply only the destination handle.","operationId":"create_alert_api_alerts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertReq"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/alerts/check":{"get":{"summary":"Check Alerts","description":"Active alerts and their state, for polling.\n\nEach entry has the miner address (or '*'), the threshold, the channel, the\nmasked handle, `last_rate` (the latest settle rate recorded) and `fired_at`\n(the last time the hourly check found the rate below threshold, or null).\nReading acknowledges nothing: fired_at stays until the next trigger\noverwrites it. Inactive alerts older than 7 days are purged.","operationId":"check_alerts_api_alerts_check_get","parameters":[{"name":"address","in":"query","required":false,"schema":{"type":"string","default":"*","title":"Address"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/alerts/{alert_id}":{"delete":{"summary":"Delete Alert","description":"Deactivate an alert by id.","operationId":"delete_alert_api_alerts__alert_id__delete","parameters":[{"name":"alert_id","in":"path","required":true,"schema":{"type":"integer","title":"Alert Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AlertReq":{"properties":{"address":{"type":"string","title":"Address","description":"SS58 miner address, or '*' for every miner","default":"*"},"threshold":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Threshold","description":"Fire when settle_rate drops below this","default":0.5},"channel":{"type":"string","title":"Channel","description":"'site', 'telegram', or 'twitter'","default":"site"},"handle":{"type":"string","title":"Handle","description":"Chat id / @username for the channel; leave blank for site","default":""}},"type":"object","title":"AlertReq"},"AnswerReq":{"properties":{"q":{"type":"string","maxLength":500,"minLength":2,"title":"Q"},"sources":{"items":{"type":"string"},"type":"array","title":"Sources","default":["keenable"]},"model":{"type":"string","title":"Model","default":"flop:qwen/qwen2.5-0.5b-instruct"},"compare_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compare Model"},"n":{"type":"integer","maximum":8.0,"minimum":1.0,"title":"N","default":3},"max_tokens":{"type":"integer","maximum":800.0,"minimum":32.0,"title":"Max Tokens","default":250},"keys":{"additionalProperties":{"type":"string"},"type":"object","title":"Keys","default":{}}},"type":"object","required":["q"],"title":"AnswerReq"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"QuoteReq":{"properties":{"sources":{"items":{"type":"string"},"type":"array","title":"Sources","default":["keenable"]},"compare_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compare Model"},"cache_hit":{"type":"boolean","title":"Cache Hit","default":false},"keys":{"additionalProperties":{"type":"string"},"type":"object","title":"Keys","default":{}},"q":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Q"},"model":{"type":"string","title":"Model","default":"flop:qwen/qwen2.5-0.5b-instruct"},"max_tokens":{"type":"integer","maximum":800.0,"minimum":32.0,"title":"Max Tokens","default":250}},"type":"object","title":"QuoteReq"},"ReadReq":{"properties":{"url":{"type":"string","maxLength":2000,"minLength":8,"title":"Url"},"max_chars":{"type":"integer","maximum":20000.0,"minimum":500.0,"title":"Max Chars","default":8000},"keys":{"additionalProperties":{"type":"string"},"type":"object","title":"Keys","default":{}}},"type":"object","required":["url"],"title":"ReadReq"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"servers":[{"url":"https://flopscout.com"}],"externalDocs":{"description":"Guide for agents","url":"https://flopscout.com/llms.txt"}}