Fly Brain API

by Promptbox Full network · Fixed weights · v1.4.0 docs

Send an image or neural stimulus. Receive the simulated fly network’s spikes, firing rates and voltages.

166,700 neurons · 25,582,938 connections

Each request runs against the complete retained MaleCNS v1.0 network. Promptbox supplies the service credential automatically.

POST https://www.promptbox.cn/api/doomfly.php?path=/v1/step
Content-Type: application/json

{"luminance":0.5,"duration_ms":20,"top_k":10}

Inputs and outputs

Use image_base64 for PNG/JPEG/WebP, luminance for brightness, or stimuli for currents applied to specific neuron IDs. Combine visual input with direct stimulation if needed.

Responses include full-network spike totals, population summaries, top active cells, selected readout voltages and timing. A response’s top_spikes_truncated flag reports omitted output rows; every connection still participates in the simulation.

Endpoints

Methodpath=Purpose
GET/healthReadiness and capacity
GET/v1/modelModel, limits, provenance
GET/v1/neuronsNeuron IDs; filter by cell_type or superclass
GET/v1/retinaRetinal IDs and coordinates
POST/v1/stepInput → neural activity
POST/v1/sessionsLease state for successive inputs
DELETE/v1/sessions/IDRelease and reset

Independent calls or a sequence

Independent calls reset to the same initial state. A session preserves voltages, delayed events and retinal filtering across calls. One session can be leased for 30–900 seconds, up to 512 unique steps; session requests require a unique request_id so retries do not run twice.

The lease is a fixed wall-clock deadline and does not renew on activity. Creation and stateful step responses report max_steps, steps_used and steps_remaining (under session for steps). Step 512 succeeds; further unique steps return 409. Expiry returns 404. Identical retries do not count twice. Sessions are in memory and do not survive restart.

Fly Brain Lab supports up to 512 video samples with a 15-minute lease. It stops with an in-app notice when either limit is reached, including after a paused or suspended tab resumes. Replay starts fresh; images and pulses remain independent.

Each step advances 0.1–100 simulated milliseconds. One request computes at a time, with a shared 120-request/minute quota. Busy clients receive 429; clients outside an active session receive 409.

Compact neuron activity — available

Check whether /v1/model advertises activity_view.formats containing section_top80_v1. If so, cache /v1/activity-layout and request activity_view: "section_top80_v1" with top_k: 0. The worker selects the strongest 80% in each section and transmits only selected nonzero counts. Colors use a fixed logarithmic 0–500 Hz scale; retinal dots use inferred image-sampling coordinates. Omit activity_view when the visualization is collapsed. Transport contract and worker-agent instructions. Ordinary neural inputs remain unchanged; activity computation is skipped unless requested.

How it works

Image pixels → inferred R1–R6 brightness samples → simplified spiking neurons → measured activity. Direct stimuli apply an artificial current to named neurons instead. Optional Doom control values come from the original fixed decoder.

This service runs a fixed-weight baseline with all retained MaleCNS v1.0 connections. Learning and reinforcement are off. It does not run an autonomous Doom arena. Biological wiring supplies the network structure; dynamics, visual projection and control mappings remain model assumptions.

DOOMFLY source · Scientific review · MaleCNS dataset · Neural model reference

Complete API contract and examples
Settings & revision

Documentation revision 1.4.0. Compact activity is deployed on worker v1.3.0; check /v1/model capabilities before requesting it. Baseline timestep: 0.1 ms. Default input duration: 20 ms. Default session: 900 seconds (15 minutes), including pauses. Learning: disabled. Browser refreshes never make neural requests.