Skip to main content

Validator HTTP API

The validator runs a FastAPI server exposing endpoints for model distribution, checkpoint submission, and health monitoring.

Authentication

All endpoints except GET /health require Bearer token authentication:

Authorization: Bearer <BZ_AUTH_TOKEN>

Requests with missing or invalid tokens receive 401 Unauthorized.


GET /model/partial

Returns the expert group slice for the requesting miner.

Request headers

Authorization: Bearer <token>
X-Expert-Group: 0
X-Hotkey: 5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty
HeaderRequiredDescription
AuthorizationyesBearer token
X-Expert-GroupyesInteger expert group ID
X-HotkeyyesMiner's SS58 hotkey address

Response

JSON metadata header followed by binary tensor data:

{
"expert_group": 0,
"block_number": 12345,
"model_version": "step_1000",
"content_hash": "sha256:abcdef1234..."
}
FieldDescription
expert_groupExpert group ID of the returned slice
block_numberChain block at which this model version was snapshotted
model_versionHuman-readable model version identifier
content_hashSHA-256 hash of the binary payload for integrity verification

Status codes

CodeMeaning
200 OKSuccess — body contains expert group tensor data
401 UnauthorizedMissing or invalid auth token
404 Not FoundRequested expert group does not exist
503 Service UnavailableModel has not finished loading

GET /model/full

Returns the complete model for peer validators. Restricted to callers registered as validators on the subnet.

Request headers

Authorization: Bearer <token>

Response

Full model weights streamed as a safetensors file (~60GB for Qwen3-VL-30B).

Status codes

CodeMeaning
200 OKSuccess — body is the streamed safetensors model
401 UnauthorizedMissing or invalid auth token
403 ForbiddenRequester hotkey is not registered as a validator

POST /submit

Accepts a miner checkpoint submission during the submit phase.

Request bodyapplication/json

{
"hotkey": "5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty",
"expert_group": 0,
"checkpoint_url": "https://miner-server.example.com/checkpoint_500_12345.pt",
"block_number": 12345,
"signature": "url-safe-base64-encoded-ed25519-signature"
}
FieldRequiredDescription
hotkeyyesMiner's SS58 Bittensor hotkey
expert_groupyesExpert group ID the checkpoint was trained for
checkpoint_urlyesURL from which the validator can fetch the checkpoint
block_numberyesChain block at which the training cycle ended
signatureyesURL-safe base64-encoded ed25519 signature over the submission fields

Response202 Accepted

{
"status": "accepted",
"submission_id": "550e8400-e29b-41d4-a716-446655440000",
"evaluation_eta_blocks": 5
}

Status codes

CodeMeaning
202 AcceptedQueued for evaluation
400 Bad RequestMalformed body or invalid signature
409 ConflictDuplicate submission for this hotkey + block
423 LockedNot currently in submit phase

GET /health

Health check. No authentication required.

Response200 OK

{
"status": "healthy",
"model_loaded": true,
"current_block": 12345,
"phase": "train"
}
FieldDescription
status"healthy" when operating normally
model_loadedtrue once the base model has finished loading
current_blockMost recently observed chain block number
phaseCurrent subnet phase: "distribute", "train", "commit", or "submit"