Skip to main content

Live OpenAPI

The canonical, always-current schema.
Every endpoint is at https://api.swarmlord.ai and requires a bearer token:
Mint tokens with swarmlord login (CLI) or the dashboard.

Deploy a bundle

Returns { ok: true, agentId, warnings } or { ok: false, errors }.

Create a session

Returns { id }.

Send a message (streaming)

Response is an SSE stream of events for this turn.

Send a message (async)

Returns 202 { messageId } immediately. Events are persisted to the session for later replay.

Subscribe / replay

Replays events with seq > 5, then streams new ones.

Fork

Snapshots state into a new session id. Returns { id }.

Abort

Cancels the in-flight model call.

Revert / regenerate

Upload an attachment

Stores the file and returns { url } — an r2://media/... reference you can include in a later message or download.

Download an attachment / artifact

Streams the stored object with its original Content-Type. key is the path from the r2:// ref and is scoped to the media/ prefix.

Keys

Secrets

Webhooks

Each delivery includes x-swarmlord-signature: <hmac-sha256> and x-swarmlord-timestamp headers. Verify with verifyWebhook() from swarmlord/webhooks.

Triggers

Webhook-triggered agents are reachable at:
The request body becomes the initial user message. No auth header — the URL is the secret.

Errors

Health

Returns 200 { "ok": true } if the platform is reachable.