Endpoints
Start a swarm
Run one command across many machines.
POST
Start a swarm that runs one command across many machines.
Authentication
Send your scoped bearer token in theAuthorization: Bearer <BEAD_TOKEN> header, or send your API key in X-API-Key.
Parameters
string
Caller-generated durable retry key: lowercase ASCII letters, digits, and hyphens only. Reuse the same key and body after a connection failure. Minimum length:
1. Maximum length: 240.Request body
The JSON body is required.string
required
Published template or ready snapshot ID; choose a template returned by the catalog.
string
Machine size; omission uses the default size. Allowed values:
"xs", "small", "medium", "large", "xlarge".string
required
Shell command run with /bin/sh -c in /root. Inputs arrive in BEAD_SWARM_INPUT; index and attempt arrive in BEAD_SWARM_INDEX and BEAD_SWARM_ATTEMPT. Limited to 16384 bytes with no NUL. Minimum length:
1. Maximum length: 16384.integer
Number of members with null input; supply count or inputs, never both. Minimum:
1. Maximum: 256.any[]
One JSON value per member, at most 16384 serialized bytes each. Supply inputs or count, never both.
integer
default:300
Execution time limit for each member in seconds. Minimum:
1. Maximum: 3600.integer
default:8
Maximum attempts executing concurrently. Minimum:
1. Maximum: 256.integer
default:0
Extra attempts allowed per member. Members × (retries + 1) must not exceed 256. Minimum:
0. Maximum: 3.string[]
default:[]
Output file globs, at most 16 strings of at most 1024 bytes each. Collection retains at most 16 files and 32 KiB total.
Response
202
Swarm state and member counts.string
required
Swarm UUID.
string
required
Job state after scheduling and cleanup. Allowed values:
"queued", "running", "completed", "failed", "cancelled".object
required
Member counts grouped by current result.
integer
required
Creation time in Unix milliseconds.
integer | null
required
Completion time in Unix milliseconds; null while active. May be
null.string
required
Relative URL for the terminal JSONL results download.
integer
required
Seconds results remain available after completion. Allowed values:
86400.
