curl --request POST \ --url https://api.floprouter.com/v1/chat/completions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "model": "qwen/qwen3-8b", "max_tokens": 60, "messages": [ { "role": "system", "content": "You are a pirate. Answer every question in one short sentence of pirate speech." }, { "role": "user", "content": "My name is Ada. What is 2 + 2?" }, { "role": "assistant", "content": "Arr, that be 4, matey!" }, { "role": "user", "content": "What is my name?" } ]}'
{ "id": "gen-mwu3v1s3-ab700a21edac", "object": "chat.completion", "created": 1795489132, "model": "qwen/qwen3-8b", "provider": "5HKiGNFSqSyEMVMjjr8JBKkkppytaqFZCRm27KGbCeHhUq92", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "The user pays for this request.", "refusal": null, "reasoning": null }, "finish_reason": "stop", "logprobs": null, "native_finish_reason": "stop" } ], "usage": { "prompt_tokens": 29, "completion_tokens": 8, "total_tokens": 37, "prompt_tokens_details": { "cached_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 0 }, "cost": 0.0105, "is_byok": false, "cost_details": { "upstream_inference_cost": 0.01, "upstream_inference_prompt_cost": 0.007838, "upstream_inference_completions_cost": 0.002162, "router_fee": 0.0005, "currency": "FLOP", "final": false } }, "flop": { "session_id": "gen-mwu3v1s3-ab700a21edac", "status": "settling", "model": "Qwen/Qwen3-8B", "model_hash": "0xfab8ec57f3bc1b5d4ca644fe12fab2ca1c35c24697d577c610b382cfea14d52d", "created_at": "2026-11-24T02:58:37.000Z", "channel_id": "0xcddfd0102e2155f8e604bf7b0ad1c22a204112b2be7de6a0f374faa5c3f42e33", "miner": "5HKiGNFSqSyEMVMjjr8JBKkkppytaqFZCRm27KGbCeHhUq92", "endpoint": "https://miner-002.0xmakase.co.jp", "via": "offer", "payer": { "address": "5F29vNoqgKpXxgUyz4DXifLnfAPQUQCq3ZQXGVjVbxp7sWBS", "kind": "session-key", "mode": "grant", "fallback_from": null, "account": "5F29vNoqgKpXxgUyz4DXifLnfAPQUQCq3ZQXGVjVbxp7sWBS", "delegate": "5EfBc9f69NuPUV9zue18zeURWriF64Q9d7MN7h626D3pm2r7", "note": "The on-chain payer (channel agent) is 5F29vNoqgKpXxgUyz4DXifLnfAPQUQCq3ZQXGVjVbxp7sWBS, through a flopSessionKeys grant to the router's delegate 5EfBc9f69NuPUV9zue18zeURWriF64Q9d7MN7h626D3pm2r7; the delegate signed the open and paid its transaction fee, the escrow came from 5F29vNoqgKpXxgUyz4DXifLnfAPQUQCq3ZQXGVjVbxp7sWBS." }, "escrow": "0.01", "miner_paid": null, "router_fee": { "percent": 5, "amount": "0.0005", "charged": false, "charged_amount": null, "status": "pending", "note": "Charged from the prepaid balance only when the session's channel settles paid." }, "wire": "flop.chat-turn.v2", "currency": "FLOP", "network": "devnet", "on_chain": { "open_block": 4493717, "outcome": null, "outcome_block": null, "outcome_tx": null }, "usage": { "prompt_tokens": 29, "completion_tokens": 8, "finish_reason": "stop" }, "error": null, "attempts": [ { "n": 1, "miner": "5HKiGNFSqSyEMVMjjr8JBKkkppytaqFZCRm27KGbCeHhUq92", "endpoint": "https://miner-002.0xmakase.co.jp", "via": "offer", "channel_id": "0xcddfd0102e2155f8e604bf7b0ad1c22a204112b2be7de6a0f374faa5c3f42e33", "escrow": "0.01", "status": "settled", "stage": "settlement", "error": null, "outcome": "settled", "miner_paid": "0.0085", "refunded": null, "open_block": 4493717, "outcome_block": 4493761, "outcome_tx": "0x10e0b1517da1fae6b5dcdeb08cde2efcc33f488a34b9f66bf8bafe438796b57a", "first_output_ms": 14748, "recovery": [] } ], "links": { "channel": "https://explorer.devnet.flop.network/api/compute-channels/0xcddfd0102e2155f8e604bf7b0ad1c22a204112b2be7de6a0f374faa5c3f42e33", "session": "/v1/sessions/gen-mwu3v1s3-ab700a21edac" }, "ignored_parameters": [ "temperature" ] }}
{
"id": "gen-mwu3v1s3-ab700a21edac",
"object": "chat.completion.pending",
"created": 1795489132,
"model": "qwen/qwen3-8b",
"status": "pending",
"message": "no verified reply within 85 s; the generation continues. Poll GET /api/v1/generation?id=gen-mwu3v1s3-ab700a21edac (or GET /api/v1/sessions/gen-mwu3v1s3-ab700a21edac) until it has a reply, or use stream: true.",
"poll": "/v1/sessions/gen-mwu3v1s3-ab700a21edac",
"flop": null,
"generation": "/api/v1/generation?id=gen-mwu3v1s3-ab700a21edac"
}
{
"error": {
"code": 400,
"message": "each message needs a role of system, developer, user or assistant (tool messages are not supported)",
"metadata": {
"reason": "invalid_message"
}
}
}
{
"error": {
"code": 401,
"message": "a wallet API key is required (Authorization: Bearer fr_...); see POST /v1/auth/challenge",
"metadata": {
"reason": "unauthorized"
}
}
}
{
"error": {
"code": 402,
"message": "prepaid balance 0 FLOP available cannot cover 0.0105 FLOP (escrow plus router fee); send FLOP to the deposit address, see GET /v1/balance",
"metadata": {
"reason": "insufficient_balance",
"available": "0",
"required": "0.0105",
"session_id": "gen-mwu3pgp7-1130f87d046b"
}
}
}
{
"error": {
"code": 403,
"message": "requests must come through the public endpoint",
"metadata": {
"reason": "forbidden"
}
}
}
{
"error": {
"code": 404,
"message": "no such session",
"metadata": {
"reason": "session_not_found"
}
}
}
{
"error": {
"code": 429,
"message": "chat requests for this key: limit 20 per minute; retry in 41 s",
"metadata": {
"reason": "rate_limited"
}
}
}
{
"error": {
"code": 503,
"message": "no miner completed the request after 1 attempt(s): 5HKiGNFSqSyEMVMjjr8JBKkkppytaqFZCRm27KGbCeHhUq92: computeChannel.MinerCapacityFullyReserved: D-0542: the miner's live capacity reservations leave no room for this channel's rate.",
"metadata": {
"reason": "all_attempts_failed",
"session_id": "gen-mwu3pgp7-1130f87d046b"
}
}
}
Inference
Chat completion, settled on chain
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 only: miners with a live offer are tried first, and when none has one the request waits up to 40 s for a fresh offer before moving on. Also served at /api/v1/chat/completions. A non-streaming call answers with one JSON body however long it takes: when no answer exists after 75 s the headers are sent; until then every answer, error or not, has its own HTTP status and a space is written every 10 s until the body follows (JSON allows leading whitespace); an error after that point is the JSON error body with status 200. With flop.async: true the call instead answers 202 chat.completion.pending when no reply exists within about 85 s. Closing the connection cancels the request (nothing is signed afterwards).
POST
/
v1
/
chat
/
completions
curl --request POST \ --url https://api.floprouter.com/v1/chat/completions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "model": "qwen/qwen3-8b", "max_tokens": 60, "messages": [ { "role": "system", "content": "You are a pirate. Answer every question in one short sentence of pirate speech." }, { "role": "user", "content": "My name is Ada. What is 2 + 2?" }, { "role": "assistant", "content": "Arr, that be 4, matey!" }, { "role": "user", "content": "What is my name?" } ]}'
{ "id": "gen-mwu3v1s3-ab700a21edac", "object": "chat.completion", "created": 1795489132, "model": "qwen/qwen3-8b", "provider": "5HKiGNFSqSyEMVMjjr8JBKkkppytaqFZCRm27KGbCeHhUq92", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "The user pays for this request.", "refusal": null, "reasoning": null }, "finish_reason": "stop", "logprobs": null, "native_finish_reason": "stop" } ], "usage": { "prompt_tokens": 29, "completion_tokens": 8, "total_tokens": 37, "prompt_tokens_details": { "cached_tokens": 0 }, "completion_tokens_details": { "reasoning_tokens": 0 }, "cost": 0.0105, "is_byok": false, "cost_details": { "upstream_inference_cost": 0.01, "upstream_inference_prompt_cost": 0.007838, "upstream_inference_completions_cost": 0.002162, "router_fee": 0.0005, "currency": "FLOP", "final": false } }, "flop": { "session_id": "gen-mwu3v1s3-ab700a21edac", "status": "settling", "model": "Qwen/Qwen3-8B", "model_hash": "0xfab8ec57f3bc1b5d4ca644fe12fab2ca1c35c24697d577c610b382cfea14d52d", "created_at": "2026-11-24T02:58:37.000Z", "channel_id": "0xcddfd0102e2155f8e604bf7b0ad1c22a204112b2be7de6a0f374faa5c3f42e33", "miner": "5HKiGNFSqSyEMVMjjr8JBKkkppytaqFZCRm27KGbCeHhUq92", "endpoint": "https://miner-002.0xmakase.co.jp", "via": "offer", "payer": { "address": "5F29vNoqgKpXxgUyz4DXifLnfAPQUQCq3ZQXGVjVbxp7sWBS", "kind": "session-key", "mode": "grant", "fallback_from": null, "account": "5F29vNoqgKpXxgUyz4DXifLnfAPQUQCq3ZQXGVjVbxp7sWBS", "delegate": "5EfBc9f69NuPUV9zue18zeURWriF64Q9d7MN7h626D3pm2r7", "note": "The on-chain payer (channel agent) is 5F29vNoqgKpXxgUyz4DXifLnfAPQUQCq3ZQXGVjVbxp7sWBS, through a flopSessionKeys grant to the router's delegate 5EfBc9f69NuPUV9zue18zeURWriF64Q9d7MN7h626D3pm2r7; the delegate signed the open and paid its transaction fee, the escrow came from 5F29vNoqgKpXxgUyz4DXifLnfAPQUQCq3ZQXGVjVbxp7sWBS." }, "escrow": "0.01", "miner_paid": null, "router_fee": { "percent": 5, "amount": "0.0005", "charged": false, "charged_amount": null, "status": "pending", "note": "Charged from the prepaid balance only when the session's channel settles paid." }, "wire": "flop.chat-turn.v2", "currency": "FLOP", "network": "devnet", "on_chain": { "open_block": 4493717, "outcome": null, "outcome_block": null, "outcome_tx": null }, "usage": { "prompt_tokens": 29, "completion_tokens": 8, "finish_reason": "stop" }, "error": null, "attempts": [ { "n": 1, "miner": "5HKiGNFSqSyEMVMjjr8JBKkkppytaqFZCRm27KGbCeHhUq92", "endpoint": "https://miner-002.0xmakase.co.jp", "via": "offer", "channel_id": "0xcddfd0102e2155f8e604bf7b0ad1c22a204112b2be7de6a0f374faa5c3f42e33", "escrow": "0.01", "status": "settled", "stage": "settlement", "error": null, "outcome": "settled", "miner_paid": "0.0085", "refunded": null, "open_block": 4493717, "outcome_block": 4493761, "outcome_tx": "0x10e0b1517da1fae6b5dcdeb08cde2efcc33f488a34b9f66bf8bafe438796b57a", "first_output_ms": 14748, "recovery": [] } ], "links": { "channel": "https://explorer.devnet.flop.network/api/compute-channels/0xcddfd0102e2155f8e604bf7b0ad1c22a204112b2be7de6a0f374faa5c3f42e33", "session": "/v1/sessions/gen-mwu3v1s3-ab700a21edac" }, "ignored_parameters": [ "temperature" ] }}
{
"id": "gen-mwu3v1s3-ab700a21edac",
"object": "chat.completion.pending",
"created": 1795489132,
"model": "qwen/qwen3-8b",
"status": "pending",
"message": "no verified reply within 85 s; the generation continues. Poll GET /api/v1/generation?id=gen-mwu3v1s3-ab700a21edac (or GET /api/v1/sessions/gen-mwu3v1s3-ab700a21edac) until it has a reply, or use stream: true.",
"poll": "/v1/sessions/gen-mwu3v1s3-ab700a21edac",
"flop": null,
"generation": "/api/v1/generation?id=gen-mwu3v1s3-ab700a21edac"
}
{
"error": {
"code": 400,
"message": "each message needs a role of system, developer, user or assistant (tool messages are not supported)",
"metadata": {
"reason": "invalid_message"
}
}
}
{
"error": {
"code": 401,
"message": "a wallet API key is required (Authorization: Bearer fr_...); see POST /v1/auth/challenge",
"metadata": {
"reason": "unauthorized"
}
}
}
{
"error": {
"code": 402,
"message": "prepaid balance 0 FLOP available cannot cover 0.0105 FLOP (escrow plus router fee); send FLOP to the deposit address, see GET /v1/balance",
"metadata": {
"reason": "insufficient_balance",
"available": "0",
"required": "0.0105",
"session_id": "gen-mwu3pgp7-1130f87d046b"
}
}
}
{
"error": {
"code": 403,
"message": "requests must come through the public endpoint",
"metadata": {
"reason": "forbidden"
}
}
}
{
"error": {
"code": 404,
"message": "no such session",
"metadata": {
"reason": "session_not_found"
}
}
}
{
"error": {
"code": 429,
"message": "chat requests for this key: limit 20 per minute; retry in 41 s",
"metadata": {
"reason": "rate_limited"
}
}
}
{
"error": {
"code": 503,
"message": "no miner completed the request after 1 attempt(s): 5HKiGNFSqSyEMVMjjr8JBKkkppytaqFZCRm27KGbCeHhUq92: computeChannel.MinerCapacityFullyReserved: D-0542: the miner's live capacity reservations leave no room for this channel's rate.",
"metadata": {
"reason": "all_attempts_failed",
"session_id": "gen-mwu3pgp7-1130f87d046b"
}
}
}
Authorizations
Authorization
string
header
required
Wallet API key fr_... from POST /v1/auth/keys.
Body
application/json
Model parameters follow each model's supported_parameters (today max_tokens): others are ignored and named in X-Floprouter-Ignored-Parameters, or refused with provider.require_parameters. A non-empty tools gets 404 (no model is served with tool use yet). tool messages, non-text parts, prompt, n > 1 and enabled plugins get 400. transforms, user, session_id, metadata, trace, debug, service_tier are accepted and ignored.
messages
object[]
required
Minimum array length: 1
Hide child attributes
messages.role
enum<string>
required
Available options:
developer,
system,
user,
assistant
messages.content
stringarray
required
Text, or an array of text parts (joined).
model
string
Model id from GET /v1/models (required; there is no account default).
Example:
"qwen/qwen3-8b"
max_tokens
integer
default:256
Sets the escrow together with the prompt size. max_completion_tokens is accepted as an alias.
Required range: 1 <= x <= 32768
stream
boolean
default:false
stream_options
object
Accepted; the usage chunk is always sent.
provider
object
Provider preferences. A provider is a FLOP miner; its slug is the miner's SS58 address (the endpoint host is accepted as an alias).
Hide child attributes
provider.order
string[]
provider.only
string[]
provider.ignore
string[]
provider.allow_fallbacks
boolean
default:true
false: only the listed miners (with order), or only the top-ranked miner (without).
provider.sort
enum<string>object
price: all miners of a model are priced alike, default order applies; throughput and latency: router-measured time to the verified reply; reliability (default): on-chain score.
Available options:
price,
throughput,
latency,
reliability
provider.max_price
object
In FLOP: prompt and completion per million tokens, request per request. A model above it is skipped.
Hide child attributes
provider.max_price.prompt
number
provider.max_price.completion
number
provider.max_price.request
number
provider.max_price.image
number
provider.require_parameters
boolean
default:false
Refuse (503) instead of ignoring parameters the model does not support.
provider.data_collection
enum<string>
default:allow
deny cannot be met: miners keep signed session evidence for audit and settlement (503).
Available options:
allow,
deny
provider.zdr
boolean
true cannot be met (503), as data_collection deny.
provider.quantizations
string[]
Example:
["bf16"]
provider.preferred_min_throughput
any
Accepted and ignored.
provider.preferred_max_latency
any
Accepted and ignored.
provider.enforce_distillable_text
boolean
Accepted and ignored.
flop
object
Hide child attributes
flop.payer
enum<string>
Override the key's payer mode for this request.
Available options:
grant,
credit
flop.fallback_payer
enum<string>
Grant mode only: if no miner can be served through the grant (no live signed offer, or the grant cannot pay), run the request in credit mode instead. Off by default.
Available options:
credit
flop.wait_for_settlement
boolean
default:false
Also wait for the finalized on-chain settlement before answering, within the response deadline (about 85 s). The settlement usually takes 1 to 4 minutes, so the answer may still say settling; poll GET /v1/sessions/{id}.
flop.async
boolean
default:false
Answer 202 with the generation id when no verified reply exists within about 85 s, instead of keeping the response open with whitespace keep-alives.
models
string[]
Fallback models, tried in order after model when it has no serving provider or the request is too large for it; never after any output. The response model names the model used.
route
enum<string>
Available options:
fallback
temperature
any
Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.
top_p
any
Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.
top_k
any
Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.
frequency_penalty
any
Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.
presence_penalty
any
Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.
repetition_penalty
any
Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.
min_p
any
Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.
top_a
any
Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.
seed
any
Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.
stop
any
Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.
response_format
any
Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.
logit_bias
any
Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.
logprobs
any
Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.
top_logprobs
any
Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.
reasoning
any
Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.
reasoning_effort
any
Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.
tools
array
Non-empty: 404, no endpoint supports tool use yet.
plugins
array
Enabled plugins are refused (400): none exists here.
transforms
array
Accepted and ignored.
user
string
Accepted and ignored.
Response
Verified reply. With stream: true the body is text/event-stream.
id
string
Session id.
object
any
created
integer
model
string
provider
string
The miner (provider slug: its address).
choices
object[]
Hide child attributes
choices.index
integer
choices.message
object
Hide child attributes
choices.message.role
any
choices.message.content
string
choices.finish_reason
enum<string>
Available options:
stop,
length,
tool_calls,
content_filter,
error
choices.logprobs
null
choices.native_finish_reason
string | null
From the miner's signed receipt.
usage
object
Hide child attributes
usage.prompt_tokens
integer
usage.completion_tokens
integer
usage.total_tokens
integer
usage.prompt_tokens_details
object
Hide child attributes
usage.prompt_tokens_details.cached_tokens
integer
usage.completion_tokens_details
object
Hide child attributes
usage.completion_tokens_details.reasoning_tokens
integer
usage.cost
number
In FLOP: escrow plus router fee. Final once the session settles; 0 when refunded.
settling: reply delivered, settlement not yet final. settled: miner paid on chain. refunded: escrow returned.
Available options:
running,
settling,
settled,
refunded,
recovering,
failed,
fraud,
voided
flop.model
string
flop.model_hash
string
flop.created_at
string<date-time>
flop.channel_id
string | null
On-chain compute channel (0x + 64 hex).
flop.miner
string | null
flop.endpoint
string | null
flop.via
any
How the channel was opened: against the miner's signed offer, or by force-open.
Available options:
offer,
force,
null
flop.payer
object
Hide child attributes
flop.payer.address
string
Account recorded on chain as the channel's payer (agent).
flop.payer.kind
enum<string>
Available options:
router-wallet,
session-key
flop.payer.mode
enum<string>
Available options:
grant,
credit,
demo,
operator
flop.payer.fallback_from
string | null
Set when the request fell back from grant to credit mode.
flop.payer.account
string | null
Wallet that owns the API key.
flop.payer.delegate
string | null
Grant mode: the router delegate that signed the open.
flop.payer.note
string
flop.escrow
string | null
FLOP escrowed for the request. A cooperative settlement pays all of it.
Example:
"0.01"
flop.miner_paid
string | null
Amount paid to the miner, from the finalized Settled event. Null until settled.
Example:
"0.01"
flop.router_fee
object
Hide child attributes
flop.router_fee.percent
number
flop.router_fee.amount
string | null
Fee for this session's escrow.
flop.router_fee.charged
boolean
flop.router_fee.charged_amount
string | null
flop.router_fee.status
enum<string>
pending until the channel's outcome is final; charged when it settled paid; not_charged when it was refunded or failed; not_billed for demo sessions.
Available options:
pending,
charged,
not_charged,
not_billed
flop.router_fee.note
string
flop.currency
string
flop.network
string
flop.on_chain
object
Hide child attributes
flop.on_chain.open_block
integer | null
flop.on_chain.outcome
any
Available options:
settled,
timed_out,
ack_expired,
refunded,
voided,
fraud,
null
flop.on_chain.outcome_block
integer | null
flop.on_chain.outcome_tx
string | null
flop.usage
object
Hide child attributes
flop.usage.prompt_tokens
integer | null
flop.usage.completion_tokens
integer | null
flop.usage.finish_reason
string | null
flop.error
string | null
flop.attempts
object[]
Hide child attributes
flop.attempts.n
integer
flop.attempts.miner
string
flop.attempts.endpoint
string | null
flop.attempts.via
string | null
flop.attempts.channel_id
string | null
flop.attempts.escrow
string | null
Decimal amount in FLOP.
Example:
"0.01"
flop.attempts.status
string
flop.attempts.stage
string | null
flop.attempts.error
string | null
flop.attempts.outcome
string | null
flop.attempts.miner_paid
string | null
Decimal amount in FLOP.
Example:
"0.01"
flop.attempts.refunded
string | null
Decimal amount in FLOP.
Example:
"0.01"
flop.attempts.open_block
integer | null
flop.attempts.outcome_block
integer | null
flop.attempts.outcome_tx
string | null
flop.attempts.first_output_ms
integer | null
flop.attempts.recovery
object[]
Recovery extrinsics sent for this channel (expire_force_open, timeout, force_settle, finalize).
flop.links
object
Hide child attributes
flop.links.channel
string<uri>
flop.links.session
string
flop.wire
string | null
Chat envelope version sent to the miner (flop.chat-turn.v2 renders the model's chat template).
flop.reply
object | null
The verified reply, for the wallet that owns the session (absent for other callers).
Hide child attributes
flop.reply.role
any
flop.reply.content
string
flop.reply.finish_reason
string | null
flop.reply_visible
boolean
flop.ignored_parameters
string[]
Request parameters this model ignored (see its supported_parameters).
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"floprouter","description":"The floprouter API: one HTTP API for every GPU miner and model on FLOP Network.","colors":{"primary":"#b83a0b","light":"#ff7a3d","dark":"#b83a0b"},"logo":{"light":"https://mintcdn.com/floprouter/BB5APJt0zj9Pp8La/logo/light.svg?fit=max\u0026auto=format\u0026n=BB5APJt0zj9Pp8La\u0026q=85\u0026s=d0fd562a590ac0effd5f40693652f873","dark":"https://mintcdn.com/floprouter/BB5APJt0zj9Pp8La/logo/dark.svg?fit=max\u0026auto=format\u0026n=BB5APJt0zj9Pp8La\u0026q=85\u0026s=7e99f86ba83591bcc8dd25728f4e91b0","href":"https://floprouter.com"},"favicon":"https://mintcdn.com/floprouter/BB5APJt0zj9Pp8La/favicon.svg?fit=max\u0026auto=format\u0026n=BB5APJt0zj9Pp8La\u0026q=85\u0026s=227b82a2d7f116a81c97968ef4f174a0","api":{"params":{"expanded":"all"},"playground":{"display":"interactive","proxy":false},"examples":{"languages":["curl","javascript","python"]}},"appearance":{"default":"light"},"background":{"color":{"light":"#f4f1ea","dark":"#11100d"}},"navbar":{"links":[{"href":"/for-agents#agent-prompt","label":"Agent prompt"},{"href":"https://floprouter.com/miners/","label":"Miners"},{"href":"https://floprouter.com/models/","label":"Models"},{"href":"https://floprouter.com/playground/","label":"Playground"},{"href":"https://floprouter.com/status/","label":"Status"}],"primary":{"type":"button","label":"Get an API key","href":"https://floprouter.com/account/"}},"footer":{"links":[{"header":"Use it","items":[{"label":"Account and keys","href":"https://floprouter.com/account"},{"label":"Playground","href":"https://floprouter.com/playground"},{"label":"Agent skill","href":"https://floprouter.com/skill.md"}]},{"header":"Network","items":[{"label":"Miners","href":"https://floprouter.com/miners"},{"label":"Models","href":"https://floprouter.com/models"},{"label":"Status","href":"https://floprouter.com/status"}]}]},"search":{"prompt":"Search the docs, for example grant, 402, streaming"},"seo":{"metatags":{"og:site_name":"floprouter"}},"fonts":{"heading":{"family":"Bricolage Grotesque","weight":640,"source":"fonts/bricolage.woff2","format":"woff2"},"body":{"family":"Geist","source":"fonts/geist.woff2","format":"woff2"}},"errors":{"404":{"redirect":false,"title":"Nothing here","description":"This page does not exist. Start from the [overview](/)."}},"contextual":{"options":["copy","view","chatgpt","claude","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"floprouter","hasAudioNarration":false,"actualSubdomain":"floprouter","customDomains":["docs.floprouter.com"],"gitSource":{"type":"github","owner":"floprouter","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6b052bed7acd176e4dd46f76"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b0537dc7e1a5f98dd53b6df","clientVersion":"0.0.4286","searchFilterCounts":[{"language":"default","tag":"API reference","count":30},{"language":"default","tag":"Endpoints","count":29},{"language":"default","tag":"Docs","count":17},{"language":"default","tag":"Models","count":6},{"language":"default","tag":"Auth","count":6},{"language":"default","tag":"SDKs and tools","count":5},{"language":"default","tag":"Directory","count":5},{"language":"default","tag":"Payments","count":4},{"language":"default","tag":"Reference","count":4},{"language":"default","tag":"Balance","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":":root{--fr-accent: #b83a0b;--fr-accent-soft: #f6e2d4;--fr-line: #ddd8cc;--fr-surface: #fbfaf6;--fr-surface-2: #f1eee6;--fr-ink: #17150f;--fr-muted: #625d52}.dark{--fr-accent: #ff7a3d;--fr-accent-soft: #3a1f12;--fr-line: #2d2a24;--fr-surface: #191814;--fr-surface-2: #211f1a;--fr-ink: #efebe2;--fr-muted: #a39d90}@font-face{font-family:'Geist Mono';src:url('/fonts/geist-mono.woff2') format('woff2');font-weight:100 900;font-display:swap}code,pre,kbd{font-family:'Geist Mono', ui-monospace, Menlo, monospace}.fr-agent{display:grid;grid-template-columns:minmax(0, 1fr) auto;gap:10px 20px;align-items:center;margin:4px 0 24px;padding:16px 18px;border:1px solid color-mix(in srgb, var(--fr-accent) 35%, var(--fr-line));border-radius:10px;background:color-mix(in srgb, var(--fr-accent-soft) 45%, var(--fr-surface))}.fr-agent-title{margin:0;font-weight:600;color:var(--fr-ink)}.fr-agent-sub{margin:4px 0 0;font-size:14px;color:var(--fr-muted)}.fr-agent-actions{display:flex;gap:6px;flex-wrap:wrap}.fr-agent-btn,.fr-agent-ghost{height:36px;padding:0 14px;border-radius:6px;font-family:inherit;font-size:14px;font-weight:500;line-height:1;cursor:pointer}.fr-agent-btn{background:var(--fr-ink);color:var(--fr-surface);border:1px solid var(--fr-ink)}.fr-agent-ghost{background:transparent;color:var(--fr-ink);border:1px solid transparent}.fr-agent-ghost:hover{background:var(--fr-surface-2)}.fr-agent-btn:focus-visible,.fr-agent-ghost:focus-visible{outline:2px solid var(--fr-accent);outline-offset:2px}.fr-agent-prompt{grid-column:1 / -1;margin:0;white-space:pre-wrap;font-size:12.5px;line-height:1.6;background:var(--fr-surface-2);border:1px solid var(--fr-line);border-radius:6px;padding:10px 12px;color:var(--fr-ink)}@media (max-width: 640px){.fr-agent{grid-template-columns:minmax(0, 1fr)}}.fr-tiles{display:grid;grid-template-columns:repeat(auto-fill, minmax(104px, 1fr));grid-auto-rows:88px;gap:8px;margin:8px 0 20px}.fr-tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;height:100%;padding:10px 6px 8px;border:1px solid var(--fr-line);border-radius:10px;background:var(--fr-surface);color:var(--fr-ink);font-family:inherit;font-size:13px;font-weight:500;line-height:1.25;text-align:center;cursor:pointer;transition:border-color 0.12s, background-color 0.12s}.fr-tile:hover{border-color:color-mix(in srgb, var(--fr-ink) 35%, var(--fr-line))}.fr-tile[aria-selected=\"true\"]{border-color:var(--fr-accent);background:color-mix(in srgb, var(--fr-accent-soft) 55%, var(--fr-surface));box-shadow:inset 0 0 0 1px var(--fr-accent)}.fr-tile:focus-visible{outline:2px solid var(--fr-accent);outline-offset:2px}.fr-logo{display:block;width:28px;height:28px;object-fit:contain;flex:none}.fr-logo-dark{display:none}.dark .fr-logo-dark{display:block}.dark .fr-logo-light:has(+.fr-logo-dark){display:none}.fr-logo-none{display:grid;place-items:center;border-radius:7px;background:var(--fr-surface-2);border:1px solid var(--fr-line);color:var(--fr-muted);font:600 13px/1 'Geist Mono', ui-monospace, monospace}.fr-tile-name{display:block}@media (max-width: 640px){.fr-tiles{grid-template-columns:repeat(3, minmax(0, 1fr));grid-auto-rows:80px;gap:6px}.fr-tile{padding:8px 4px 6px;font-size:12px}.fr-logo{width:24px;height:24px}}.fr-client{display:none}.fr-client>:first-child{margin-top:0}.fr-picker[data-sel=\"claude-code\"] .fr-client[data-client=\"claude-code\"],.fr-picker[data-sel=\"claude-desktop\"] .fr-client[data-client=\"claude-desktop\"],.fr-picker[data-sel=\"cursor\"] .fr-client[data-client=\"cursor\"],.fr-picker[data-sel=\"vscode\"] .fr-client[data-client=\"vscode\"],.fr-picker[data-sel=\"windsurf\"] .fr-client[data-client=\"windsurf\"],.fr-picker[data-sel=\"codex\"] .fr-client[data-client=\"codex\"],.fr-picker[data-sel=\"cline\"] .fr-client[data-client=\"cline\"],.fr-picker[data-sel=\"zed\"] .fr-client[data-client=\"zed\"],.fr-picker[data-sel=\"gemini-cli\"] .fr-client[data-client=\"gemini-cli\"],.fr-picker[data-sel=\"continue\"] .fr-client[data-client=\"continue\"],.fr-picker[data-sel=\"other\"] .fr-client[data-client=\"other\"],.fr-picker[data-sel=\"chat\"] .fr-client[data-client=\"chat\"]{display:block}.fr-install{display:inline-flex;align-items:center;gap:8px;height:36px;padding:0 14px;margin:4px 0 8px;border-radius:6px;border:1px solid var(--fr-ink);background:var(--fr-ink);color:var(--fr-surface)!important;font-family:inherit;font-size:14px;font-weight:500;line-height:1;text-decoration:none!important}.fr-install:hover{opacity:0.9}.fr-install .fr-logo{width:16px;height:16px}.fr-install .fr-logo-light{display:none}.fr-install .fr-logo-dark{display:block}.dark .fr-install .fr-logo-light{display:block}.dark .fr-install .fr-logo-dark{display:none}.fr-paths{font-size:14px}.fr-client>span{display:block;margin:0 0 14px}.fr-client>span+span{margin-top:0}.fr-client>.fr-install{margin:0 0 16px}"}]}
{"page":{"pagePath":"api-reference/inference/chat-completion-settled-on-chain","slug":"/api-reference/inference/chat-completion-settled-on-chain","pageMetadata":{"title":"Chat completion, settled on chain","description":"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 only: miners with a live offer are tried first, and when none has one the request waits up to 40 s for a fresh offer before moving on. Also served at `/api/v1/chat/completions`. A non-streaming call answers with one JSON body however long it takes: when no answer exists after 75 s the headers are sent; until then every answer, error or not, has its own HTTP status and a space is written every 10 s until the body follows (JSON allows leading whitespace); an error after that point is the JSON error body with status 200. With `flop.async: true` the call instead answers 202 `chat.completion.pending` when no reply exists within about 85 s. Closing the connection cancels the request (nothing is signed afterwards).","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/chat/completions","href":"/api-reference/inference/chat-completion-settled-on-chain","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Chooses a miner (or follows \", _jsx(_components.code, {\n children: \"provider\"\n }), \"), 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 \", _jsx(_components.code, {\n children: \"models\"\n }), \". Grant mode opens channels with miners’ signed offers only: miners with a live offer are tried first, and when none has one the request waits up to 40 s for a fresh offer before moving on. Also served at \", _jsx(_components.code, {\n children: \"/api/v1/chat/completions\"\n }), \". A non-streaming call answers with one JSON body however long it takes: when no answer exists after 75 s the headers are sent; until then every answer, error or not, has its own HTTP status and a space is written every 10 s until the body follows (JSON allows leading whitespace); an error after that point is the JSON error body with status 200. With \", _jsx(_components.code, {\n children: \"flop.async: true\"\n }), \" the call instead answers 202 \", _jsx(_components.code, {\n children: \"chat.completion.pending\"\n }), \" when no reply exists within about 85 s. Closing the connection cancels the request (nothing is signed afterwards).\"]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Chat completion, settled on chain","description":"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 only: miners with a live offer are tried first, and when none has one the request waits up to 40 s for a fresh offer before moving on. Also served at `/api/v1/chat/completions`. A non-streaming call answers with one JSON body however long it takes: when no answer exists after 75 s the headers are sent; until then every answer, error or not, has its own HTTP status and a space is written every 10 s until the body follows (JSON allows leading whitespace); an error after that point is the JSON error body with status 200. With `flop.async: true` the call instead answers 202 `chat.completion.pending` when no reply exists within about 85 s. Closing the connection cancels the request (nothing is signed afterwards).","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/chat/completions","href":"/api-reference/inference/chat-completion-settled-on-chain","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"createChatCompletion","summary":"Chat completion, settled on chain","tags":["Inference"],"description":"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 only: miners with a live offer are tried first, and when none has one the request waits up to 40 s for a fresh offer before moving on. Also served at `/api/v1/chat/completions`. A non-streaming call answers with one JSON body however long it takes: when no answer exists after 75 s the headers are sent; until then every answer, error or not, has its own HTTP status and a space is written every 10 s until the body follows (JSON allows leading whitespace); an error after that point is the JSON error body with status 200. With `flop.async: true` the call instead answers 202 `chat.completion.pending` when no reply exists within about 85 s. Closing the connection cancels the request (nothing is signed afterwards).","security":["255da340-8aba-4572-b6fc-3d90c8e11aae","b8c4e03e-f1db-4b0f-a3b9-fab8effe277f"],"requestBody":"10d3840d-462b-4a13-831c-0bc790e6497f","responses":{"200":"8d4eb183-40e7-4610-b829-cd3198c578d2","202":"0865ccb4-3814-4416-a5ee-2b183ce2e331","400":"7f30aeb9-217f-4644-9040-7ecde5e91232","401":"6deafc2a-6758-43bf-b6f1-3aee49f3a557","402":"eaf2b7a0-d91e-4a48-8cc5-2496d4dcc330","403":"9aad3f31-51f1-426d-a2f1-8660d39ccb4e","404":"a3a60b35-71b8-4699-8753-c739f16098ff","413":"af75ec14-ceee-44c2-8f8d-9fa7954229bc","429":"24787b07-ac41-49ae-855b-b704274189fd","503":"ced3fca3-f085-4c49-952c-3a1b8208daf3"},"method":"post","type":"path","servers":["111d940b-82c3-478b-99ad-2469c05903e4"],"path":"/v1/chat/completions","baseUrlOptions":["https://api.floprouter.com"],"title":"Chat completion, settled on chain","codeSamples":[],"requestExampleLanguages":["bash","javascript","python"],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated","disableProxy":true},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["messages"],"additionalProperties":true,"description":"Model parameters follow each model's `supported_parameters` (today `max_tokens`): others are ignored and named in `X-Floprouter-Ignored-Parameters`, or refused with `provider.require_parameters`. A non-empty `tools` gets 404 (no model is served with tool use yet). `tool` messages, non-text parts, `prompt`, `n > 1` and enabled `plugins` get 400. `transforms`, `user`, `session_id`, `metadata`, `trace`, `debug`, `service_tier` are accepted and ignored.","properties":{"messages":{"type":"array","minItems":1,"items":{"type":"object","required":["role","content"],"properties":{"role":{"enum":["developer","system","user","assistant"],"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].role","typeLabel":"enum\u003cstring>"},"content":{"oneOf":[{"type":"string","description":"Text, or an array of `text` parts (joined).","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0","typeLabel":"string"},{"type":"array","description":"Text, or an array of `text` parts (joined).","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1","typeLabel":"array"},{"type":"null","description":"Text, or an array of `text` parts (joined).","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.2","typeLabel":"null"}],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content","typeLabel":"string | array | null"}},"uniqueKey":"messages.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"messages","typeLabel":"object[]"},"model":{"type":"string","examples":["qwen/qwen3-8b"],"description":"Model id from `GET /v1/models` (required; there is no account default).","uniqueKey":"model","typeLabel":"string"},"max_tokens":{"type":"integer","minimum":1,"maximum":32768,"default":256,"description":"Sets the escrow together with the prompt size. `max_completion_tokens` is accepted as an alias.","uniqueKey":"max_tokens","typeLabel":"integer"},"stream":{"type":"boolean","default":false,"uniqueKey":"stream","typeLabel":"boolean"},"stream_options":{"type":"object","description":"Accepted; the usage chunk is always sent.","uniqueKey":"stream_options","typeLabel":"object"},"provider":{"type":"object","description":"Provider preferences. A provider is a FLOP miner; its slug is the miner's SS58 address (the endpoint host is accepted as an alias).","properties":{"order":{"type":"array","items":{"type":"string","uniqueKey":"provider.order.items.[INDEX]","typeLabel":"string"},"uniqueKey":"provider.order","typeLabel":"string[]"},"only":{"type":"array","items":{"type":"string","uniqueKey":"provider.only.items.[INDEX]","typeLabel":"string"},"uniqueKey":"provider.only","typeLabel":"string[]"},"ignore":{"type":"array","items":{"type":"string","uniqueKey":"provider.ignore.items.[INDEX]","typeLabel":"string"},"uniqueKey":"provider.ignore","typeLabel":"string[]"},"allow_fallbacks":{"type":"boolean","default":true,"description":"false: only the listed miners (with order), or only the top-ranked miner (without).","uniqueKey":"provider.allow_fallbacks","typeLabel":"boolean"},"sort":{"oneOf":[{"type":"string","description":"price: all miners of a model are priced alike, default order applies; throughput and latency: router-measured time to the verified reply; reliability (default): on-chain score.","enum":["price","throughput","latency","reliability"],"uniqueKey":"provider.sort.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"object","description":"price: all miners of a model are priced alike, default order applies; throughput and latency: router-measured time to the verified reply; reliability (default): on-chain score.","properties":{"by":{"enum":["price","throughput","latency","reliability"],"type":"string","uniqueKey":"provider.sort.oneOf.1.by","typeLabel":"enum\u003cstring>"},"partition":{"enum":["model","none"],"type":"string","uniqueKey":"provider.sort.oneOf.1.partition","typeLabel":"enum\u003cstring>"}},"uniqueKey":"provider.sort.oneOf.1","typeLabel":"object"}],"uniqueKey":"provider.sort","typeLabel":"enum\u003cstring> | object"},"max_price":{"type":"object","description":"In FLOP: prompt and completion per million tokens, request per request. A model above it is skipped.","properties":{"prompt":{"type":"number","uniqueKey":"provider.max_price.prompt","typeLabel":"number"},"completion":{"type":"number","uniqueKey":"provider.max_price.completion","typeLabel":"number"},"request":{"type":"number","uniqueKey":"provider.max_price.request","typeLabel":"number"},"image":{"type":"number","uniqueKey":"provider.max_price.image","typeLabel":"number"}},"uniqueKey":"provider.max_price","typeLabel":"object"},"require_parameters":{"type":"boolean","default":false,"description":"Refuse (503) instead of ignoring parameters the model does not support.","uniqueKey":"provider.require_parameters","typeLabel":"boolean"},"data_collection":{"enum":["allow","deny"],"default":"allow","description":"deny cannot be met: miners keep signed session evidence for audit and settlement (503).","type":"string","uniqueKey":"provider.data_collection","typeLabel":"enum\u003cstring>"},"zdr":{"type":"boolean","description":"true cannot be met (503), as data_collection deny.","uniqueKey":"provider.zdr","typeLabel":"boolean"},"quantizations":{"type":"array","items":{"type":"string","uniqueKey":"provider.quantizations.items.[INDEX]","typeLabel":"string"},"examples":[["bf16"]],"uniqueKey":"provider.quantizations","typeLabel":"string[]"},"preferred_min_throughput":{"description":"Accepted and ignored.","uniqueKey":"provider.preferred_min_throughput","typeLabel":"any"},"preferred_max_latency":{"description":"Accepted and ignored.","uniqueKey":"provider.preferred_max_latency","typeLabel":"any"},"enforce_distillable_text":{"type":"boolean","description":"Accepted and ignored.","uniqueKey":"provider.enforce_distillable_text","typeLabel":"boolean"}},"uniqueKey":"provider","typeLabel":"object"},"flop":{"type":"object","properties":{"payer":{"enum":["grant","credit"],"description":"Override the key's payer mode for this request.","type":"string","uniqueKey":"flop.payer","typeLabel":"enum\u003cstring>"},"fallback_payer":{"enum":["credit"],"description":"Grant mode only: if no miner can be served through the grant (no live signed offer, or the grant cannot pay), run the request in credit mode instead. Off by default.","type":"string","uniqueKey":"flop.fallback_payer","typeLabel":"enum\u003cstring>"},"wait_for_settlement":{"type":"boolean","default":false,"description":"Also wait for the finalized on-chain settlement before answering, within the response deadline (about 85 s). The settlement usually takes 1 to 4 minutes, so the answer may still say `settling`; poll `GET /v1/sessions/{id}`.","uniqueKey":"flop.wait_for_settlement","typeLabel":"boolean"},"async":{"type":"boolean","default":false,"description":"Answer 202 with the generation id when no verified reply exists within about 85 s, instead of keeping the response open with whitespace keep-alives.","uniqueKey":"flop.async","typeLabel":"boolean"}},"uniqueKey":"flop","typeLabel":"object"},"models":{"type":"array","items":{"type":"string","uniqueKey":"models.items.[INDEX]","typeLabel":"string"},"description":"Fallback models, tried in order after `model` when it has no serving provider or the request is too large for it; never after any output. The response `model` names the model used.","uniqueKey":"models","typeLabel":"string[]"},"route":{"enum":["fallback"],"type":"string","uniqueKey":"route","typeLabel":"enum\u003cstring>"},"temperature":{"description":"Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.","uniqueKey":"temperature","typeLabel":"any"},"top_p":{"description":"Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.","uniqueKey":"top_p","typeLabel":"any"},"top_k":{"description":"Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.","uniqueKey":"top_k","typeLabel":"any"},"frequency_penalty":{"description":"Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.","uniqueKey":"frequency_penalty","typeLabel":"any"},"presence_penalty":{"description":"Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.","uniqueKey":"presence_penalty","typeLabel":"any"},"repetition_penalty":{"description":"Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.","uniqueKey":"repetition_penalty","typeLabel":"any"},"min_p":{"description":"Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.","uniqueKey":"min_p","typeLabel":"any"},"top_a":{"description":"Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.","uniqueKey":"top_a","typeLabel":"any"},"seed":{"description":"Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.","uniqueKey":"seed","typeLabel":"any"},"stop":{"description":"Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.","uniqueKey":"stop","typeLabel":"any"},"response_format":{"description":"Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.","uniqueKey":"response_format","typeLabel":"any"},"logit_bias":{"description":"Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.","uniqueKey":"logit_bias","typeLabel":"any"},"logprobs":{"description":"Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.","uniqueKey":"logprobs","typeLabel":"any"},"top_logprobs":{"description":"Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.","uniqueKey":"top_logprobs","typeLabel":"any"},"reasoning":{"description":"Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.","uniqueKey":"reasoning","typeLabel":"any"},"reasoning_effort":{"description":"Ignored unless the model lists it in supported_parameters (none does today); with provider.require_parameters the request is refused.","uniqueKey":"reasoning_effort","typeLabel":"any"},"tools":{"type":"array","description":"Non-empty: 404, no endpoint supports tool use yet.","uniqueKey":"tools","typeLabel":"array"},"plugins":{"type":"array","description":"Enabled plugins are refused (400): none exists here.","uniqueKey":"plugins","typeLabel":"array"},"transforms":{"type":"array","description":"Accepted and ignored.","uniqueKey":"transforms","typeLabel":"array"},"user":{"type":"string","description":"Accepted and ignored.","uniqueKey":"user","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"conversation":{"title":"conversation","value":{"model":"qwen/qwen3-8b","max_tokens":60,"messages":[{"role":"system","content":"You are a pirate. Answer every question in one short sentence of pirate speech."},{"role":"user","content":"My name is Ada. What is 2 + 2?"},{"role":"assistant","content":"Arr, that be 4, matey!"},{"role":"user","content":"What is my name?"}]}},"stream":{"title":"stream","value":{"model":"qwen/qwen3-8b","stream":true,"max_tokens":40,"messages":[{"role":"user","content":"Name a primary colour."}]}},"fallback_and_routing":{"title":"fallback_and_routing","value":{"model":"qwen/qwen3-8b","models":["qwen/qwen2.5-0.5b-instruct"],"messages":[{"role":"user","content":"Who pays for this request?"}],"max_tokens":32,"provider":{"sort":"latency","max_price":{"prompt":100,"completion":100},"quantizations":["bf16"]},"flop":{"payer":"grant","fallback_payer":"credit"}}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"8d4eb183-40e7-4610-b829-cd3198c578d2":{"description":"Verified reply. With `stream: true` the body is `text/event-stream`.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Session id.","uniqueKey":"id","typeLabel":"string"},"object":{"const":"chat.completion","uniqueKey":"object","typeLabel":"any"},"created":{"type":"integer","uniqueKey":"created","typeLabel":"integer"},"model":{"type":"string","uniqueKey":"model","typeLabel":"string"},"provider":{"type":"string","description":"The miner (provider slug: its address).","uniqueKey":"provider","typeLabel":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","uniqueKey":"choices.items.[INDEX].index","typeLabel":"integer"},"message":{"type":"object","properties":{"role":{"const":"assistant","uniqueKey":"choices.items.[INDEX].message.role","typeLabel":"any"},"content":{"type":"string","uniqueKey":"choices.items.[INDEX].message.content","typeLabel":"string"}},"uniqueKey":"choices.items.[INDEX].message","typeLabel":"object"},"finish_reason":{"enum":["stop","length","tool_calls","content_filter","error"],"type":"string","uniqueKey":"choices.items.[INDEX].finish_reason","typeLabel":"enum\u003cstring>"},"logprobs":{"type":"null","uniqueKey":"choices.items.[INDEX].logprobs","typeLabel":"null"},"native_finish_reason":{"oneOf":[{"type":"string","description":"From the miner's signed receipt.","uniqueKey":"choices.items.[INDEX].native_finish_reason.oneOf.0","typeLabel":"string"},{"type":"null","description":"From the miner's signed receipt.","uniqueKey":"choices.items.[INDEX].native_finish_reason.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].native_finish_reason","typeLabel":"string | null"}},"uniqueKey":"choices.items.[INDEX]","typeLabel":"object"},"uniqueKey":"choices","typeLabel":"object[]"},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer","uniqueKey":"usage.prompt_tokens","typeLabel":"integer"},"completion_tokens":{"type":"integer","uniqueKey":"usage.completion_tokens","typeLabel":"integer"},"total_tokens":{"type":"integer","uniqueKey":"usage.total_tokens","typeLabel":"integer"},"prompt_tokens_details":{"type":"object","properties":{"cached_tokens":{"type":"integer","uniqueKey":"usage.prompt_tokens_details.cached_tokens","typeLabel":"integer"}},"uniqueKey":"usage.prompt_tokens_details","typeLabel":"object"},"completion_tokens_details":{"type":"object","properties":{"reasoning_tokens":{"type":"integer","uniqueKey":"usage.completion_tokens_details.reasoning_tokens","typeLabel":"integer"}},"uniqueKey":"usage.completion_tokens_details","typeLabel":"object"},"cost":{"type":"number","description":"In FLOP: escrow plus router fee. Final once the session settles; 0 when refunded.","uniqueKey":"usage.cost","typeLabel":"number"},"is_byok":{"type":"boolean","uniqueKey":"usage.is_byok","typeLabel":"boolean"},"cost_details":{"type":"object","properties":{"upstream_inference_cost":{"type":"number","uniqueKey":"usage.cost_details.upstream_inference_cost","typeLabel":"number"},"upstream_inference_prompt_cost":{"type":"number","uniqueKey":"usage.cost_details.upstream_inference_prompt_cost","typeLabel":"number"},"upstream_inference_completions_cost":{"type":"number","uniqueKey":"usage.cost_details.upstream_inference_completions_cost","typeLabel":"number"},"router_fee":{"type":"number","uniqueKey":"usage.cost_details.router_fee","typeLabel":"number"},"currency":{"type":"string","uniqueKey":"usage.cost_details.currency","typeLabel":"string"},"final":{"type":"boolean","uniqueKey":"usage.cost_details.final","typeLabel":"boolean"}},"uniqueKey":"usage.cost_details","typeLabel":"object"}},"uniqueKey":"usage","typeLabel":"object"},"flop":{"type":"object","properties":{"session_id":{"type":"string","uniqueKey":"flop.session_id","typeLabel":"string"},"status":{"enum":["running","settling","settled","refunded","recovering","failed","fraud","voided"],"description":"`settling`: reply delivered, settlement not yet final. `settled`: miner paid on chain. `refunded`: escrow returned.","type":"string","uniqueKey":"flop.status","typeLabel":"enum\u003cstring>"},"model":{"type":"string","uniqueKey":"flop.model","typeLabel":"string"},"model_hash":{"type":"string","uniqueKey":"flop.model_hash","typeLabel":"string"},"created_at":{"type":"string","format":"date-time","uniqueKey":"flop.created_at","typeLabel":"string\u003cdate-time>"},"channel_id":{"oneOf":[{"type":"string","description":"On-chain compute channel (0x + 64 hex).","uniqueKey":"flop.channel_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"On-chain compute channel (0x + 64 hex).","uniqueKey":"flop.channel_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.channel_id","typeLabel":"string | null"},"miner":{"oneOf":[{"type":"string","uniqueKey":"flop.miner.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"flop.miner.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.miner","typeLabel":"string | null"},"endpoint":{"oneOf":[{"type":"string","uniqueKey":"flop.endpoint.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"flop.endpoint.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.endpoint","typeLabel":"string | null"},"via":{"enum":["offer","force",null],"description":"How the channel was opened: against the miner's signed offer, or by force-open.","uniqueKey":"flop.via","typeLabel":"any"},"payer":{"type":"object","properties":{"address":{"type":"string","description":"Account recorded on chain as the channel's payer (`agent`).","uniqueKey":"flop.payer.address","typeLabel":"string"},"kind":{"enum":["router-wallet","session-key"],"type":"string","uniqueKey":"flop.payer.kind","typeLabel":"enum\u003cstring>"},"mode":{"enum":["grant","credit","demo","operator"],"type":"string","uniqueKey":"flop.payer.mode","typeLabel":"enum\u003cstring>"},"fallback_from":{"oneOf":[{"type":"string","description":"Set when the request fell back from grant to credit mode.","uniqueKey":"flop.payer.fallback_from.oneOf.0","typeLabel":"string"},{"type":"null","description":"Set when the request fell back from grant to credit mode.","uniqueKey":"flop.payer.fallback_from.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.payer.fallback_from","typeLabel":"string | null"},"account":{"oneOf":[{"type":"string","description":"Wallet that owns the API key.","uniqueKey":"flop.payer.account.oneOf.0","typeLabel":"string"},{"type":"null","description":"Wallet that owns the API key.","uniqueKey":"flop.payer.account.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.payer.account","typeLabel":"string | null"},"delegate":{"oneOf":[{"type":"string","description":"Grant mode: the router delegate that signed the open.","uniqueKey":"flop.payer.delegate.oneOf.0","typeLabel":"string"},{"type":"null","description":"Grant mode: the router delegate that signed the open.","uniqueKey":"flop.payer.delegate.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.payer.delegate","typeLabel":"string | null"},"note":{"type":"string","uniqueKey":"flop.payer.note","typeLabel":"string"}},"uniqueKey":"flop.payer","typeLabel":"object"},"escrow":{"oneOf":[{"type":"string","description":"FLOP escrowed for the request. A cooperative settlement pays all of it.","examples":["0.01"],"uniqueKey":"flop.escrow.oneOf.0","typeLabel":"string"},{"type":"null","description":"FLOP escrowed for the request. A cooperative settlement pays all of it.","examples":["0.01"],"uniqueKey":"flop.escrow.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.escrow","typeLabel":"string | null"},"miner_paid":{"oneOf":[{"type":"string","description":"Amount paid to the miner, from the finalized `Settled` event. Null until settled.","examples":["0.01"],"uniqueKey":"flop.miner_paid.oneOf.0","typeLabel":"string"},{"type":"null","description":"Amount paid to the miner, from the finalized `Settled` event. Null until settled.","examples":["0.01"],"uniqueKey":"flop.miner_paid.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.miner_paid","typeLabel":"string | null"},"router_fee":{"type":"object","properties":{"percent":{"type":"number","uniqueKey":"flop.router_fee.percent","typeLabel":"number"},"amount":{"oneOf":[{"type":"string","description":"Fee for this session's escrow.","uniqueKey":"flop.router_fee.amount.oneOf.0","typeLabel":"string"},{"type":"null","description":"Fee for this session's escrow.","uniqueKey":"flop.router_fee.amount.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.router_fee.amount","typeLabel":"string | null"},"charged":{"type":"boolean","uniqueKey":"flop.router_fee.charged","typeLabel":"boolean"},"charged_amount":{"oneOf":[{"type":"string","uniqueKey":"flop.router_fee.charged_amount.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"flop.router_fee.charged_amount.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.router_fee.charged_amount","typeLabel":"string | null"},"status":{"enum":["pending","charged","not_charged","not_billed"],"description":"`pending` until the channel's outcome is final; `charged` when it settled paid; `not_charged` when it was refunded or failed; `not_billed` for demo sessions.","type":"string","uniqueKey":"flop.router_fee.status","typeLabel":"enum\u003cstring>"},"note":{"type":"string","uniqueKey":"flop.router_fee.note","typeLabel":"string"}},"uniqueKey":"flop.router_fee","typeLabel":"object"},"currency":{"type":"string","uniqueKey":"flop.currency","typeLabel":"string"},"network":{"type":"string","uniqueKey":"flop.network","typeLabel":"string"},"on_chain":{"type":"object","properties":{"open_block":{"oneOf":[{"type":"integer","uniqueKey":"flop.on_chain.open_block.oneOf.0","typeLabel":"integer"},{"type":"null","uniqueKey":"flop.on_chain.open_block.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.on_chain.open_block","typeLabel":"integer | null"},"outcome":{"enum":["settled","timed_out","ack_expired","refunded","voided","fraud",null],"uniqueKey":"flop.on_chain.outcome","typeLabel":"any"},"outcome_block":{"oneOf":[{"type":"integer","uniqueKey":"flop.on_chain.outcome_block.oneOf.0","typeLabel":"integer"},{"type":"null","uniqueKey":"flop.on_chain.outcome_block.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.on_chain.outcome_block","typeLabel":"integer | null"},"outcome_tx":{"oneOf":[{"type":"string","uniqueKey":"flop.on_chain.outcome_tx.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"flop.on_chain.outcome_tx.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.on_chain.outcome_tx","typeLabel":"string | null"}},"uniqueKey":"flop.on_chain","typeLabel":"object"},"usage":{"type":"object","properties":{"prompt_tokens":{"oneOf":[{"type":"integer","uniqueKey":"flop.usage.prompt_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","uniqueKey":"flop.usage.prompt_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.usage.prompt_tokens","typeLabel":"integer | null"},"completion_tokens":{"oneOf":[{"type":"integer","uniqueKey":"flop.usage.completion_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","uniqueKey":"flop.usage.completion_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.usage.completion_tokens","typeLabel":"integer | null"},"finish_reason":{"oneOf":[{"type":"string","uniqueKey":"flop.usage.finish_reason.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"flop.usage.finish_reason.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.usage.finish_reason","typeLabel":"string | null"}},"uniqueKey":"flop.usage","typeLabel":"object"},"error":{"oneOf":[{"type":"string","uniqueKey":"flop.error.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"flop.error.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.error","typeLabel":"string | null"},"attempts":{"type":"array","items":{"type":"object","description":"One try on one miner. Every attempt is recorded.","properties":{"n":{"type":"integer","uniqueKey":"flop.attempts.items.[INDEX].n","typeLabel":"integer"},"miner":{"type":"string","uniqueKey":"flop.attempts.items.[INDEX].miner","typeLabel":"string"},"endpoint":{"oneOf":[{"type":"string","uniqueKey":"flop.attempts.items.[INDEX].endpoint.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"flop.attempts.items.[INDEX].endpoint.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.attempts.items.[INDEX].endpoint","typeLabel":"string | null"},"via":{"oneOf":[{"type":"string","uniqueKey":"flop.attempts.items.[INDEX].via.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"flop.attempts.items.[INDEX].via.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.attempts.items.[INDEX].via","typeLabel":"string | null"},"channel_id":{"oneOf":[{"type":"string","uniqueKey":"flop.attempts.items.[INDEX].channel_id.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"flop.attempts.items.[INDEX].channel_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.attempts.items.[INDEX].channel_id","typeLabel":"string | null"},"escrow":{"oneOf":[{"type":"string","description":"Decimal amount in FLOP.","examples":["0.01"],"uniqueKey":"flop.attempts.items.[INDEX].escrow.oneOf.0","typeLabel":"string"},{"type":"null","description":"Decimal amount in FLOP.","examples":["0.01"],"uniqueKey":"flop.attempts.items.[INDEX].escrow.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.attempts.items.[INDEX].escrow","typeLabel":"string | null"},"status":{"type":"string","uniqueKey":"flop.attempts.items.[INDEX].status","typeLabel":"string"},"stage":{"oneOf":[{"type":"string","uniqueKey":"flop.attempts.items.[INDEX].stage.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"flop.attempts.items.[INDEX].stage.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.attempts.items.[INDEX].stage","typeLabel":"string | null"},"error":{"oneOf":[{"type":"string","uniqueKey":"flop.attempts.items.[INDEX].error.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"flop.attempts.items.[INDEX].error.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.attempts.items.[INDEX].error","typeLabel":"string | null"},"outcome":{"oneOf":[{"type":"string","uniqueKey":"flop.attempts.items.[INDEX].outcome.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"flop.attempts.items.[INDEX].outcome.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.attempts.items.[INDEX].outcome","typeLabel":"string | null"},"miner_paid":{"oneOf":[{"type":"string","description":"Decimal amount in FLOP.","examples":["0.01"],"uniqueKey":"flop.attempts.items.[INDEX].miner_paid.oneOf.0","typeLabel":"string"},{"type":"null","description":"Decimal amount in FLOP.","examples":["0.01"],"uniqueKey":"flop.attempts.items.[INDEX].miner_paid.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.attempts.items.[INDEX].miner_paid","typeLabel":"string | null"},"refunded":{"oneOf":[{"type":"string","description":"Decimal amount in FLOP.","examples":["0.01"],"uniqueKey":"flop.attempts.items.[INDEX].refunded.oneOf.0","typeLabel":"string"},{"type":"null","description":"Decimal amount in FLOP.","examples":["0.01"],"uniqueKey":"flop.attempts.items.[INDEX].refunded.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.attempts.items.[INDEX].refunded","typeLabel":"string | null"},"open_block":{"oneOf":[{"type":"integer","uniqueKey":"flop.attempts.items.[INDEX].open_block.oneOf.0","typeLabel":"integer"},{"type":"null","uniqueKey":"flop.attempts.items.[INDEX].open_block.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.attempts.items.[INDEX].open_block","typeLabel":"integer | null"},"outcome_block":{"oneOf":[{"type":"integer","uniqueKey":"flop.attempts.items.[INDEX].outcome_block.oneOf.0","typeLabel":"integer"},{"type":"null","uniqueKey":"flop.attempts.items.[INDEX].outcome_block.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.attempts.items.[INDEX].outcome_block","typeLabel":"integer | null"},"outcome_tx":{"oneOf":[{"type":"string","uniqueKey":"flop.attempts.items.[INDEX].outcome_tx.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"flop.attempts.items.[INDEX].outcome_tx.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.attempts.items.[INDEX].outcome_tx","typeLabel":"string | null"},"first_output_ms":{"oneOf":[{"type":"integer","uniqueKey":"flop.attempts.items.[INDEX].first_output_ms.oneOf.0","typeLabel":"integer"},{"type":"null","uniqueKey":"flop.attempts.items.[INDEX].first_output_ms.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.attempts.items.[INDEX].first_output_ms","typeLabel":"integer | null"},"recovery":{"type":"array","items":{"type":"object","uniqueKey":"flop.attempts.items.[INDEX].recovery.items.[INDEX]","typeLabel":"object"},"description":"Recovery extrinsics sent for this channel (expire_force_open, timeout, force_settle, finalize).","uniqueKey":"flop.attempts.items.[INDEX].recovery","typeLabel":"object[]"}},"uniqueKey":"flop.attempts.items.[INDEX]","typeLabel":"object"},"uniqueKey":"flop.attempts","typeLabel":"object[]"},"links":{"type":"object","properties":{"channel":{"type":"string","format":"uri","uniqueKey":"flop.links.channel","typeLabel":"string\u003curi>"},"session":{"type":"string","uniqueKey":"flop.links.session","typeLabel":"string"}},"uniqueKey":"flop.links","typeLabel":"object"},"wire":{"oneOf":[{"type":"string","description":"Chat envelope version sent to the miner (`flop.chat-turn.v2` renders the model's chat template).","uniqueKey":"flop.wire.oneOf.0","typeLabel":"string"},{"type":"null","description":"Chat envelope version sent to the miner (`flop.chat-turn.v2` renders the model's chat template).","uniqueKey":"flop.wire.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.wire","typeLabel":"string | null"},"reply":{"oneOf":[{"type":"object","description":"The verified reply, for the wallet that owns the session (absent for other callers).","properties":{"role":{"const":"assistant","uniqueKey":"flop.reply.oneOf.0.role","typeLabel":"any"},"content":{"type":"string","uniqueKey":"flop.reply.oneOf.0.content","typeLabel":"string"},"finish_reason":{"oneOf":[{"type":"string","uniqueKey":"flop.reply.oneOf.0.finish_reason.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"flop.reply.oneOf.0.finish_reason.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.reply.oneOf.0.finish_reason","typeLabel":"string | null"}},"uniqueKey":"flop.reply.oneOf.0","typeLabel":"object"},{"type":"null","description":"The verified reply, for the wallet that owns the session (absent for other callers).","properties":{"role":{"const":"assistant"},"content":{"type":"string"},"finish_reason":{"oneOf":[{"type":"string"},{"type":"null"}]}},"uniqueKey":"flop.reply.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.reply","typeLabel":"object | null"},"reply_visible":{"type":"boolean","uniqueKey":"flop.reply_visible","typeLabel":"boolean"},"ignored_parameters":{"type":"array","items":{"type":"string","uniqueKey":"flop.ignored_parameters.items.[INDEX]","typeLabel":"string"},"description":"Request parameters this model ignored (see its supported_parameters).","uniqueKey":"flop.ignored_parameters","typeLabel":"string[]"}},"uniqueKey":"flop","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"id":"gen-mwu3v1s3-ab700a21edac","object":"chat.completion","created":1795489132,"model":"qwen/qwen3-8b","provider":"5HKiGNFSqSyEMVMjjr8JBKkkppytaqFZCRm27KGbCeHhUq92","choices":[{"index":0,"message":{"role":"assistant","content":"The user pays for this request.","refusal":null,"reasoning":null},"finish_reason":"stop","logprobs":null,"native_finish_reason":"stop"}],"usage":{"prompt_tokens":29,"completion_tokens":8,"total_tokens":37,"prompt_tokens_details":{"cached_tokens":0},"completion_tokens_details":{"reasoning_tokens":0},"cost":0.0105,"is_byok":false,"cost_details":{"upstream_inference_cost":0.01,"upstream_inference_prompt_cost":0.007838,"upstream_inference_completions_cost":0.002162,"router_fee":0.0005,"currency":"FLOP","final":false}},"flop":{"session_id":"gen-mwu3v1s3-ab700a21edac","status":"settling","model":"Qwen/Qwen3-8B","model_hash":"0xfab8ec57f3bc1b5d4ca644fe12fab2ca1c35c24697d577c610b382cfea14d52d","created_at":"2026-11-24T02:58:37.000Z","channel_id":"0xcddfd0102e2155f8e604bf7b0ad1c22a204112b2be7de6a0f374faa5c3f42e33","miner":"5HKiGNFSqSyEMVMjjr8JBKkkppytaqFZCRm27KGbCeHhUq92","endpoint":"https://miner-002.0xmakase.co.jp","via":"offer","payer":{"address":"5F29vNoqgKpXxgUyz4DXifLnfAPQUQCq3ZQXGVjVbxp7sWBS","kind":"session-key","mode":"grant","fallback_from":null,"account":"5F29vNoqgKpXxgUyz4DXifLnfAPQUQCq3ZQXGVjVbxp7sWBS","delegate":"5EfBc9f69NuPUV9zue18zeURWriF64Q9d7MN7h626D3pm2r7","note":"The on-chain payer (channel agent) is 5F29vNoqgKpXxgUyz4DXifLnfAPQUQCq3ZQXGVjVbxp7sWBS, through a flopSessionKeys grant to the router's delegate 5EfBc9f69NuPUV9zue18zeURWriF64Q9d7MN7h626D3pm2r7; the delegate signed the open and paid its transaction fee, the escrow came from 5F29vNoqgKpXxgUyz4DXifLnfAPQUQCq3ZQXGVjVbxp7sWBS."},"escrow":"0.01","miner_paid":null,"router_fee":{"percent":5,"amount":"0.0005","charged":false,"charged_amount":null,"status":"pending","note":"Charged from the prepaid balance only when the session's channel settles paid."},"wire":"flop.chat-turn.v2","currency":"FLOP","network":"devnet","on_chain":{"open_block":4493717,"outcome":null,"outcome_block":null,"outcome_tx":null},"usage":{"prompt_tokens":29,"completion_tokens":8,"finish_reason":"stop"},"error":null,"attempts":[{"n":1,"miner":"5HKiGNFSqSyEMVMjjr8JBKkkppytaqFZCRm27KGbCeHhUq92","endpoint":"https://miner-002.0xmakase.co.jp","via":"offer","channel_id":"0xcddfd0102e2155f8e604bf7b0ad1c22a204112b2be7de6a0f374faa5c3f42e33","escrow":"0.01","status":"settled","stage":"settlement","error":null,"outcome":"settled","miner_paid":"0.0085","refunded":null,"open_block":4493717,"outcome_block":4493761,"outcome_tx":"0x10e0b1517da1fae6b5dcdeb08cde2efcc33f488a34b9f66bf8bafe438796b57a","first_output_ms":14748,"recovery":[]}],"links":{"channel":"https://explorer.devnet.flop.network/api/compute-channels/0xcddfd0102e2155f8e604bf7b0ad1c22a204112b2be7de6a0f374faa5c3f42e33","session":"/v1/sessions/gen-mwu3v1s3-ab700a21edac"},"ignored_parameters":["temperature"]}},"examples":{"Example":{"title":"Example","value":{"id":"gen-mwu3v1s3-ab700a21edac","object":"chat.completion","created":1795489132,"model":"qwen/qwen3-8b","provider":"5HKiGNFSqSyEMVMjjr8JBKkkppytaqFZCRm27KGbCeHhUq92","choices":[{"index":0,"message":{"role":"assistant","content":"The user pays for this request.","refusal":null,"reasoning":null},"finish_reason":"stop","logprobs":null,"native_finish_reason":"stop"}],"usage":{"prompt_tokens":29,"completion_tokens":8,"total_tokens":37,"prompt_tokens_details":{"cached_tokens":0},"completion_tokens_details":{"reasoning_tokens":0},"cost":0.0105,"is_byok":false,"cost_details":{"upstream_inference_cost":0.01,"upstream_inference_prompt_cost":0.007838,"upstream_inference_completions_cost":0.002162,"router_fee":0.0005,"currency":"FLOP","final":false}},"flop":{"session_id":"gen-mwu3v1s3-ab700a21edac","status":"settling","model":"Qwen/Qwen3-8B","model_hash":"0xfab8ec57f3bc1b5d4ca644fe12fab2ca1c35c24697d577c610b382cfea14d52d","created_at":"2026-11-24T02:58:37.000Z","channel_id":"0xcddfd0102e2155f8e604bf7b0ad1c22a204112b2be7de6a0f374faa5c3f42e33","miner":"5HKiGNFSqSyEMVMjjr8JBKkkppytaqFZCRm27KGbCeHhUq92","endpoint":"https://miner-002.0xmakase.co.jp","via":"offer","payer":{"address":"5F29vNoqgKpXxgUyz4DXifLnfAPQUQCq3ZQXGVjVbxp7sWBS","kind":"session-key","mode":"grant","fallback_from":null,"account":"5F29vNoqgKpXxgUyz4DXifLnfAPQUQCq3ZQXGVjVbxp7sWBS","delegate":"5EfBc9f69NuPUV9zue18zeURWriF64Q9d7MN7h626D3pm2r7","note":"The on-chain payer (channel agent) is 5F29vNoqgKpXxgUyz4DXifLnfAPQUQCq3ZQXGVjVbxp7sWBS, through a flopSessionKeys grant to the router's delegate 5EfBc9f69NuPUV9zue18zeURWriF64Q9d7MN7h626D3pm2r7; the delegate signed the open and paid its transaction fee, the escrow came from 5F29vNoqgKpXxgUyz4DXifLnfAPQUQCq3ZQXGVjVbxp7sWBS."},"escrow":"0.01","miner_paid":null,"router_fee":{"percent":5,"amount":"0.0005","charged":false,"charged_amount":null,"status":"pending","note":"Charged from the prepaid balance only when the session's channel settles paid."},"wire":"flop.chat-turn.v2","currency":"FLOP","network":"devnet","on_chain":{"open_block":4493717,"outcome":null,"outcome_block":null,"outcome_tx":null},"usage":{"prompt_tokens":29,"completion_tokens":8,"finish_reason":"stop"},"error":null,"attempts":[{"n":1,"miner":"5HKiGNFSqSyEMVMjjr8JBKkkppytaqFZCRm27KGbCeHhUq92","endpoint":"https://miner-002.0xmakase.co.jp","via":"offer","channel_id":"0xcddfd0102e2155f8e604bf7b0ad1c22a204112b2be7de6a0f374faa5c3f42e33","escrow":"0.01","status":"settled","stage":"settlement","error":null,"outcome":"settled","miner_paid":"0.0085","refunded":null,"open_block":4493717,"outcome_block":4493761,"outcome_tx":"0x10e0b1517da1fae6b5dcdeb08cde2efcc33f488a34b9f66bf8bafe438796b57a","first_output_ms":14748,"recovery":[]}],"links":{"channel":"https://explorer.devnet.flop.network/api/compute-channels/0xcddfd0102e2155f8e604bf7b0ad1c22a204112b2be7de6a0f374faa5c3f42e33","session":"/v1/sessions/gen-mwu3v1s3-ab700a21edac"},"ignored_parameters":["temperature"]}}}},"exampleType":"examples"},"text/event-stream":{"schema":{"type":"string","uniqueKey":"","typeLabel":"string"},"example":": FLOPROUTER PROCESSING\n\ndata: {\"id\":\"gen-mwu43k8o-4c620dd46c46\",\"object\":\"chat.completion.chunk\",\"created\":1795489493,\"model\":\"qwen/qwen3-8b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\n: FLOPROUTER PROCESSING\n\ndata: {\"id\":\"gen-mwu43k8o-4c620dd46c46\",\"object\":\"chat.completion.chunk\",\"created\":1795489493,\"model\":\"qwen/qwen3-8b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"Red.\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-mwu43k8o-4c620dd46c46\",\"object\":\"chat.completion.chunk\",\"created\":1795489493,\"model\":\"qwen/qwen3-8b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"\"},\"finish_reason\":\"stop\",\"native_finish_reason\":\"stop\",\"logprobs\":null}],\"provider\":\"5HKiGNFSqSyEMVMjjr8JBKkkppytaqFZCRm27KGbCeHhUq92\"}\n\ndata: {\"id\":\"gen-mwu43k8o-4c620dd46c46\",\"object\":\"chat.completion.chunk\",\"created\":1795489493,\"model\":\"qwen/qwen3-8b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"\",\"role\":\"assistant\"},\"finish_reason\":\"stop\",\"native_finish_reason\":\"stop\",\"logprobs\":null}],\"provider\":\"5HKiGNFSqSyEMVMjjr8JBKkkppytaqFZCRm27KGbCeHhUq92\",\"usage\":{\"prompt_tokens\":28,\"completion_tokens\":3,\"total_tokens\":31,\"cost\":0.0105},\"flop\":{\"session_id\":\"gen-mwu43k8o-4c620dd46c46\",\"status\":\"settling\"}}\n\ndata: [DONE]\n\n","examples":{"Example":{"title":"Example","value":": FLOPROUTER PROCESSING\n\ndata: {\"id\":\"gen-mwu43k8o-4c620dd46c46\",\"object\":\"chat.completion.chunk\",\"created\":1795489493,\"model\":\"qwen/qwen3-8b\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\n: FLOPROUTER PROCESSING\n\ndata: {\"id\":\"gen-mwu43k8o-4c620dd46c46\",\"object\":\"chat.completion.chunk\",\"created\":1795489493,\"model\":\"qwen/qwen3-8b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"Red.\"},\"finish_reason\":null,\"native_finish_reason\":null,\"logprobs\":null}]}\n\ndata: {\"id\":\"gen-mwu43k8o-4c620dd46c46\",\"object\":\"chat.completion.chunk\",\"created\":1795489493,\"model\":\"qwen/qwen3-8b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"\"},\"finish_reason\":\"stop\",\"native_finish_reason\":\"stop\",\"logprobs\":null}],\"provider\":\"5HKiGNFSqSyEMVMjjr8JBKkkppytaqFZCRm27KGbCeHhUq92\"}\n\ndata: {\"id\":\"gen-mwu43k8o-4c620dd46c46\",\"object\":\"chat.completion.chunk\",\"created\":1795489493,\"model\":\"qwen/qwen3-8b\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"\",\"role\":\"assistant\"},\"finish_reason\":\"stop\",\"native_finish_reason\":\"stop\",\"logprobs\":null}],\"provider\":\"5HKiGNFSqSyEMVMjjr8JBKkkppytaqFZCRm27KGbCeHhUq92\",\"usage\":{\"prompt_tokens\":28,\"completion_tokens\":3,\"total_tokens\":31,\"cost\":0.0105},\"flop\":{\"session_id\":\"gen-mwu43k8o-4c620dd46c46\",\"status\":\"settling\"}}\n\ndata: [DONE]\n\n"}},"exampleType":"examples"}},"headers":{"X-Generation-Id":{"schema":{"type":"string"}},"X-Floprouter-Ignored-Parameters":{"schema":{"type":"string"},"description":"Comma-separated parameters this model ignored."}},"exampleType":"examples"},"0865ccb4-3814-4416-a5ee-2b183ce2e331":{"description":"Only with `flop.async: true`: no verified reply within the response deadline; poll the generation.","headers":{"Location":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","description":"Returned with HTTP 202 when no verified reply exists within the response deadline. The session continues; poll it.","properties":{"id":{"oneOf":[{"type":"string","uniqueKey":"id.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"id.oneOf.1","typeLabel":"null"}],"uniqueKey":"id","typeLabel":"string | null"},"object":{"const":"chat.completion.pending","uniqueKey":"object","typeLabel":"any"},"created":{"type":"integer","uniqueKey":"created","typeLabel":"integer"},"model":{"type":"string","uniqueKey":"model","typeLabel":"string"},"status":{"const":"pending","uniqueKey":"status","typeLabel":"any"},"message":{"type":"string","uniqueKey":"message","typeLabel":"string"},"poll":{"oneOf":[{"type":"string","uniqueKey":"poll.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"poll.oneOf.1","typeLabel":"null"}],"uniqueKey":"poll","typeLabel":"string | null"},"flop":{"oneOf":[{"type":"object","properties":{"session_id":{"type":"string","uniqueKey":"flop.oneOf.0.session_id","typeLabel":"string"},"status":{"enum":["running","settling","settled","refunded","recovering","failed","fraud","voided"],"description":"`settling`: reply delivered, settlement not yet final. `settled`: miner paid on chain. `refunded`: escrow returned.","type":"string","uniqueKey":"flop.oneOf.0.status","typeLabel":"enum\u003cstring>"},"model":{"type":"string","uniqueKey":"flop.oneOf.0.model","typeLabel":"string"},"model_hash":{"type":"string","uniqueKey":"flop.oneOf.0.model_hash","typeLabel":"string"},"created_at":{"type":"string","format":"date-time","uniqueKey":"flop.oneOf.0.created_at","typeLabel":"string\u003cdate-time>"},"channel_id":{"oneOf":[{"type":"string","description":"On-chain compute channel (0x + 64 hex).","uniqueKey":"flop.oneOf.0.channel_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"On-chain compute channel (0x + 64 hex).","uniqueKey":"flop.oneOf.0.channel_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.channel_id","typeLabel":"string | null"},"miner":{"oneOf":[{"type":"string","uniqueKey":"flop.oneOf.0.miner.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"flop.oneOf.0.miner.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.miner","typeLabel":"string | null"},"endpoint":{"oneOf":[{"type":"string","uniqueKey":"flop.oneOf.0.endpoint.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"flop.oneOf.0.endpoint.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.endpoint","typeLabel":"string | null"},"via":{"enum":["offer","force",null],"description":"How the channel was opened: against the miner's signed offer, or by force-open.","uniqueKey":"flop.oneOf.0.via","typeLabel":"any"},"payer":{"type":"object","properties":{"address":{"type":"string","description":"Account recorded on chain as the channel's payer (`agent`).","uniqueKey":"flop.oneOf.0.payer.address","typeLabel":"string"},"kind":{"enum":["router-wallet","session-key"],"type":"string","uniqueKey":"flop.oneOf.0.payer.kind","typeLabel":"enum\u003cstring>"},"mode":{"enum":["grant","credit","demo","operator"],"type":"string","uniqueKey":"flop.oneOf.0.payer.mode","typeLabel":"enum\u003cstring>"},"fallback_from":{"oneOf":[{"type":"string","description":"Set when the request fell back from grant to credit mode.","uniqueKey":"flop.oneOf.0.payer.fallback_from.oneOf.0","typeLabel":"string"},{"type":"null","description":"Set when the request fell back from grant to credit mode.","uniqueKey":"flop.oneOf.0.payer.fallback_from.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.payer.fallback_from","typeLabel":"string | null"},"account":{"oneOf":[{"type":"string","description":"Wallet that owns the API key.","uniqueKey":"flop.oneOf.0.payer.account.oneOf.0","typeLabel":"string"},{"type":"null","description":"Wallet that owns the API key.","uniqueKey":"flop.oneOf.0.payer.account.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.payer.account","typeLabel":"string | null"},"delegate":{"oneOf":[{"type":"string","description":"Grant mode: the router delegate that signed the open.","uniqueKey":"flop.oneOf.0.payer.delegate.oneOf.0","typeLabel":"string"},{"type":"null","description":"Grant mode: the router delegate that signed the open.","uniqueKey":"flop.oneOf.0.payer.delegate.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.payer.delegate","typeLabel":"string | null"},"note":{"type":"string","uniqueKey":"flop.oneOf.0.payer.note","typeLabel":"string"}},"uniqueKey":"flop.oneOf.0.payer","typeLabel":"object"},"escrow":{"oneOf":[{"type":"string","description":"FLOP escrowed for the request. A cooperative settlement pays all of it.","examples":["0.01"],"uniqueKey":"flop.oneOf.0.escrow.oneOf.0","typeLabel":"string"},{"type":"null","description":"FLOP escrowed for the request. A cooperative settlement pays all of it.","examples":["0.01"],"uniqueKey":"flop.oneOf.0.escrow.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.escrow","typeLabel":"string | null"},"miner_paid":{"oneOf":[{"type":"string","description":"Amount paid to the miner, from the finalized `Settled` event. Null until settled.","examples":["0.01"],"uniqueKey":"flop.oneOf.0.miner_paid.oneOf.0","typeLabel":"string"},{"type":"null","description":"Amount paid to the miner, from the finalized `Settled` event. Null until settled.","examples":["0.01"],"uniqueKey":"flop.oneOf.0.miner_paid.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.miner_paid","typeLabel":"string | null"},"router_fee":{"type":"object","properties":{"percent":{"type":"number","uniqueKey":"flop.oneOf.0.router_fee.percent","typeLabel":"number"},"amount":{"oneOf":[{"type":"string","description":"Fee for this session's escrow.","uniqueKey":"flop.oneOf.0.router_fee.amount.oneOf.0","typeLabel":"string"},{"type":"null","description":"Fee for this session's escrow.","uniqueKey":"flop.oneOf.0.router_fee.amount.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.router_fee.amount","typeLabel":"string | null"},"charged":{"type":"boolean","uniqueKey":"flop.oneOf.0.router_fee.charged","typeLabel":"boolean"},"charged_amount":{"oneOf":[{"type":"string","uniqueKey":"flop.oneOf.0.router_fee.charged_amount.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"flop.oneOf.0.router_fee.charged_amount.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.router_fee.charged_amount","typeLabel":"string | null"},"status":{"enum":["pending","charged","not_charged","not_billed"],"description":"`pending` until the channel's outcome is final; `charged` when it settled paid; `not_charged` when it was refunded or failed; `not_billed` for demo sessions.","type":"string","uniqueKey":"flop.oneOf.0.router_fee.status","typeLabel":"enum\u003cstring>"},"note":{"type":"string","uniqueKey":"flop.oneOf.0.router_fee.note","typeLabel":"string"}},"uniqueKey":"flop.oneOf.0.router_fee","typeLabel":"object"},"currency":{"type":"string","uniqueKey":"flop.oneOf.0.currency","typeLabel":"string"},"network":{"type":"string","uniqueKey":"flop.oneOf.0.network","typeLabel":"string"},"on_chain":{"type":"object","properties":{"open_block":{"oneOf":[{"type":"integer","uniqueKey":"flop.oneOf.0.on_chain.open_block.oneOf.0","typeLabel":"integer"},{"type":"null","uniqueKey":"flop.oneOf.0.on_chain.open_block.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.on_chain.open_block","typeLabel":"integer | null"},"outcome":{"enum":["settled","timed_out","ack_expired","refunded","voided","fraud",null],"uniqueKey":"flop.oneOf.0.on_chain.outcome","typeLabel":"any"},"outcome_block":{"oneOf":[{"type":"integer","uniqueKey":"flop.oneOf.0.on_chain.outcome_block.oneOf.0","typeLabel":"integer"},{"type":"null","uniqueKey":"flop.oneOf.0.on_chain.outcome_block.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.on_chain.outcome_block","typeLabel":"integer | null"},"outcome_tx":{"oneOf":[{"type":"string","uniqueKey":"flop.oneOf.0.on_chain.outcome_tx.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"flop.oneOf.0.on_chain.outcome_tx.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.on_chain.outcome_tx","typeLabel":"string | null"}},"uniqueKey":"flop.oneOf.0.on_chain","typeLabel":"object"},"usage":{"type":"object","properties":{"prompt_tokens":{"oneOf":[{"type":"integer","uniqueKey":"flop.oneOf.0.usage.prompt_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","uniqueKey":"flop.oneOf.0.usage.prompt_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.usage.prompt_tokens","typeLabel":"integer | null"},"completion_tokens":{"oneOf":[{"type":"integer","uniqueKey":"flop.oneOf.0.usage.completion_tokens.oneOf.0","typeLabel":"integer"},{"type":"null","uniqueKey":"flop.oneOf.0.usage.completion_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.usage.completion_tokens","typeLabel":"integer | null"},"finish_reason":{"oneOf":[{"type":"string","uniqueKey":"flop.oneOf.0.usage.finish_reason.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"flop.oneOf.0.usage.finish_reason.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.usage.finish_reason","typeLabel":"string | null"}},"uniqueKey":"flop.oneOf.0.usage","typeLabel":"object"},"error":{"oneOf":[{"type":"string","uniqueKey":"flop.oneOf.0.error.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"flop.oneOf.0.error.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.error","typeLabel":"string | null"},"attempts":{"type":"array","items":{"type":"object","description":"One try on one miner. Every attempt is recorded.","properties":{"n":{"type":"integer","uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].n","typeLabel":"integer"},"miner":{"type":"string","uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].miner","typeLabel":"string"},"endpoint":{"oneOf":[{"type":"string","uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].endpoint.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].endpoint.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].endpoint","typeLabel":"string | null"},"via":{"oneOf":[{"type":"string","uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].via.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].via.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].via","typeLabel":"string | null"},"channel_id":{"oneOf":[{"type":"string","uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].channel_id.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].channel_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].channel_id","typeLabel":"string | null"},"escrow":{"oneOf":[{"type":"string","description":"Decimal amount in FLOP.","examples":["0.01"],"uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].escrow.oneOf.0","typeLabel":"string"},{"type":"null","description":"Decimal amount in FLOP.","examples":["0.01"],"uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].escrow.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].escrow","typeLabel":"string | null"},"status":{"type":"string","uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].status","typeLabel":"string"},"stage":{"oneOf":[{"type":"string","uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].stage.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].stage.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].stage","typeLabel":"string | null"},"error":{"oneOf":[{"type":"string","uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].error.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].error.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].error","typeLabel":"string | null"},"outcome":{"oneOf":[{"type":"string","uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].outcome.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].outcome.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].outcome","typeLabel":"string | null"},"miner_paid":{"oneOf":[{"type":"string","description":"Decimal amount in FLOP.","examples":["0.01"],"uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].miner_paid.oneOf.0","typeLabel":"string"},{"type":"null","description":"Decimal amount in FLOP.","examples":["0.01"],"uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].miner_paid.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].miner_paid","typeLabel":"string | null"},"refunded":{"oneOf":[{"type":"string","description":"Decimal amount in FLOP.","examples":["0.01"],"uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].refunded.oneOf.0","typeLabel":"string"},{"type":"null","description":"Decimal amount in FLOP.","examples":["0.01"],"uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].refunded.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].refunded","typeLabel":"string | null"},"open_block":{"oneOf":[{"type":"integer","uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].open_block.oneOf.0","typeLabel":"integer"},{"type":"null","uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].open_block.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].open_block","typeLabel":"integer | null"},"outcome_block":{"oneOf":[{"type":"integer","uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].outcome_block.oneOf.0","typeLabel":"integer"},{"type":"null","uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].outcome_block.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].outcome_block","typeLabel":"integer | null"},"outcome_tx":{"oneOf":[{"type":"string","uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].outcome_tx.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].outcome_tx.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].outcome_tx","typeLabel":"string | null"},"first_output_ms":{"oneOf":[{"type":"integer","uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].first_output_ms.oneOf.0","typeLabel":"integer"},{"type":"null","uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].first_output_ms.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].first_output_ms","typeLabel":"integer | null"},"recovery":{"type":"array","items":{"type":"object","uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].recovery.items.[INDEX]","typeLabel":"object"},"description":"Recovery extrinsics sent for this channel (expire_force_open, timeout, force_settle, finalize).","uniqueKey":"flop.oneOf.0.attempts.items.[INDEX].recovery","typeLabel":"object[]"}},"uniqueKey":"flop.oneOf.0.attempts.items.[INDEX]","typeLabel":"object"},"uniqueKey":"flop.oneOf.0.attempts","typeLabel":"object[]"},"links":{"type":"object","properties":{"channel":{"type":"string","format":"uri","uniqueKey":"flop.oneOf.0.links.channel","typeLabel":"string\u003curi>"},"session":{"type":"string","uniqueKey":"flop.oneOf.0.links.session","typeLabel":"string"}},"uniqueKey":"flop.oneOf.0.links","typeLabel":"object"},"wire":{"oneOf":[{"type":"string","description":"Chat envelope version sent to the miner (`flop.chat-turn.v2` renders the model's chat template).","uniqueKey":"flop.oneOf.0.wire.oneOf.0","typeLabel":"string"},{"type":"null","description":"Chat envelope version sent to the miner (`flop.chat-turn.v2` renders the model's chat template).","uniqueKey":"flop.oneOf.0.wire.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.wire","typeLabel":"string | null"},"reply":{"oneOf":[{"type":"object","description":"The verified reply, for the wallet that owns the session (absent for other callers).","properties":{"role":{"const":"assistant","uniqueKey":"flop.oneOf.0.reply.oneOf.0.role","typeLabel":"any"},"content":{"type":"string","uniqueKey":"flop.oneOf.0.reply.oneOf.0.content","typeLabel":"string"},"finish_reason":{"oneOf":[{"type":"string","uniqueKey":"flop.oneOf.0.reply.oneOf.0.finish_reason.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"flop.oneOf.0.reply.oneOf.0.finish_reason.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.reply.oneOf.0.finish_reason","typeLabel":"string | null"}},"uniqueKey":"flop.oneOf.0.reply.oneOf.0","typeLabel":"object"},{"type":"null","description":"The verified reply, for the wallet that owns the session (absent for other callers).","properties":{"role":{"const":"assistant"},"content":{"type":"string"},"finish_reason":{"oneOf":[{"type":"string"},{"type":"null"}]}},"uniqueKey":"flop.oneOf.0.reply.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop.oneOf.0.reply","typeLabel":"object | null"},"reply_visible":{"type":"boolean","uniqueKey":"flop.oneOf.0.reply_visible","typeLabel":"boolean"},"ignored_parameters":{"type":"array","items":{"type":"string","uniqueKey":"flop.oneOf.0.ignored_parameters.items.[INDEX]","typeLabel":"string"},"description":"Request parameters this model ignored (see its supported_parameters).","uniqueKey":"flop.oneOf.0.ignored_parameters","typeLabel":"string[]"}},"uniqueKey":"flop.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"flop.oneOf.1","typeLabel":"null"}],"uniqueKey":"flop","typeLabel":"object | null"},"generation":{"oneOf":[{"type":"string","description":"Generation lookup for the same session.","uniqueKey":"generation.oneOf.0","typeLabel":"string"},{"type":"null","description":"Generation lookup for the same session.","uniqueKey":"generation.oneOf.1","typeLabel":"null"}],"uniqueKey":"generation","typeLabel":"string | null"}},"uniqueKey":"","typeLabel":"object"},"example":{"id":"gen-mwu3v1s3-ab700a21edac","object":"chat.completion.pending","created":1795489132,"model":"qwen/qwen3-8b","status":"pending","message":"no verified reply within 85 s; the generation continues. Poll GET /api/v1/generation?id=gen-mwu3v1s3-ab700a21edac (or GET /api/v1/sessions/gen-mwu3v1s3-ab700a21edac) until it has a reply, or use stream: true.","poll":"/v1/sessions/gen-mwu3v1s3-ab700a21edac","flop":null,"generation":"/api/v1/generation?id=gen-mwu3v1s3-ab700a21edac"},"examples":{"Example":{"title":"Example","value":{"id":"gen-mwu3v1s3-ab700a21edac","object":"chat.completion.pending","created":1795489132,"model":"qwen/qwen3-8b","status":"pending","message":"no verified reply within 85 s; the generation continues. Poll GET /api/v1/generation?id=gen-mwu3v1s3-ab700a21edac (or GET /api/v1/sessions/gen-mwu3v1s3-ab700a21edac) until it has a reply, or use stream: true.","poll":"/v1/sessions/gen-mwu3v1s3-ab700a21edac","flop":null,"generation":"/api/v1/generation?id=gen-mwu3v1s3-ab700a21edac"}}},"exampleType":"examples"}},"exampleType":"examples"},"7f30aeb9-217f-4644-9040-7ecde5e91232":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","description":"`code` is the HTTP status; `metadata.reason` is floprouter's specific reason.","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"integer","examples":[400,401,402,403,404,408,409,413,429,502,503],"isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"metadata":{"type":"object","properties":{"reason":{"type":"string","examples":["insufficient_balance","grant_expired","all_attempts_failed","no_provider_supports_parameters","tools_not_supported","model_not_found","rate_limited","withdrawal_in_progress"],"uniqueKey":"error.metadata.reason","typeLabel":"string"},"session_id":{"type":"string","uniqueKey":"error.metadata.session_id","typeLabel":"string"}},"additionalProperties":true,"uniqueKey":"error.metadata","typeLabel":"object"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":400,"message":"each message needs a role of system, developer, user or assistant (tool messages are not supported)","metadata":{"reason":"invalid_message"}}},"examples":{"Example":{"title":"Example","value":{"error":{"code":400,"message":"each message needs a role of system, developer, user or assistant (tool messages are not supported)","metadata":{"reason":"invalid_message"}}}}},"exampleType":"examples"}},"exampleType":"examples"},"6deafc2a-6758-43bf-b6f1-3aee49f3a557":{"description":"Missing or invalid key","content":{"application/json":{"schema":{"type":"object","description":"`code` is the HTTP status; `metadata.reason` is floprouter's specific reason.","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"integer","examples":[400,401,402,403,404,408,409,413,429,502,503],"isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"metadata":{"type":"object","properties":{"reason":{"type":"string","examples":["insufficient_balance","grant_expired","all_attempts_failed","no_provider_supports_parameters","tools_not_supported","model_not_found","rate_limited","withdrawal_in_progress"],"uniqueKey":"error.metadata.reason","typeLabel":"string"},"session_id":{"type":"string","uniqueKey":"error.metadata.session_id","typeLabel":"string"}},"additionalProperties":true,"uniqueKey":"error.metadata","typeLabel":"object"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":401,"message":"a wallet API key is required (Authorization: Bearer fr_...); see POST /v1/auth/challenge","metadata":{"reason":"unauthorized"}}},"examples":{"Example":{"title":"Example","value":{"error":{"code":401,"message":"a wallet API key is required (Authorization: Bearer fr_...); see POST /v1/auth/challenge","metadata":{"reason":"unauthorized"}}}}},"exampleType":"examples"}},"exampleType":"examples"},"eaf2b7a0-d91e-4a48-8cc5-2496d4dcc330":{"description":"The payer cannot cover this request","content":{"application/json":{"schema":{"type":"object","description":"`code` is the HTTP status; `metadata.reason` is floprouter's specific reason.","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"integer","examples":[400,401,402,403,404,408,409,413,429,502,503],"isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"metadata":{"type":"object","properties":{"reason":{"type":"string","examples":["insufficient_balance","grant_expired","all_attempts_failed","no_provider_supports_parameters","tools_not_supported","model_not_found","rate_limited","withdrawal_in_progress"],"uniqueKey":"error.metadata.reason","typeLabel":"string"},"session_id":{"type":"string","uniqueKey":"error.metadata.session_id","typeLabel":"string"}},"additionalProperties":true,"uniqueKey":"error.metadata","typeLabel":"object"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":402,"message":"prepaid balance 0 FLOP available cannot cover 0.0105 FLOP (escrow plus router fee); send FLOP to the deposit address, see GET /v1/balance","metadata":{"reason":"insufficient_balance","available":"0","required":"0.0105","session_id":"gen-mwu3pgp7-1130f87d046b"}}},"examples":{"Example":{"title":"Example","value":{"error":{"code":402,"message":"prepaid balance 0 FLOP available cannot cover 0.0105 FLOP (escrow plus router fee); send FLOP to the deposit address, see GET /v1/balance","metadata":{"reason":"insufficient_balance","available":"0","required":"0.0105","session_id":"gen-mwu3pgp7-1130f87d046b"}}}}},"exampleType":"examples"}},"exampleType":"examples"},"9aad3f31-51f1-426d-a2f1-8660d39ccb4e":{"description":"The request did not come through the public endpoint (origin header missing or wrong)","content":{"application/json":{"schema":{"type":"object","description":"`code` is the HTTP status; `metadata.reason` is floprouter's specific reason.","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"integer","examples":[400,401,402,403,404,408,409,413,429,502,503],"isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"metadata":{"type":"object","properties":{"reason":{"type":"string","examples":["insufficient_balance","grant_expired","all_attempts_failed","no_provider_supports_parameters","tools_not_supported","model_not_found","rate_limited","withdrawal_in_progress"],"uniqueKey":"error.metadata.reason","typeLabel":"string"},"session_id":{"type":"string","uniqueKey":"error.metadata.session_id","typeLabel":"string"}},"additionalProperties":true,"uniqueKey":"error.metadata","typeLabel":"object"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":403,"message":"requests must come through the public endpoint","metadata":{"reason":"forbidden"}}},"examples":{"Example":{"title":"Example","value":{"error":{"code":403,"message":"requests must come through the public endpoint","metadata":{"reason":"forbidden"}}}}},"exampleType":"examples"}},"exampleType":"examples"},"a3a60b35-71b8-4699-8753-c739f16098ff":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","description":"`code` is the HTTP status; `metadata.reason` is floprouter's specific reason.","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"integer","examples":[400,401,402,403,404,408,409,413,429,502,503],"isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"metadata":{"type":"object","properties":{"reason":{"type":"string","examples":["insufficient_balance","grant_expired","all_attempts_failed","no_provider_supports_parameters","tools_not_supported","model_not_found","rate_limited","withdrawal_in_progress"],"uniqueKey":"error.metadata.reason","typeLabel":"string"},"session_id":{"type":"string","uniqueKey":"error.metadata.session_id","typeLabel":"string"}},"additionalProperties":true,"uniqueKey":"error.metadata","typeLabel":"object"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":404,"message":"no such session","metadata":{"reason":"session_not_found"}}},"examples":{"Example":{"title":"Example","value":{"error":{"code":404,"message":"no such session","metadata":{"reason":"session_not_found"}}}}},"exampleType":"examples"}},"exampleType":"examples"},"af75ec14-ceee-44c2-8f8d-9fa7954229bc":{"description":"Body too large","content":{"application/json":{"schema":{"type":"object","description":"`code` is the HTTP status; `metadata.reason` is floprouter's specific reason.","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"integer","examples":[400,401,402,403,404,408,409,413,429,502,503],"isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"metadata":{"type":"object","properties":{"reason":{"type":"string","examples":["insufficient_balance","grant_expired","all_attempts_failed","no_provider_supports_parameters","tools_not_supported","model_not_found","rate_limited","withdrawal_in_progress"],"uniqueKey":"error.metadata.reason","typeLabel":"string"},"session_id":{"type":"string","uniqueKey":"error.metadata.session_id","typeLabel":"string"}},"additionalProperties":true,"uniqueKey":"error.metadata","typeLabel":"object"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":413,"message":"request body exceeds 524288 bytes","metadata":{"reason":"body_too_large"}}},"examples":{"Example":{"title":"Example","value":{"error":{"code":413,"message":"request body exceeds 524288 bytes","metadata":{"reason":"body_too_large"}}}}},"exampleType":"examples"}},"exampleType":"examples"},"24787b07-ac41-49ae-855b-b704274189fd":{"description":"Rate limit, concurrency cap, grant daily cap or demo budget","content":{"application/json":{"schema":{"type":"object","description":"`code` is the HTTP status; `metadata.reason` is floprouter's specific reason.","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"integer","examples":[400,401,402,403,404,408,409,413,429,502,503],"isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"metadata":{"type":"object","properties":{"reason":{"type":"string","examples":["insufficient_balance","grant_expired","all_attempts_failed","no_provider_supports_parameters","tools_not_supported","model_not_found","rate_limited","withdrawal_in_progress"],"uniqueKey":"error.metadata.reason","typeLabel":"string"},"session_id":{"type":"string","uniqueKey":"error.metadata.session_id","typeLabel":"string"}},"additionalProperties":true,"uniqueKey":"error.metadata","typeLabel":"object"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":429,"message":"chat requests for this key: limit 20 per minute; retry in 41 s","metadata":{"reason":"rate_limited"}}},"examples":{"Example":{"title":"Example","value":{"error":{"code":429,"message":"chat requests for this key: limit 20 per minute; retry in 41 s","metadata":{"reason":"rate_limited"}}}}},"exampleType":"examples"}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"exampleType":"examples"},"ced3fca3-f085-4c49-952c-3a1b8208daf3":{"description":"No provider could complete the request, or the service is restarting. Not 502: client SDKs retry 502 at once, and each retry can cost an on-chain fee.","content":{"application/json":{"schema":{"type":"object","description":"`code` is the HTTP status; `metadata.reason` is floprouter's specific reason.","properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"integer","examples":[400,401,402,403,404,408,409,413,429,502,503],"isRequired":true,"uniqueKey":"error.code","typeLabel":"integer"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"metadata":{"type":"object","properties":{"reason":{"type":"string","examples":["insufficient_balance","grant_expired","all_attempts_failed","no_provider_supports_parameters","tools_not_supported","model_not_found","rate_limited","withdrawal_in_progress"],"uniqueKey":"error.metadata.reason","typeLabel":"string"},"session_id":{"type":"string","uniqueKey":"error.metadata.session_id","typeLabel":"string"}},"additionalProperties":true,"uniqueKey":"error.metadata","typeLabel":"object"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"code":503,"message":"no miner completed the request after 1 attempt(s): 5HKiGNFSqSyEMVMjjr8JBKkkppytaqFZCRm27KGbCeHhUq92: computeChannel.MinerCapacityFullyReserved: D-0542: the miner's live capacity reservations leave no room for this channel's rate.","metadata":{"reason":"all_attempts_failed","session_id":"gen-mwu3pgp7-1130f87d046b"}}},"examples":{"Example":{"title":"Example","value":{"error":{"code":503,"message":"no miner completed the request after 1 attempt(s): 5HKiGNFSqSyEMVMjjr8JBKkkppytaqFZCRm27KGbCeHhUq92: computeChannel.MinerCapacityFullyReserved: D-0542: the miner's live capacity reservations leave no room for this channel's rate.","metadata":{"reason":"all_attempts_failed","session_id":"gen-mwu3pgp7-1130f87d046b"}}}}},"exampleType":"examples"}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}},"exampleType":"examples"}},"security":{"255da340-8aba-4572-b6fc-3d90c8e11aae":{"bearer":{"type":"http","scheme":"bearer","description":"Wallet API key `fr_...` from `POST /v1/auth/keys`.","scopes":[],"schemeName":"bearer"}},"b8c4e03e-f1db-4b0f-a3b9-fab8effe277f":{}},"servers":{"111d940b-82c3-478b-99ad-2469c05903e4":{"url":"https://api.floprouter.com","description":"API used by this site"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"Wallet API key `fr_...` from `POST /v1/auth/keys`.","scopes":[],"schemeName":"bearer"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Wallet API key `fr_...` from `POST /v1/auth/keys`.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearer","name":"Authorization"}],"title":"bearer"}]},"originalFileLocation":"openapi.json"},"subdomain":"floprouter","siteName":"floprouter","title":"Chat completion, settled on chain - floprouter","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-24T07:08:16.674Z","originalFileLocation":"api-reference/inference/chat-completion-settled-on-chain.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Chooses a miner (or follows provider), opens a payment channel with the caller\u0026#x27;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\u0026#x27; signed offers only: miners with a live offer are tried first, and when none has one the request waits up to 40 s for a fresh offer before moving on. Also served at /api/v1/chat/completions. A non-streaming call answers with one JSON body however long it takes: when no answer exists after 75 s the headers are sent; until then every answer, error or not, has its own HTTP status and a space is written every 10 s until the body follows (JSON allows leading whitespace); an error after that point is the JSON error body with status 200. With flop.async: true the call instead answers 202 chat.completion.pending when no reply exists within about 85 s. Closing the connection cancels the request (nothing is signed afterwards).\">\u003cmeta data-mint-head name=\"application-name\" content=\"floprouter\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/floprouter/VhsrSRgVhYIwYm5D/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/floprouter/VhsrSRgVhYIwYm5D/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/floprouter/VhsrSRgVhYIwYm5D/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/floprouter/VhsrSRgVhYIwYm5D/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/floprouter/VhsrSRgVhYIwYm5D/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/floprouter/VhsrSRgVhYIwYm5D/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/floprouter/VhsrSRgVhYIwYm5D/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/floprouter/VhsrSRgVhYIwYm5D/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/floprouter/VhsrSRgVhYIwYm5D/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Chat completion, settled on chain - floprouter\">\u003cmeta data-mint-head property=\"og:description\" content=\"Chooses a miner (or follows provider), opens a payment channel with the caller\u0026#x27;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\u0026#x27; signed offers only: miners with a live offer are tried first, and when none has one the request waits up to 40 s for a fresh offer before moving on. Also served at /api/v1/chat/completions. A non-streaming call answers with one JSON body however long it takes: when no answer exists after 75 s the headers are sent; until then every answer, error or not, has its own HTTP status and a space is written every 10 s until the body follows (JSON allows leading whitespace); an error after that point is the JSON error body with status 200. With flop.async: true the call instead answers 202 chat.completion.pending when no reply exists within about 85 s. Closing the connection cancels the request (nothing is signed afterwards).\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"floprouter\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.floprouter.com/api-reference/inference/chat-completion-settled-on-chain\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://floprouter.mintlify.site/_mintlify/api/og/v2?division=Inference\u0026amp;title=Chat+completion%2C+settled+on+chain\u0026amp;description=Chooses+a+miner+%28or+follows+%60provider%60%29%2C+opens+a+payment+channel+with+the+caller%27s+payer+mode%2C+runs+one+verified+turn%2C+and+answers+with+the+reply.+If+an+attempt\u0026amp;theme=e98a15edcee9575beba7188b\u0026amp;signature=c4134ea57b7063737bd90cb78de0667e6653e5f10be203a06853f8ef016b5465\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Chat completion, settled on chain - floprouter\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Chooses a miner (or follows provider), opens a payment channel with the caller\u0026#x27;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\u0026#x27; signed offers only: miners with a live offer are tried first, and when none has one the request waits up to 40 s for a fresh offer before moving on. Also served at /api/v1/chat/completions. A non-streaming call answers with one JSON body however long it takes: when no answer exists after 75 s the headers are sent; until then every answer, error or not, has its own HTTP status and a space is written every 10 s until the body follows (JSON allows leading whitespace); an error after that point is the JSON error body with status 200. With flop.async: true the call instead answers 202 chat.completion.pending when no reply exists within about 85 s. Closing the connection cancels the request (nothing is signed afterwards).\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://floprouter.mintlify.site/_mintlify/api/og/v2?division=Inference\u0026amp;title=Chat+completion%2C+settled+on+chain\u0026amp;description=Chooses+a+miner+%28or+follows+%60provider%60%29%2C+opens+a+payment+channel+with+the+caller%27s+payer+mode%2C+runs+one+verified+turn%2C+and+answers+with+the+reply.+If+an+attempt\u0026amp;theme=e98a15edcee9575beba7188b\u0026amp;signature=c4134ea57b7063737bd90cb78de0667e6653e5f10be203a06853f8ef016b5465\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/floprouter/VhsrSRgVhYIwYm5D/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"floprouter\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#b83a0b\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.floprouter.com/api-reference/inference/chat-completion-settled-on-chain\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/inference/chat-completion-settled-on-chain.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.floprouter.com/#organization\",\"name\":\"floprouter\",\"url\":\"https://docs.floprouter.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/floprouter/BB5APJt0zj9Pp8La/logo/light.svg?fit=max\u0026auto=format\u0026n=BB5APJt0zj9Pp8La\u0026q=85\u0026s=d0fd562a590ac0effd5f40693652f873\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.floprouter.com#website\",\"name\":\"floprouter\",\"url\":\"https://docs.floprouter.com\",\"publisher\":{\"@id\":\"https://docs.floprouter.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.floprouter.com/api-reference/inference/chat-completion-settled-on-chain#webpage\",\"url\":\"https://docs.floprouter.com/api-reference/inference/chat-completion-settled-on-chain\",\"name\":\"Chat completion, settled on chain\",\"description\":\"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 only: miners with a live offer are tried first, and when none has one the request waits up to 40 s for a fresh offer before moving on. Also served at /api/v1/chat/completions. A non-streaming call answers with one JSON body however long it takes: when no answer exists after 75 s the headers are sent; until then every answer, error or not, has its own HTTP status and a space is written every 10 s until the body follows (JSON allows leading whitespace); an error after that point is the JSON error body with status 200. With flop.async: true the call instead answers 202 chat.completion.pending when no reply exists within about 85 s. Closing the connection cancels the request (nothing is signed afterwards).\",\"dateModified\":\"2026-11-24T07:08:16.674Z\",\"isPartOf\":{\"@id\":\"https://docs.floprouter.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.floprouter.com/api-reference/inference/chat-completion-settled-on-chain#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.floprouter.com/api-reference/inference/chat-completion-settled-on-chain#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"floprouter\",\"item\":\"https://docs.floprouter.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Chat completion, settled on chain\",\"item\":\"https://docs.floprouter.com/api-reference/inference/chat-completion-settled-on-chain\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.floprouter.com/api-reference/inference/chat-completion-settled-on-chain#apireference\",\"headline\":\"Chat completion, settled on chain\",\"name\":\"Chat completion, settled on chain\",\"description\":\"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 only: miners with a live offer are tried first, and when none has one the request waits up to 40 s for a fresh offer before moving on. Also served at /api/v1/chat/completions. A non-streaming call answers with one JSON body however long it takes: when no answer exists after 75 s the headers are sent; until then every answer, error or not, has its own HTTP status and a space is written every 10 s until the body follows (JSON allows leading whitespace); an error after that point is the JSON error body with status 200. With flop.async: true the call instead answers 202 chat.completion.pending when no reply exists within about 85 s. Closing the connection cancels the request (nothing is signed afterwards).\",\"url\":\"https://docs.floprouter.com/api-reference/inference/chat-completion-settled-on-chain\",\"mainEntityOfPage\":{\"@id\":\"https://docs.floprouter.com/api-reference/inference/chat-completion-settled-on-chain#webpage\"},\"dateModified\":\"2026-11-24T07:08:16.674Z\",\"publisher\":{\"@id\":\"https://docs.floprouter.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.floprouter.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"floprouter\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"floprouter\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/inference/chat-completion-settled-on-chain.md","siteName":"floprouter","nav":{"global":null,"tabs":[{"tab":"Docs","pages":[{"title":"Docs","href":""}]},{"tab":"API reference","groups":[{"group":"Overview","pages":[{"title":"API reference","description":"Every endpoint of the floprouter API, with a console to try requests.","href":"/api-reference/overview"}]},{"group":"Endpoints","pages":[{"group":"Inference","pages":[{"title":"Chat completion, settled on chain","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/chat/completions","href":"/api-reference/inference/chat-completion-settled-on-chain"},{"title":"Generation stats for a session","description":"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.","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/generation","href":"/api-reference/inference/generation-stats-for-a-session"},{"title":"The calling wallet's sessions, newest first","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/sessions","href":"/api-reference/inference/the-calling-wallets-sessions-newest-first"},{"title":"A session's status, cost and on-chain record","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/sessions/{id}","href":"/api-reference/inference/a-sessions-status-cost-and-on-chain-record"}]},{"group":"Models","pages":[{"title":"Models","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/models","href":"/api-reference/models/models"},{"title":"Number of models","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/models/count","href":"/api-reference/models/number-of-models"},{"title":"One model by its id","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/models/{author}/{slug}","href":"/api-reference/models/one-model-by-its-id"},{"title":"One model by its id (singular path)","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/model/{author}/{slug}","href":"/api-reference/models/one-model-by-its-id-singular-path"},{"title":"Miners serving a model (its endpoints)","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/models/{author}/{slug}/endpoints","href":"/api-reference/models/miners-serving-a-model-its-endpoints"}]},{"group":"Directory","pages":[{"title":"Every registered miner with score, facts, models and endpoint status","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/miners","href":"/api-reference/directory/every-registered-miner-with-score-facts-models-and-endpoint-status"},{"title":"One miner in detail","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/miners/{address}","href":"/api-reference/directory/one-miner-in-detail"},{"title":"Submit a session URL for a miner","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/miners/{address}/endpoint","href":"/api-reference/directory/submit-a-session-url-for-a-miner"},{"title":"Network totals for the website","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/stats","href":"/api-reference/directory/network-totals-for-the-website"},{"title":"Providers: a thin alias view of /v1/miners","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/providers","href":"/api-reference/directory/providers:-a-thin-alias-view-of-v1miners"}]},{"group":"Auth","pages":[{"title":"Get a challenge for a wallet to sign","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/auth/challenge","href":"/api-reference/auth/get-a-challenge-for-a-wallet-to-sign"},{"title":"List the calling wallet's keys","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/auth/keys","href":"/api-reference/auth/list-the-calling-wallets-keys"},{"title":"Exchange a signed challenge for an API key","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/auth/keys","href":"/api-reference/auth/exchange-a-signed-challenge-for-an-api-key"},{"title":"Revoke a key of the calling wallet","deprecated":null,"version":null,"openapi":"/openapi.json delete /v1/auth/keys/{id}","href":"/api-reference/auth/revoke-a-key-of-the-calling-wallet"},{"title":"Change a key's default payer mode","deprecated":null,"version":null,"openapi":"/openapi.json patch /v1/auth/keys/{id}","href":"/api-reference/auth/change-a-keys-default-payer-mode"},{"title":"The calling key: usage in FLOP and limits","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/key","href":"/api-reference/auth/the-calling-key:-usage-in-flop-and-limits"}]},{"group":"Grants","pages":[{"title":"The grant to sign for grant mode","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/grants/params","href":"/api-reference/grants/the-grant-to-sign-for-grant-mode"},{"title":"Re-read the calling wallet's grant from the chain","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/grants/sync","href":"/api-reference/grants/re-read-the-calling-wallets-grant-from-the-chain"},{"title":"The calling wallet's grant state","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/grants","href":"/api-reference/grants/the-calling-wallets-grant-state"}]},{"group":"Balance","pages":[{"title":"Prepaid balance, deposit address, recent ledger entries","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/balance","href":"/api-reference/balance/prepaid-balance-deposit-address-recent-ledger-entries"},{"title":"Withdraw prepaid balance to the owning wallet","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/balance/withdraw","href":"/api-reference/balance/withdraw-prepaid-balance-to-the-owning-wallet"},{"title":"The calling wallet's withdrawals","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/balance/withdrawals","href":"/api-reference/balance/the-calling-wallets-withdrawals"},{"title":"State of one withdrawal","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/balance/withdrawals/{id}","href":"/api-reference/balance/state-of-one-withdrawal"}]},{"group":"Service","pages":[{"title":"Sync state of the registry, event index, endpoint registry, sources and payer","deprecated":null,"version":null,"openapi":"/openapi.json get /health","href":"/api-reference/service/sync-state-of-the-registry-event-index-endpoint-registry-sources-and-payer"},{"title":"This document","deprecated":null,"version":null,"openapi":"/openapi.json get /openapi.json","href":"/api-reference/service/this-document"}]}]}]},{"tab":"SDKs and tools","pages":[{"title":"SDKs and tools","href":"/for-agents"}]},{"tab":"Miners and operators","pages":[{"title":"Miners and operators","href":"/miner-operators"}]}]},"basePath":"","title":"Chat completion, settled on chain - floprouter","deploymentId":"dpl_G6E2ur2Zjq51xGTVZPSFXsWoTxCu","buildId":"dpl_G6E2ur2Zjq51xGTVZPSFXsWoTxCu","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-x4vGgoST.js","snippetPresets-BGlsYH49.js","utils-D225GpYB.js","style-to-object-BY3JEAdk.js","utils-fb7dxv-3.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-D0sNzoEe.js","conditional-requirements-CFM0id0Q.js","cloneDeep-C4iMfrOs.js","_Uint8Array-DDor1j2p.js","isObject-FP1Yky1u.js","ApiExamples-Bw_TWYoP.js","usePlaygroundInputsStore-DLRpNM_Z.js","shallow-DCZ_mvT2.js","isEqual-BZMHHGz2.js","CodeSnippets-CqYNT6UN.js","CodeSnippet-AsYrl7_f.js","getApiPlaygroundDisplay-B1HdZsAn.js","Page-COAeG2by.js","DynamicMarkdown-Bg54PExR.js","SectionHeading-BVOfbSTS.js","icon-Bwg0LftJ.js","MethodPill-ETXe5J4U.js","getPastedJson-6m1DH7UM.js","Check2Icon-Bz4v4IkN.js","axios-CsQoIw0U.js","Markdown-CYkmN8yk.js","AssistantPageLink-BZUrxqjy.js","dist-C-58LlaB.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}