fly.ai compute · buy compute

Run an experiment on the fly brain

Choose what the fly senses. The network plays it into the full connectome, 166,700 neurons, over and over, and hands back what its muscles and escape neurons do. You pay in $FLYAI only for runs that finish, and most of it goes to the miners.

WHAT TO RUN
1 · WHAT TO TEST

Pick an experiment

2 · HOW SURE

Repeats

The brain has random noise, like a real one. Each repeat runs the whole experiment again with different noise, so more repeats give steadier averages.

3 · HOW FAST

Speed

Miners pick orders at random, weighted by price. Paying more per run gets your runs picked more often.

4 · ORDER

Walletnot signed in

Advanced settings

Senses to drive

Sides

Strength is how hard the sense is driven. Gain scales every synapse, and tonic is a steady background drive for every neuron. Lists are comma separated. Each run is 15 simulated seconds: a rest, then the stimulus. A smaller budget or a time limit stops the order early, and what it didn't spend goes back to your balance.

5 · RESULTS

Your orders

Sign in to see your orders.

FOR DEVELOPERS

Use it from code

Everything on this page is a plain JSON API at https://flyai-mine.fly.dev. Results come to you as miners settle them, three ways. Every row has a seq that only goes up, so keep the last one you handled.

1. Create and pay. Create the order for your wallet, then send one $FLYAI transfer of exactly budget_wei to pay_to and hand over the transaction hash.

curl -X POST https://flyai-mine.fly.dev/api/orders -H 'content-type: application/json' -d '{
  "wallet": "0xYourWallet", "bid": "20", "budget": "255", "webhook": "https://your-server.com/flyai",
  "spec": {"kind": "connectome-sweep", "channels": ["LPLC2", "none"], "sides": ["L", "R"],
           "amounts": [0.2, 0.4], "gains": [3], "tonics": [0.14], "seeds": 3, "warm": 250}
}'
# → {"id": "…", "budget_wei": "…", "pay_to": "0x…", "webhook_secret": "…"}

curl -X POST https://flyai-mine.fly.dev/api/orders/ORDER_ID/pay -H 'content-type: application/json' -d '{"tx": "0xTransferHash"}'

2. Stream results live (server-sent events; a browser reconnects and resumes on its own):

const es = new EventSource("https://flyai-mine.fly.dev/api/orders/ORDER_ID/stream");
es.addEventListener("result", (e) => save(JSON.parse(e.data)));   // one settled run
es.addEventListener("status", (e) => {
  if (["done", "ended"].includes(JSON.parse(e.data).status)) es.close();
});

3. Or pull pages, asking again with after=next:

curl "https://flyai-mine.fly.dev/api/orders/ORDER_ID/results?after=0&limit=5000"
# → {"status": "live", "next": 1042, "more": false, "outputs": [...], "rows": [{"seq": 1031, "channel": "LPLC2", "base": [...], "stim": [...]}, ...]}

4. Or get a webhook. Batches of up to 500 rows are POSTed to your URL, with "final": true on the last call. They're retried until your server answers 2xx, and signed with X-Flyai-Signature: t=<ms>,v1=HMAC-SHA256(secret, "t.body"). The guide has receivers for Node and Python, paying with viem, and every field.

HOW IT WORKS
  • You pay per finished run. A run counts once two different miners return exactly the same answer, or the server runs it itself. A miner who answers wrong loses the day. Runs the network has already done cost and are ready at once.
  • It stops when it's done, or when the budget runs out, the time limit passes, or you press Stop. What it didn't spend goes back to your balance for your next order.
  • of what you spend goes to the miners through this month's pool.
  • Paying is one $FLYAI transfer from your wallet. The amount ends in a few extra wei so it can be matched to your order, and your wallet fills it in. Paying from your balance or stopping an order needs only your sign-in: no extra signature.
  • Results are spike counts for each motor group, before and during the stimulus, as CSV or JSON. Anyone with an order's link can download them.