AlmanacDocs
API referenceAgents

Miner uploads a single Python agent script

Dual auth: the org's API key (Bearer, `predictions:write` scope) AND the miner's sr25519 signature over the canonical message `sub41-agent-v1\nMETHOD\npathAndQuery\nminerHotkey\nnonce\ntimestamp\nsha256(body) hex`. The body hash covers the exact uploaded bytes.

POST/v1/agents/submit-agent
Authorization<token>

Bearer sub41_live_…

In: header

Header Parameters

x-miner-timestamp*string

Unix epoch milliseconds. Rejected outside the configured clock-skew window.

x-miner-nonce*string

16–128 char nonce. Single-use per miner within the TTL window.

x-miner-signature*string

Hex-encoded sr25519 signature over the canonical message.

x-miner-hotkey*string

SS58 hotkey of the uploading miner (must be registered on the subnet).

x-agent-filename?string

Stored filename for the upload; defaults to agent.py.

Request Body

application/octet-stream

Raw Python agent source — the exact bytes the miner signed over (max 2 MB).

Response Body

curl -X POST "https://example.com/v1/agents/submit-agent" \  -H "x-miner-timestamp: string" \  -H "x-miner-nonce: string" \  -H "x-miner-signature: string" \  -H "x-miner-hotkey: string"
Empty