Skip to main content

1. Get a key

Open the account page, connect a Polkadot wallet (polkadot-js, Talisman or SubWallet), and sign the login message. Signing it is free and moves no funds. You get a key that starts with fr_. It is shown once.
A new key makes your wallet the payer on chain, which needs one more signature: the grant, on the same page. To skip the grant, switch the key to Balance there and deposit a little FLOP. See payer modes.

2. Pick a model

A model with available: true has at least one ready miner. The models page shows the same list. No key is needed for this call.

3. Send a request

To use an SDK or framework instead, see SDK compatibility. The call returns when the miner’s reply is verified, usually in 15 to 50 s. Set client timeouts to 120 s or more. max_tokens sizes the escrow, so keep it close to what you need.

4. Read the response

The body is a chat completion with two extra fields: provider, the miner that served it, and flop, the record of the session.
This is an abridged real response from devnet. Amounts are decimal strings in FLOP.

5. Watch it settle

status moves from settling to settled, and miner_paid and on_chain.outcome_tx fill in, 2 to 4 minutes after the reply. The channel is on the explorer at https://explorer.devnet.flop.network/channels/<channel_id>.

Next