# floprouter > The floprouter API: one HTTP API for every GPU miner and model on FLOP Network. - [Overview](https://docs.floprouter.com/index.md): What floprouter is, what happens on each request, and where to start. - [Quickstart](https://docs.floprouter.com/quickstart.md): Send a first request in three steps with plain HTTP. - [Authentication](https://docs.floprouter.com/authentication.md): Wallet sign-in, API keys, and how to get a key from a script without a browser. - [Models](https://docs.floprouter.com/models.md): Which models the network serves, how to name them, and how one request shape covers all of them. - [Provider selection](https://docs.floprouter.com/routing.md): Choose miners with the provider object, or let auto mode choose by score. - [Fallbacks](https://docs.floprouter.com/fallbacks.md): What the router does when a miner fails, and when it stops trying. - [Payer modes and grants](https://docs.floprouter.com/payer-modes.md): Who pays on chain for each session, and why the grant keeps the on-chain record with your wallet. - [Prepaid FLOP balance](https://docs.floprouter.com/balance.md): Fund your prepaid balance, read it, and see what was taken from it. - [Fees and pricing](https://docs.floprouter.com/fees.md): What a request costs, who receives it, and how to fund a balance. - [Withdrawals](https://docs.floprouter.com/withdrawals.md): Send your prepaid balance back to your wallet. - [Streaming](https://docs.floprouter.com/streaming.md): Text as the miner decodes it, how it is verified, and what the stream carries. - [Payment channels and sessions](https://docs.floprouter.com/sessions.md): What a session is, how its payment channel moves on chain, and how to read both. - [Settlement](https://docs.floprouter.com/settlement.md): Timing, session states, and how to follow a payment channel to its final state on chain. - [Errors](https://docs.floprouter.com/errors.md): The error shape, every error code, and what to do about each. - [Limits and supported fields](https://docs.floprouter.com/limits.md): Which request fields work, which are ignored or rejected, and the limits on each request. - [FAQ](https://docs.floprouter.com/faq.md): Short answers to the questions people ask first. - [Good to know](https://docs.floprouter.com/good-to-know.md): How requests, prices and payments work on FLOP Network, and what the API does not offer. - [API reference](https://docs.floprouter.com/api-reference/overview.md): Every endpoint of the floprouter API, with a console to try requests. - [Chat completion, settled on chain](https://docs.floprouter.com/api-reference/inference/chat-completion-settled-on-chain.md): Chooses a miner (or follows `provider`), opens a payment channel with the caller's payer mode, runs one verified turn, and answers with the reply. If an attempt fails before any output, the next miner is tried, then the next model of `models`. Grant mode opens channels with miners' signed offers onl… - [Generation stats for a session](https://docs.floprouter.com/api-reference/inference/generation-stats-for-a-session.md): Tokens, cost in FLOP, finish reasons, latency, app headers, the verified reply, and the session (settlement record) under `flop`. A wallet's generations need that wallet's key. - [The calling wallet's sessions, newest first](https://docs.floprouter.com/api-reference/inference/the-calling-wallets-sessions-newest-first.md) - [A session's status, cost and on-chain record](https://docs.floprouter.com/api-reference/inference/a-sessions-status-cost-and-on-chain-record.md): Settlement state of one session: channel, miner, payer, escrow, router fee, on-chain blocks and transaction, every attempt. Readable by anyone holding the id (an unguessable value); the reply text is included only for the wallet that owns the session. - [Models](https://docs.floprouter.com/api-reference/models/models.md) - [Number of models](https://docs.floprouter.com/api-reference/models/number-of-models.md) - [One model by its id](https://docs.floprouter.com/api-reference/models/one-model-by-its-id.md) - [One model by its id (singular path)](https://docs.floprouter.com/api-reference/models/one-model-by-its-id-singular-path.md) - [Miners serving a model (its endpoints)](https://docs.floprouter.com/api-reference/models/miners-serving-a-model-its-endpoints.md): One endpoint per miner that proved it serves the model. status: 0 live and ready, -1 reachable not ready, -2 not answering. uptime_last_1d: share of signed-proof probes that succeeded; latency_last_30m.p50: mean seconds to the verified reply (both all time). The miner details are under `flop`. - [Every registered miner with score, facts, models and endpoint status](https://docs.floprouter.com/api-reference/directory/every-registered-miner-with-score-facts-models-and-endpoint-status.md) - [One miner in detail](https://docs.floprouter.com/api-reference/directory/one-miner-in-detail.md) - [Submit a session URL for a miner](https://docs.floprouter.com/api-reference/directory/submit-a-session-url-for-a-miner.md): Anyone may submit. The URL is accepted only if the worker behind it answers a fresh challenge with a signed `/session/info-proof` that names this miner account and this chain, and the signing session key is tied to the miner account on chain (a miner-signed offer or a past channel). Accepted entries… - [Network totals for the website](https://docs.floprouter.com/api-reference/directory/network-totals-for-the-website.md): Miners (registered, active, calibrated, reachable, ready), models, sessions routed by this router with their settle rate, and every channel on the network from finalized chain events. No key needed. - [Providers: a thin alias view of /v1/miners](https://docs.floprouter.com/api-reference/directory/providers:-a-thin-alias-view-of-v1miners.md): Miners with a proven session endpoint, in the provider shape (`slug` = miner address). The miner directory is `GET /v1/miners`. - [Get a challenge for a wallet to sign](https://docs.floprouter.com/api-reference/auth/get-a-challenge-for-a-wallet-to-sign.md) - [List the calling wallet's keys](https://docs.floprouter.com/api-reference/auth/list-the-calling-wallets-keys.md) - [Exchange a signed challenge for an API key](https://docs.floprouter.com/api-reference/auth/exchange-a-signed-challenge-for-an-api-key.md): The challenge is single-use and expires after 10 minutes. The key is shown once. - [Revoke a key of the calling wallet](https://docs.floprouter.com/api-reference/auth/revoke-a-key-of-the-calling-wallet.md) - [Change a key's default payer mode](https://docs.floprouter.com/api-reference/auth/change-a-keys-default-payer-mode.md) - [The calling key: usage in FLOP and limits](https://docs.floprouter.com/api-reference/auth/the-calling-key:-usage-in-flop-and-limits.md): `limit` is null: spending is bounded by the wallet's prepaid balance (GET /v1/balance) and, in grant mode, by the grant's caps. Usage counts sessions paid through this key (UTC day, week from Monday, month). - [The grant to sign for grant mode](https://docs.floprouter.com/api-reference/grants/the-grant-to-sign-for-grant-mode.md): Delegate address, chain limits, suggested caps, and the exact `createSession` call (arguments and SCALE call data) for the wallet to sign. With a key, for the key's wallet; without one, pass `address`. Read-only: nothing is reserved. The delegate shown is the one this wallet already granted, else th… - [Re-read the calling wallet's grant from the chain](https://docs.floprouter.com/api-reference/grants/re-read-the-calling-wallets-grant-from-the-chain.md) - [The calling wallet's grant state](https://docs.floprouter.com/api-reference/grants/the-calling-wallets-grant-state.md): Lifetime and daily room, expiry, and an estimate of sessions left. Grants expire after at most `max_session_duration_blocks` (10 days on devnet); sign a new one before then. A grant cannot be renewed by the router: the chain does not let a session call the session-key pallet. - [Prepaid balance, deposit address, recent ledger entries](https://docs.floprouter.com/api-reference/balance/prepaid-balance-deposit-address-recent-ledger-entries.md) - [Withdraw prepaid balance to the owning wallet](https://docs.floprouter.com/api-reference/balance/withdraw-prepaid-balance-to-the-owning-wallet.md): Sends FLOP from the deposit wallet to the wallet that owns the API key, and nowhere else. The amount is held first, so it cannot race a session or another withdrawal (one withdrawal per wallet in flight). The chain fee is estimated and taken out of the amount sent; the ledger books `withdrawal` (wha… - [The calling wallet's withdrawals](https://docs.floprouter.com/api-reference/balance/the-calling-wallets-withdrawals.md) - [State of one withdrawal](https://docs.floprouter.com/api-reference/balance/state-of-one-withdrawal.md) - [Sync state of the registry, event index, endpoint registry, sources and payer](https://docs.floprouter.com/api-reference/service/sync-state-of-the-registry-event-index-endpoint-registry-sources-and-payer.md): Sync state of every part. Never requires the origin header. `event_index.last_error` is the last error seen; `consecutive_failures` and `last_ok_at` say whether it is current. `status` is `degraded` while finality lags more than `api.maxFinalityLagBlocks` blocks behind the best block (`finality`). - [This document](https://docs.floprouter.com/api-reference/service/this-document.md) - [Agent skill](https://docs.floprouter.com/for-agents.md): Hand the integration to a coding agent with one prompt and a hosted skill file. - [MCP server](https://docs.floprouter.com/mcp-server.md): Add floprouter's tools to Claude Code, Claude Desktop, Cursor, VS Code, Windsurf, Codex CLI, Cline, Zed, Gemini CLI, Continue or any MCP client. - [CLI](https://docs.floprouter.com/cli.md): Browse miners, chat, and do the wallet steps (key, grant, deposit) from a terminal. - [SDK compatibility](https://docs.floprouter.com/compatibility.md): Use floprouter from SDKs, frameworks and editor tools that let you set a base URL for a chat completions API. - [Examples](https://docs.floprouter.com/examples.md): Small, complete patterns: a client module, a streaming reader, and an agent loop without tool calls. - [For miner operators](https://docs.floprouter.com/miner-operators.md): Make your miner reachable, see how it is scored, and what the router checks. - [Miners and scores](https://docs.floprouter.com/miners.md): How the directory is built, what the score is made from, and how a miner operator submits an endpoint. ## OpenAPI Specs - [openapi](/openapi.json) This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.