{"openapi":"3.1.0","info":{"title":"ColabHive Orchestrator API","description":"Distributed AI task routing and orchestration","version":"0.1.0"},"paths":{"/tasks/{task_id}/claim":{"post":{"summary":"Claim Task","description":"Claim a task for execution from task_executions table.","operationId":"claim_task_tasks__task_id__claim_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskClaimRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskClaimResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/{task_id}/claim":{"post":{"summary":"Claim Task","description":"Claim a task for execution from task_executions table.","operationId":"claim_task_api_v1_tasks__task_id__claim_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskClaimRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskClaimResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/audit/task/{task_id}":{"get":{"tags":["admin"],"summary":"Get Task Audit","description":"Get all ledger events for a specific task\n\nShows the full accounting trail:\n- hold (escrow)\n- capture (payouts)\n- refund (if failed)\n\nRequires the operations key (X-API-Key).","operationId":"get_task_audit_api_v1_admin_audit_task__task_id__get","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/killswitch/activate":{"post":{"tags":["admin"],"summary":"Activate Killswitch","description":"Activate the platform kill switch: every orchestrator process refuses new work\n(inference, batches, training tasks, Cohort runs) with 503 ``operator_kill_switch``.\nWork already admitted, queued or running, is not touched.","operationId":"activate_killswitch_api_v1_admin_killswitch_activate_post","parameters":[{"name":"reason","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Reason"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/killswitch/deactivate":{"post":{"tags":["admin"],"summary":"Deactivate Killswitch","description":"Deactivate the platform kill switch: new work is admitted again.","operationId":"deactivate_killswitch_api_v1_admin_killswitch_deactivate_post","parameters":[{"name":"reason","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/killswitch/status":{"get":{"tags":["admin"],"summary":"Get Killswitch Status","description":"The kill switch state every orchestrator process reads at admission.","operationId":"get_killswitch_status_api_v1_admin_killswitch_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/cohorts/health":{"get":{"summary":"Health","operationId":"health_api_v1_cohorts_health_get","parameters":[{"name":"X-Account-ID","in":"header","required":true,"schema":{"type":"string","title":"X-Account-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cohorts/capabilities":{"get":{"summary":"Capabilities","description":"Return effective, endpoint-scoped dispatch readiness.\n\nThis is intentionally read-only: unlike ``cohorts:plan`` it neither\nconsumes the admission rate limit nor creates a plan identity.  Every\ndependency used by dispatch is still checked, so a stale rollout,\nresidency outage, or incompatible representation space hides the\ncapability before a caller can opt in.","operationId":"capabilities_api_v1_cohorts_capabilities_get","parameters":[{"name":"endpoint_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}},{"name":"X-Account-ID","in":"header","required":true,"schema":{"type":"string","title":"X-Account-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/internal/cohort/evaluator/model-spaces":{"post":{"summary":"Register Model Space","operationId":"register_model_space_api_v1_internal_cohort_evaluator_model_spaces_post","parameters":[{"name":"X-Cohort-Evaluator-Token","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Cohort-Evaluator-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelSpaceRegistration"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/internal/cohort/evaluator/evidence":{"post":{"summary":"Register Evidence","operationId":"register_evidence_api_v1_internal_cohort_evaluator_evidence_post","parameters":[{"name":"X-Cohort-Evaluator-Token","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Cohort-Evaluator-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompatibilityEvidenceRegistration"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/internal/cohort/evaluator/structured-runs":{"post":{"summary":"Create Structured Evaluation Run","description":"Admit one real product-path run with label-blind consumer metadata.","operationId":"create_structured_evaluation_run_api_v1_internal_cohort_evaluator_structured_runs_post","parameters":[{"name":"X-Cohort-Evaluator-Token","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Cohort-Evaluator-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StructuredEvaluationRun"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/internal/cohort/evaluator/model-spaces/{model_config_id}:revoke":{"post":{"summary":"Revoke Model Space","operationId":"revoke_model_space_api_v1_internal_cohort_evaluator_model_spaces__model_config_id__revoke_post","parameters":[{"name":"model_config_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Model Config Id"}},{"name":"X-Cohort-Evaluator-Token","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Cohort-Evaluator-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelSpaceRevocation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/internal/cohort/evaluator/evidence/{evidence_id}:revoke":{"post":{"summary":"Revoke Evidence","operationId":"revoke_evidence_api_v1_internal_cohort_evaluator_evidence__evidence_id__revoke_post","parameters":[{"name":"evidence_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Evidence Id"}},{"name":"X-Cohort-Evaluator-Token","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Cohort-Evaluator-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidenceRevocation"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cohorts:plan":{"post":{"summary":"Plan","operationId":"plan_api_v1_cohorts_plan_post","parameters":[{"name":"X-Account-ID","in":"header","required":true,"schema":{"type":"string","title":"X-Account-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cohorts:run":{"post":{"summary":"Run","operationId":"run_api_v1_cohorts_run_post","parameters":[{"name":"X-Account-ID","in":"header","required":true,"schema":{"type":"string","title":"X-Account-Id"}},{"name":"X-User-ID","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cohorts/{cohort_id}/edges/{edge_id}:negotiate":{"post":{"summary":"Negotiate Edge","operationId":"negotiate_edge_api_v1_cohorts__cohort_id__edges__edge_id__negotiate_post","parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}},{"name":"edge_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Edge Id"}},{"name":"X-Account-ID","in":"header","required":true,"schema":{"type":"string","title":"X-Account-Id"}},{"name":"X-Node-ID","in":"header","required":true,"schema":{"type":"string","title":"X-Node-Id"}},{"name":"X-Node-Timestamp","in":"header","required":true,"schema":{"type":"integer","title":"X-Node-Timestamp"}},{"name":"X-Node-Signature","in":"header","required":true,"schema":{"type":"string","title":"X-Node-Signature"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgeNegotiateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cohorts/{cohort_id}/edges/{edge_id}:rendezvous":{"post":{"summary":"Rendezvous Edge","operationId":"rendezvous_edge_api_v1_cohorts__cohort_id__edges__edge_id__rendezvous_post","parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}},{"name":"edge_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Edge Id"}},{"name":"X-Account-ID","in":"header","required":true,"schema":{"type":"string","title":"X-Account-Id"}},{"name":"X-Node-ID","in":"header","required":true,"schema":{"type":"string","title":"X-Node-Id"}},{"name":"X-Node-Timestamp","in":"header","required":true,"schema":{"type":"integer","title":"X-Node-Timestamp"}},{"name":"X-Node-Signature","in":"header","required":true,"schema":{"type":"string","title":"X-Node-Signature"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgeRendezvousRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cohorts/{cohort_id}/edges/{edge_id}:transfer":{"post":{"summary":"Start Edge Transfer","operationId":"start_edge_transfer_api_v1_cohorts__cohort_id__edges__edge_id__transfer_post","parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}},{"name":"edge_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Edge Id"}},{"name":"X-Account-ID","in":"header","required":true,"schema":{"type":"string","title":"X-Account-Id"}},{"name":"X-Node-ID","in":"header","required":true,"schema":{"type":"string","title":"X-Node-Id"}},{"name":"X-Node-Timestamp","in":"header","required":true,"schema":{"type":"integer","title":"X-Node-Timestamp"}},{"name":"X-Node-Signature","in":"header","required":true,"schema":{"type":"string","title":"X-Node-Signature"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgeAttemptRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cohorts/{cohort_id}/edges/{edge_id}:session":{"post":{"summary":"Edge Session","operationId":"edge_session_api_v1_cohorts__cohort_id__edges__edge_id__session_post","parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}},{"name":"edge_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Edge Id"}},{"name":"X-Account-ID","in":"header","required":true,"schema":{"type":"string","title":"X-Account-Id"}},{"name":"X-Node-ID","in":"header","required":true,"schema":{"type":"string","title":"X-Node-Id"}},{"name":"X-Node-Timestamp","in":"header","required":true,"schema":{"type":"integer","title":"X-Node-Timestamp"}},{"name":"X-Node-Signature","in":"header","required":true,"schema":{"type":"string","title":"X-Node-Signature"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgeAttemptRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cohorts/{cohort_id}/edges/{edge_id}:consume":{"post":{"summary":"Consume Edge","operationId":"consume_edge_api_v1_cohorts__cohort_id__edges__edge_id__consume_post","parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Cohort Id"}},{"name":"edge_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Edge Id"}},{"name":"X-Account-ID","in":"header","required":true,"schema":{"type":"string","title":"X-Account-Id"}},{"name":"X-Node-ID","in":"header","required":true,"schema":{"type":"string","title":"X-Node-Id"}},{"name":"X-Node-Timestamp","in":"header","required":true,"schema":{"type":"integer","title":"X-Node-Timestamp"}},{"name":"X-Node-Signature","in":"header","required":true,"schema":{"type":"string","title":"X-Node-Signature"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgeConsumeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/{task_id}/cohort":{"get":{"summary":"Summary","operationId":"summary_api_v1_tasks__task_id__cohort_get","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}},{"name":"X-Account-ID","in":"header","required":true,"schema":{"type":"string","title":"X-Account-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/{task_id}/cohort/events":{"get":{"summary":"Events","operationId":"events_api_v1_tasks__task_id__cohort_events_get","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Cursor"}},{"name":"X-Account-ID","in":"header","required":true,"schema":{"type":"string","title":"X-Account-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/{task_id}/cohort/explanation":{"get":{"summary":"Explanation","operationId":"explanation_api_v1_tasks__task_id__cohort_explanation_get","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}},{"name":"X-Account-ID","in":"header","required":true,"schema":{"type":"string","title":"X-Account-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/{task_id}/cohort:cancel":{"post":{"summary":"Cancel","operationId":"cancel_api_v1_tasks__task_id__cohort_cancel_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Task Id"}},{"name":"X-Account-ID","in":"header","required":true,"schema":{"type":"string","title":"X-Account-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/memory/node-copies/poll":{"post":{"tags":["internal-node-copy-erasure"],"summary":"Poll","operationId":"poll_api_v1_memory_node_copies_poll_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodeRecordPollResult"}}}}}}},"/api/v1/memory/node-copies/ack":{"post":{"tags":["internal-node-copy-erasure"],"summary":"Ack","operationId":"ack_api_v1_memory_node_copies_ack_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodeCopyAckResult"}}}}}}},"/api/v1/jobs/estimate":{"post":{"tags":["jobs"],"summary":"Estimate Job Cost","description":"Estimate the cost and duration for a job before submission.\n\n**TODO:** Implement actual cost calculation based on:\n- Agent complexity\n- Task type (inference vs training)\n- Resource requirements (GPU type, VRAM, compute time)\n- Current market pricing","operationId":"estimate_job_cost_api_v1_jobs_estimate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobEstimateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobEstimateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/submit":{"post":{"tags":["jobs"],"summary":"Submit Job","description":"Submit a job for execution.\n\n**TODO:** Implement actual job submission:\n- Validate user has sufficient HiveCredits\n- Select appropriate node(s) from pool\n- Queue job in orchestrator\n- Create job record in database\n- Return job ID for tracking","operationId":"submit_job_api_v1_jobs_submit_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobSubmitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobSubmitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/nodes/{node_id}/fabric/bootstrap":{"post":{"tags":["nodes"],"summary":"Bootstrap Fabric Identity","description":"Issue/renew one node-bound mTLS certificate after Ed25519 proof.","operationId":"bootstrap_fabric_identity_api_v1_nodes__node_id__fabric_bootstrap_post","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Node Id"}},{"name":"X-Node-Timestamp","in":"header","required":true,"schema":{"type":"integer","title":"X-Node-Timestamp"}},{"name":"X-Node-Signature","in":"header","required":true,"schema":{"type":"string","title":"X-Node-Signature"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FabricBootstrapRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FabricBootstrapResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/nodes/enrollment-tokens":{"post":{"tags":["nodes"],"summary":"Generate Enrollment Token","description":"Generate one-time enrollment token for adding new hardware\n\nSecurity: Requires authenticated user with isGpuOwner capability,\nor the ops key (X-API-Key) for programmatic provisioning (hive-burst).\n\nResponse includes:\n- token: One-time use token (shown ONLY once)\n- command_suggested: Ready-to-copy installation command","operationId":"generate_enrollment_token_api_v1_nodes_enrollment_tokens_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateTokenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/nodes/{node_id}/cordon":{"post":{"tags":["nodes"],"summary":"Cordon Node","description":"Marca el nodo 'maintenance' (pegajoso: el heartbeat no lo pisa).\nCorta placement nuevo de warm/dispatch; revertir con /uncordon.","operationId":"cordon_node_api_v1_nodes__node_id__cordon_post","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/nodes/{node_id}/uncordon":{"post":{"tags":["nodes"],"summary":"Uncordon Node","description":"Saca el nodo de 'maintenance': queda 'offline' y el próximo heartbeat\nlo promueve a 'online'.","operationId":"uncordon_node_api_v1_nodes__node_id__uncordon_post","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/nodes/{node_id}/decommission":{"post":{"tags":["nodes"],"summary":"Decommission Node","description":"Baja definitiva de un nodo.\n\nDeja la fila de `nodes` como tombstone status='decommissioned' (borrarla es\nimposible: task_executions.node_id es FK NO ACTION y la historia se preserva)\ny limpia telemetría/inventario. Reasigna inferencias in-flight vía failover.\n409 si hay trainings activos y no se pasa force=true.","operationId":"decommission_node_api_v1_nodes__node_id__decommission_post","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}},{"name":"force","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Force"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/nodes/split-tokens":{"post":{"tags":["nodes"],"summary":"Split Tokens","description":"GPU-as-node: un nodo EXISTENTE pide N enrollment tokens para dividirse en una\ninstancia por GPU (+ CPU). Autenticado por FIRMA ed25519 de la propia key del nodo\n(la pública está en nodes.public_key) → no requiere user/api_key, lo dispara el\npropio nodo desde el instalador. Anti-replay por timestamp ±300s.","operationId":"split_tokens_api_v1_nodes_split_tokens_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SplitTokensRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/nodes":{"get":{"tags":["nodes"],"summary":"List Nodes","description":"List nodes\n\nSecurity: Optional authentication\n- If authenticated (X-User-ID header): Returns nodes for user's account\n- If not authenticated: Returns all active nodes in the network (public discovery)\n\nQuery params:\n- status: filter by status (online, offline, etc.)\n\nNote: Accepts both /nodes and /nodes/ to avoid redirect loops with nginx","operationId":"list_nodes_api_v1_nodes_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodesListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/nodes/heartbeat":{"post":{"tags":["nodes"],"summary":"Node Heartbeat","description":"Receive EXTENDED heartbeat from node runtime (bidirectional sync)\n\nProcesses:\n- Updates last_heartbeat timestamp\n- Updates the live residency in Redis (loaded models)\n- Returns desired_state (future: models to load/unload)\n\nSecurity: the route dependency validates the enrolled node's Ed25519 key\nand rejects replay before any state mutation or secret-bearing response.","operationId":"node_heartbeat_api_v1_nodes_heartbeat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/orchestrator__nodes_api__HeartbeatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/orchestrator__nodes_api__HeartbeatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/nodes/{node_id}/tasks/lease":{"post":{"tags":["nodes"],"summary":"Lease Tasks","description":"Lease tasks for execution by node (polling fallback).\n\nPrimary dispatch is via WebSocket (task_auto_dispatcher).\nThis endpoint exists as a fallback for nodes without WS connectivity.","operationId":"lease_tasks_api_v1_nodes__node_id__tasks_lease_post","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskLeaseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskLeaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/nodes/{node_id}/models/{model_id}/readiness-probe":{"post":{"tags":["nodes"],"summary":"Queue Model Readiness Probe","description":"Queue an exact vendor/TP functional warmup on a selected live node.\n\nBackend and image are derived from the active catalogs. The caller chooses\nthe physical node and desired shape, but cannot inject an arbitrary runtime.","operationId":"queue_model_readiness_probe_api_v1_nodes__node_id__models__model_id__readiness_probe_post","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}},{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadinessProbeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/nodes/{node_id}/update-status":{"post":{"tags":["nodes"],"summary":"Update Node Update Status","description":"Receive update status from node\n\nCalled by node during update process to report progress","operationId":"update_node_update_status_api_v1_nodes__node_id__update_status_post","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["nodes"],"summary":"Get Node Update Status","description":"Get current update status for a node","operationId":"get_node_update_status_api_v1_nodes__node_id__update_status_get","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/nodes/{node_id}/force-update":{"post":{"tags":["nodes"],"summary":"Force Node Update","description":"Force update for a specific node (admin only)\n\nArgs:\n    node_id: Node to update\n    version: Target version (default: latest)","operationId":"force_node_update_api_v1_nodes__node_id__force_update_post","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}},{"name":"version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/nodes/{node_id}/pause-updates":{"post":{"tags":["nodes"],"summary":"Pause Node Updates","description":"Pause auto-updates for a node","operationId":"pause_node_updates_api_v1_nodes__node_id__pause_updates_post","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}},{"name":"duration_hours","in":"query","required":false,"schema":{"type":"integer","default":24,"title":"Duration Hours"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/nodes/{node_id}/resume-updates":{"post":{"tags":["nodes"],"summary":"Resume Node Updates","description":"Resume auto-updates for a node","operationId":"resume_node_updates_api_v1_nodes__node_id__resume_updates_post","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/nodes/{node_id}/cleanup-venv":{"post":{"tags":["nodes"],"summary":"Queue Cleanup Venv","description":"Queue a venv cleanup command for a node (remediate corrupt pip packages)","operationId":"queue_cleanup_venv_api_v1_nodes__node_id__cleanup_venv_post","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/nodes/updates/stats":{"get":{"tags":["nodes"],"summary":"Get Updates Stats","description":"Get update statistics (dashboard)","operationId":"get_updates_stats_api_v1_nodes_updates_stats_get","parameters":[{"name":"version","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/nodes/updates/versions":{"get":{"tags":["nodes"],"summary":"Get Available Versions","description":"Get available versions","operationId":"get_available_versions_api_v1_nodes_updates_versions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/nodes/performance/metrics":{"post":{"tags":["nodes"],"summary":"Report Performance Metrics","description":"Record inference performance metrics from nodes\n\nUsed by NodeSelector for intelligent node selection based on historical performance","operationId":"report_performance_metrics_api_v1_nodes_performance_metrics_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerformanceMetricsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/nodes/admin/cleanup-images":{"post":{"tags":["nodes"],"summary":"Cleanup Images Batch","description":"Envía comando de limpieza de imágenes Docker a nodos\n\n- Si node_ids es None: envía a TODOS los nodos activos\n- Si node_ids tiene valores: envía solo a esos nodos","operationId":"cleanup_images_batch_api_v1_nodes_admin_cleanup_images_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CleanupImagesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/nodes/diagnostics/containers":{"get":{"tags":["nodes"],"summary":"Get All Container Diagnostics","description":"Get container diagnostics from all nodes.\n\nReturns container logs and status for debugging inference issues.","operationId":"get_all_container_diagnostics_api_v1_nodes_diagnostics_containers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/nodes/{node_id}/diagnostics/containers":{"get":{"tags":["nodes"],"summary":"Get Node Container Diagnostics","description":"Get container diagnostics for a specific node.\n\nReturns container logs and status for debugging inference issues.","operationId":"get_node_container_diagnostics_api_v1_nodes__node_id__diagnostics_containers_get","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/{task_id}/result":{"post":{"tags":["tasks"],"summary":"Submit Task Result","description":"Submit task execution result\n\nCalled by node when task completes (success or failure)\n\nIdempotency: Multiple submissions with same result are safe\nSecurity: TODO - Validate node owns this task","operationId":"submit_task_result_api_v1_tasks__task_id__result_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResultRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/{task_id}/progress":{"post":{"tags":["tasks"],"summary":"Update Task Progress","description":"Update task execution progress\n\nCalled by node during task execution to report progress\n\nOptional but recommended for long-running tasks\nSecurity: TODO - Validate node owns this task","operationId":"update_task_progress_api_v1_tasks__task_id__progress_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskProgressRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskProgressResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/{task_id}/renew_lease":{"post":{"tags":["tasks"],"summary":"Renew Task Lease","description":"Renew task lease\n\nCalled by node to extend lease when task is still running.\nPrevents orchestrator from re-queueing long-running tasks.\n\nArgs:\n    task_id: Task execution ID\n    request: Lease renewal request with node_id and optional TTL\n\nReturns:\n    New lease expiration time\n\nSecurity: Validates node owns the task","operationId":"renew_task_lease_api_v1_tasks__task_id__renew_lease_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaseRenewalRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaseRenewalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent/enroll":{"post":{"tags":["agent"],"summary":"Enroll Node","description":"Enroll new node with hardware detected by agent\n\nSecurity: Requires valid enrollment token (one-time use)\n\nRequest includes:\n- enrollment_token: One-time token from Console\n- node_meta: hostname, os, kernel, agent_version\n- Hardware specs: CPU, RAM, Disk, GPUs (0..N)\n\nResponse includes:\n- node_id: Assigned node UUID\n- allocation: Default resource allocation\n- config: Runtime configuration (heartbeat interval, etc.)","operationId":"enroll_node_api_v1_agent_enroll_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agent/heartbeat":{"post":{"tags":["agent"],"summary":"Heartbeat","description":"[DEPRECATED] Update node status and metrics (called every 30s by agent)\n\n**⚠️ DEPRECATED:** Use `/api/v1/nodes/heartbeat` instead.\nThis endpoint is maintained for backward compatibility only.\n\nSecurity: TODO - Validate node credentials (mTLS or bearer token)","operationId":"heartbeat_api_v1_agent_heartbeat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/orchestrator__agent_api__HeartbeatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/orchestrator__agent_api__HeartbeatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"deprecated":true}},"/api/v1/events/stream":{"get":{"tags":["events"],"summary":"Stream Events","description":"Stream real job and credit changes for the authenticated active account.","operationId":"stream_events_api_v1_events_stream_get","parameters":[{"name":"accountId","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Active account to stream","title":"Accountid"},"description":"Active account to stream"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/p2p/models/{model_id}/peers":{"get":{"tags":["p2p"],"summary":"Get Model Peers","description":"Get list of peers that have a model cached.\n\nReturns nodes ordered by:\n1. Same region (if requester location known)\n2. Bandwidth score\n3. Last verified (freshness)\n\nArgs:\n    model_id: Model identifier (e.g., 'google/gemma-2-9b-it')\n    requester_node_id: Exclude this node from results\n    limit: Maximum number of peers to return","operationId":"get_model_peers_api_v1_p2p_models__model_id__peers_get","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}},{"name":"requester_node_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Node requesting the peers (to exclude self)","title":"Requester Node Id"},"description":"Node requesting the peers (to exclude self)"},{"name":"revision","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact repository revision required from peers","title":"Revision"},"description":"Exact repository revision required from peers"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Max peers to return","default":10,"title":"Limit"},"description":"Max peers to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelPeersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/p2p/announce-model":{"post":{"tags":["p2p"],"summary":"Announce Model","description":"Announce that a model is available on this node for P2P sharing.\n\nCalled by nodes after successfully downloading/caching a model.\nThis updates the node_model_cache table.","operationId":"announce_model_api_v1_p2p_announce_model_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnounceModelRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/p2p/stats":{"get":{"tags":["p2p"],"summary":"Get P2P Stats","description":"Get P2P network statistics.\n\nReturns aggregate stats about model distribution across nodes.","operationId":"get_p2p_stats_api_v1_p2p_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/health/nodes/{node_id}":{"get":{"tags":["health"],"summary":"Get Node Health","description":"Get detailed health report for a node\n\nReturns:\n- overall_status: Health status (healthy/degraded/warning/critical)\n- overall_score: Health score (0-100)\n- checks: List of individual check results\n  - basic: Heartbeat check\n  - resource: CPU/GPU/Memory/Disk\n  - functional: Can execute tasks\n  - performance: Latency/throughput\n\nExample:\n    GET /api/v1/health/nodes/abc123\n\n    Response:\n    {\n      \"node_id\": \"abc123\",\n      \"overall_status\": \"healthy\",\n      \"overall_score\": 95,\n      \"checks\": [\n        {\n          \"check_type\": \"basic\",\n          \"status\": \"healthy\",\n          \"score\": 100,\n          \"details\": {\n            \"last_heartbeat\": \"2026-01-06T10:00:00\",\n            \"heartbeat_age_seconds\": 5\n          }\n        },\n        ...\n      ],\n      \"generated_at\": \"2026-01-06T10:00:00\"\n    }","operationId":"get_node_health_api_v1_health_nodes__node_id__get","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/health/nodes/{node_id}/check":{"post":{"tags":["health"],"summary":"Force Health Check","description":"Force immediate health check for a node\n\nIgnores cache and performs fresh checks.\n\nArgs:\n    node_id: Node identifier\n\nReturns:\n    Fresh health report","operationId":"force_health_check_api_v1_health_nodes__node_id__check_post","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/health/cluster":{"get":{"tags":["health"],"summary":"Get Cluster Health","description":"Get cluster-wide health summary\n\nReturns:\n- total_nodes: Total number of nodes\n- healthy_nodes: Nodes with healthy status\n- degraded_nodes: Nodes with degraded status\n- warning_nodes: Nodes with warning status\n- critical_nodes: Nodes with critical status\n- average_health_score: Average health score across all nodes\n\nExample:\n    GET /api/v1/health/cluster\n\n    Response:\n    {\n      \"total_nodes\": 10,\n      \"healthy_nodes\": 8,\n      \"degraded_nodes\": 1,\n      \"warning_nodes\": 1,\n      \"critical_nodes\": 0,\n      \"average_health_score\": 92\n    }","operationId":"get_cluster_health_api_v1_health_cluster_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/health/failover/stats":{"get":{"tags":["health"],"summary":"Get Failover Stats","description":"Get failover statistics\n\nReturns:\n- total_failovers: Total number of failover events\n- by_reason: Failover count by reason\n  - heartbeat_timeout: Node stopped sending heartbeats\n  - task_timeout: Task hung/timed out\n  - circuit_breaker: Circuit breaker opened\n- tasks_in_history: Number of tasks with failover history\n- failovers_in_progress: Number of active failover operations\n\nExample:\n    GET /api/v1/health/failover/stats\n\n    Response:\n    {\n      \"total_failovers\": 5,\n      \"by_reason\": {\n        \"heartbeat_timeout\": 3,\n        \"task_timeout\": 1,\n        \"circuit_breaker\": 1\n      },\n      \"tasks_in_history\": 5,\n      \"failovers_in_progress\": 0\n    }","operationId":"get_failover_stats_api_v1_health_failover_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/health/failover/trigger/{node_id}":{"post":{"tags":["health"],"summary":"Trigger Failover","description":"Manually trigger failover for a node\n\nAdmin/operator endpoint to force failover.\nUseful for maintenance or testing.\n\nArgs:\n    node_id: Node to fail over\n    reason: Reason for manual failover (for logging)\n    x_admin_key: Admin API key (required)\n\nReturns:\n    Number of tasks re-assigned\n\nExample:\n    POST /api/v1/health/failover/trigger/abc123\n    Headers:\n      X-Admin-Key: your-admin-key\n    Body:\n      { \"reason\": \"scheduled_maintenance\" }\n\n    Response:\n    {\n      \"node_id\": \"abc123\",\n      \"tasks_reassigned\": 3,\n      \"reason\": \"scheduled_maintenance\"\n    }","operationId":"trigger_failover_api_v1_health_failover_trigger__node_id__post","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}},{"name":"reason","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"manual","title":"Reason"}},{"name":"X-Admin-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/health/circuit-breaker/{node_id}":{"get":{"tags":["health"],"summary":"Get Circuit Breaker Status","description":"Get circuit breaker status for a node\n\nReturns:\n- state: Current state (closed/half_open/open)\n- error_rate: Current error rate (0-1)\n- recent_requests: Number of requests in window\n- total_requests: Total requests (all time)\n- total_errors: Total errors (all time)\n- transitions: Number of state transitions\n- opened_at: When circuit was opened (if open)\n\nExample:\n    GET /api/v1/health/circuit-breaker/abc123\n\n    Response:\n    {\n      \"state\": \"closed\",\n      \"error_rate\": 0.02,\n      \"recent_requests\": 100,\n      \"total_requests\": 1000,\n      \"total_errors\": 20,\n      \"transitions\": 0,\n      \"opened_at\": null\n    }","operationId":"get_circuit_breaker_status_api_v1_health_circuit_breaker__node_id__get","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/health/circuit-breaker/{node_id}/reset":{"post":{"tags":["health"],"summary":"Reset Circuit Breaker","description":"Manually reset circuit breaker for a node\n\nAdmin/operator endpoint to force circuit close.\nUseful after manual node recovery.\n\nArgs:\n    node_id: Node to reset\n    x_admin_key: Admin API key (required)\n\nReturns:\n    Success message\n\nExample:\n    POST /api/v1/health/circuit-breaker/abc123/reset\n    Headers:\n      X-Admin-Key: your-admin-key\n\n    Response:\n    {\n      \"node_id\": \"abc123\",\n      \"message\": \"Circuit breaker reset to closed state\"\n    }","operationId":"reset_circuit_breaker_api_v1_health_circuit_breaker__node_id__reset_post","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}},{"name":"X-Admin-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/warmprofiles/nodes/{node_id}":{"get":{"tags":["warm-profiles"],"summary":"Get Warm Profile","description":"Get warm profile for a node\n\nReturns:\n- node_id: Node identifier\n- models: List of models in warm profile\n- total_vram_mb / used_vram_mb / vram_utilization","operationId":"get_warm_profile_api_v1_warmprofiles_nodes__node_id__get","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/warmprofiles/cluster/stats":{"get":{"tags":["warm-profiles"],"summary":"Get Cluster Stats","description":"Cluster-wide warm profile statistics.","operationId":"get_cluster_stats_api_v1_warmprofiles_cluster_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/webhooks/github/node-runtime":{"post":{"tags":["webhooks"],"summary":"Github Webhook Node Runtime","description":"GitHub webhook for node-runtime repository\n\nTriggers artifact sync when:\n- Push to main branch (packages/node-runtime/)\n- New release created\n\nSetup in GitHub:\n1. Go to repo Settings → Webhooks → Add webhook\n2. Payload URL: https://api.colabhive.com/api/v1/webhooks/github/node-runtime\n3. Content type: application/json\n4. Secret: (set GITHUB_WEBHOOK_SECRET env var)\n5. Events: Push, Releases","operationId":"github_webhook_node_runtime_webhooks_github_node_runtime_post","parameters":[{"name":"X-Hub-Signature-256","in":"header","required":false,"schema":{"type":"string","title":"X-Hub-Signature-256"}},{"name":"X-GitHub-Event","in":"header","required":false,"schema":{"type":"string","title":"X-Github-Event"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/manual/sync-artifacts":{"post":{"tags":["webhooks"],"summary":"Manual Sync Artifacts","description":"Manually trigger artifact sync (no auth for now - add auth in production)\n\nQuery params:\n    version: Optional version to build (default: read from pyproject.toml)\n\nExample:\n    POST /api/v1/webhooks/manual/sync-artifacts?version=0.1.0","operationId":"manual_sync_artifacts_webhooks_manual_sync_artifacts_post","parameters":[{"name":"version","in":"query","required":false,"schema":{"type":"string","title":"Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/status":{"get":{"tags":["webhooks"],"summary":"Webhook Status","description":"Health check for webhook service","operationId":"webhook_status_webhooks_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/training/tasks":{"post":{"tags":["training"],"summary":"Create Training Task","description":"Create training task execution\n\nCalled by training-scheduler after node selection.\nCreates task_execution and notifies node via WebSocket.","operationId":"create_training_task_training_tasks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingTaskCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingTaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/training/tasks/{task_id}":{"get":{"tags":["training"],"summary":"Get Training Task","description":"Get training task status","operationId":"get_training_task_training_tasks__task_id__get","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/training/tasks/{task_id}/claim":{"post":{"tags":["training"],"summary":"Claim Training Task","description":"Claim a training task for execution (idempotent)\n\nCalled by node-runtime after receiving WebSocket notification.\nUpdates task_execution status from 'ready' to 'claimed'.","operationId":"claim_training_task_training_tasks__task_id__claim_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingTaskClaimRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainingTaskClaimResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/training/tasks/{task_id}/logs":{"post":{"tags":["training"],"summary":"Append Training Logs","description":"Append training logs (streaming from node)","operationId":"append_training_logs_training_tasks__task_id__logs_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"X-Node-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Node-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{}},"title":"Logs"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["training"],"summary":"Get Training Logs","description":"Get training logs (with tail limit)","operationId":"get_training_logs_training_tasks__task_id__logs_get","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"tail","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Tail"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/training/tasks/{task_id}/progress":{"post":{"tags":["training"],"summary":"Update Training Progress","description":"Update training task progress from node (consistent with /api/v1/tasks/{id}/progress)\n\nCalled periodically by node during training execution","operationId":"update_training_progress_training_tasks__task_id__progress_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"X-Node-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Node-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Progress"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/training/tasks/{task_id}/result":{"post":{"tags":["training"],"summary":"Submit Training Result","description":"Submit training task result from node (consistent with /api/v1/tasks/{id}/result)\n\nCalled by node when training completes (success or failure)","operationId":"submit_training_result_training_tasks__task_id__result_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"X-Node-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Node-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Result"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/training/tasks/{task_id}/cancel":{"post":{"tags":["training"],"summary":"Cancel Training Task","description":"Cancel training task","operationId":"cancel_training_task_training_tasks__task_id__cancel_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/training/node-vram/{node_id}":{"get":{"tags":["training"],"summary":"Get Node Training Vram","description":"Get real VRAM availability for a node (training-aware).\n\nReturns total, training-allocated, inference-loaded,\nand real available VRAM.","operationId":"get_node_training_vram_training_node_vram__node_id__get","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/inference/tasks/{task_id}/claim":{"post":{"tags":["inference"],"summary":"Claim Inference Task","description":"Claim an inference task (called by node after receiving WebSocket notification)\n\nFlow:\n1. Node receives WS notification with task_id\n2. Node calls this endpoint to claim the task\n3. Task status changes: ready → running\n4. Node executes task using _execute_inference_task()\n5. Node reports result via /tasks/{task_id}/complete\n\nArgs:\n    task_id: UUID of the task execution\n    request: Contains node_id claiming the task\n\nReturns:\n    Task details for execution","operationId":"claim_inference_task_inference_tasks__task_id__claim_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceTaskClaimRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InferenceTaskClaimResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/inference/tasks/{task_id}/complete":{"post":{"tags":["inference"],"summary":"Complete Inference Task","description":"Mark inference task as completed and store results\n\nCalled by node after successful inference execution\n\nArgs:\n    task_id: UUID of the task execution\n    result_data: Contains output, metrics, status, etc.","operationId":"complete_inference_task_inference_tasks__task_id__complete_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Result Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/inference/tasks/{task_id}/fail":{"post":{"tags":["inference"],"summary":"Fail Inference Task","description":"Mark inference task as failed\n\nCalled by node when inference execution fails\n\nArgs:\n    task_id: UUID of the task execution\n    error_data: Contains error message and details","operationId":"fail_inference_task_inference_tasks__task_id__fail_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Error Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/inference/tasks/{task_id}/status":{"post":{"tags":["inference"],"summary":"Update Task Status","description":"Receive status update from Node during inference execution.\n\nThis endpoint allows Nodes to report granular progress:\n- downloading_model (with bytes/speed/ETA)\n- loading_model (with phase info)\n- running (with progress %)\n- etc.\n\nStatus is stored in task_executions.metadata.status_detail for:\n- Frontend SSE streaming\n- Debugging and observability\n- Audit trail\n\nNOTE: This does NOT change task_executions.status (operational state).\nOnly /claim, /complete, /fail endpoints change the operational status.\n\nArgs:\n    task_id: UUID of the task execution\n    status_update: Granular status update from node","operationId":"update_task_status_inference_tasks__task_id__status_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskStatusUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["inference"],"summary":"Get Task Status","description":"Get current status of an inference task.\n\nReturns both operational status and detailed UX status.\n\nThere is no status stream; clients poll the Builder's\nGET /api/builder/v1/tasks/{task_id}.","operationId":"get_task_status_inference_tasks__task_id__status_get","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/orchestrator__inference_tasks_api__TaskStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/inference/batch/status":{"post":{"tags":["inference"],"summary":"Batch Update Status","description":"Batch status updates from a node.\n\nAllows node to report status for multiple tasks in a single request,\nreducing HTTP overhead for high-throughput scenarios.\n\nArgs:\n    request: Contains list of status updates\n\nReturns:\n    Number of successfully processed updates","operationId":"batch_update_status_inference_batch_status_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchStatusRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/inference/batch/complete":{"post":{"tags":["inference"],"summary":"Batch Complete Tasks","description":"Batch completion of inference tasks.\n\nAllows node to report results for multiple tasks in a single request,\nreducing HTTP overhead for high-throughput scenarios.\n\nEach result can be either 'succeeded' or 'failed'.\n\nArgs:\n    request: Contains list of task results\n\nReturns:\n    Number of successfully processed results","operationId":"batch_complete_tasks_inference_batch_complete_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResultRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/performance/compare":{"get":{"tags":["performance"],"summary":"Compare Gpu Vendors","description":"Compare GPU vendor performance for a model.\n\nReturns avg, p50, p95 for each phase, grouped by gpu_vendor/gpu_model.\nUse model_id to compare specific model across vendors.","operationId":"compare_gpu_vendors_api_v1_performance_compare_get","parameters":[{"name":"model_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by model_id","title":"Model Id"},"description":"Filter by model_id"},{"name":"task_type","in":"query","required":false,"schema":{"type":"string","description":"inference or training","default":"inference","title":"Task Type"},"description":"inference or training"},{"name":"days","in":"query","required":false,"schema":{"type":"integer","description":"Look back N days","default":7,"title":"Days"},"description":"Look back N days"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/performance/vendor-report":{"get":{"tags":["performance"],"summary":"Vendor Report","description":"Full performance report for a GPU vendor.\n\nReturns all models tested on that vendor with per-phase breakdowns.\nIdeal for generating Intel feedback reports.","operationId":"vendor_report_api_v1_performance_vendor_report_get","parameters":[{"name":"gpu_vendor","in":"query","required":true,"schema":{"type":"string","description":"GPU vendor: nvidia, amd, intel, cpu","title":"Gpu Vendor"},"description":"GPU vendor: nvidia, amd, intel, cpu"},{"name":"task_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by task_type","title":"Task Type"},"description":"Filter by task_type"},{"name":"days","in":"query","required":false,"schema":{"type":"integer","description":"Look back N days","default":30,"title":"Days"},"description":"Look back N days"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/performance/summary":{"get":{"tags":["performance"],"summary":"Performance Summary","description":"Overview of all GPU vendors with sample counts and models tested.","operationId":"performance_summary_api_v1_performance_summary_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","description":"Look back N days","default":7,"title":"Days"},"description":"Look back N days"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/performance/export":{"get":{"tags":["performance"],"summary":"Export Performance Data","description":"Export phase timings as CSV for external reporting (e.g., Intel feedback).","operationId":"export_performance_data_api_v1_performance_export_get","parameters":[{"name":"gpu_vendor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by GPU vendor","title":"Gpu Vendor"},"description":"Filter by GPU vendor"},{"name":"task_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by task type","title":"Task Type"},"description":"Filter by task type"},{"name":"model_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by model_id","title":"Model Id"},"description":"Filter by model_id"},{"name":"days","in":"query","required":false,"schema":{"type":"integer","description":"Look back N days","default":30,"title":"Days"},"description":"Look back N days"},{"name":"format","in":"query","required":false,"schema":{"type":"string","description":"Export format: csv","default":"csv","title":"Format"},"description":"Export format: csv"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/performance/node/{node_id}":{"get":{"tags":["performance"],"summary":"Node Performance","description":"Performance stats for a specific node.\n\nReturns summary, per-model breakdown, and recent executions.\nUsed by the frontend node detail page.","operationId":"node_performance_api_v1_performance_node__node_id__get","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","description":"Look back N days","default":30,"title":"Days"},"description":"Look back N days"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/performance/fleet-overview":{"get":{"tags":["performance"],"summary":"Fleet Overview","description":"Full fleet overview for the GPU Performance Dashboard.\n\nReturns everything the dashboard needs in a single request:\noverview counters, per-vendor stats, per-model breakdown, recent activity.","operationId":"fleet_overview_api_v1_performance_fleet_overview_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","description":"Look back N days","default":30,"title":"Days"},"description":"Look back N days"},{"name":"task_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter: inference, training, or all","title":"Task Type"},"description":"Filter: inference, training, or all"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/hf/search":{"post":{"tags":["huggingface-internal"],"summary":"Search Models","description":"Search HuggingFace models with filters.\n\nCalled by Builder Gateway: POST /api/builder/v1/models/hf/search","operationId":"search_models_internal_hf_search_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HFSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HFSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/hf/models/{repo_id}/info":{"get":{"tags":["huggingface-internal"],"summary":"Get Model Info","description":"Get detailed information about a HuggingFace model.\n\nCalled by Builder Gateway: GET /api/builder/v1/models/hf/{repo_id}/info\n\nNote: repo_id is URL-encoded (e.g., sentence-transformers%2Fall-MiniLM-L6-v2)","operationId":"get_model_info_internal_hf_models__repo_id__info_get","parameters":[{"name":"repo_id","in":"path","required":true,"schema":{"type":"string","title":"Repo Id"}},{"name":"revision","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":100,"default":"main","title":"Revision"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HFModelInfoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/hf/register":{"post":{"tags":["huggingface-internal"],"summary":"Register Model","description":"Register a HuggingFace model in the Hive.\n\nCalled by Builder Gateway: POST /api/builder/v1/models/hf/register\n\nCreates:\n- model_config entry with HF metadata\n- inference_endpoint entry for API access","operationId":"register_model_internal_hf_register_post","parameters":[{"name":"X-User-ID","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}},{"name":"X-Account-ID","in":"header","required":true,"schema":{"type":"string","title":"X-Account-Id"}},{"name":"X-API-Base-URL","in":"header","required":false,"schema":{"type":"string","default":"https://api.colabhive.com","title":"X-Api-Base-Url"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HFRegisterRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HFRegisterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/hf/registry":{"get":{"tags":["huggingface-internal"],"summary":"List Registry","description":"List registered models in the Hive.\n\nCalled by Builder Gateway: GET /api/builder/v1/models/registry","operationId":"list_registry_internal_hf_registry_get","parameters":[{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by source: hive, huggingface","title":"Source"},"description":"Filter by source: hive, huggingface"},{"name":"lifecycle_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status","title":"Lifecycle Status"},"description":"Filter by status"},{"name":"task_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by task type","title":"Task Type"},"description":"Filter by task type"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"X-Account-ID","in":"header","required":true,"schema":{"type":"string","title":"X-Account-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistryListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/hf/models/{model_config_id}/lifecycle":{"patch":{"tags":["huggingface-internal"],"summary":"Update Lifecycle","description":"Update the lifecycle status of a model.\n\nCalled by Builder Gateway: PATCH /api/builder/v1/models/registry/{model_config_id}/lifecycle","operationId":"update_lifecycle_internal_hf_models__model_config_id__lifecycle_patch","parameters":[{"name":"model_config_id","in":"path","required":true,"schema":{"type":"string","title":"Model Config Id"}},{"name":"X-Account-ID","in":"header","required":true,"schema":{"type":"string","title":"X-Account-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifecycleUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/hf/compatibility-matrix":{"get":{"tags":["huggingface-internal"],"summary":"Get Compatibility Matrix","description":"Get the full compatibility matrix of architectures and backends.\n\nCalled by Builder Gateway: GET /api/builder/v1/models/compatibility-matrix\n\nReturns all supported architectures with their compatible backends,\nordered by architecture family and priority.\n\nThis endpoint is used for:\n- Public documentation generation\n- Docusaurus components\n- Model selection UI","operationId":"get_compatibility_matrix_internal_hf_compatibility_matrix_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompatibilityMatrixResponse"}}}}}}},"/internal/hf/backends":{"get":{"tags":["huggingface-internal"],"summary":"List Backends","description":"List all available inference backends.\n\nReturns backends with their capabilities and supported architecture counts.","operationId":"list_backends_internal_hf_backends_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response List Backends Internal Hf Backends Get"}}}}}}},"/internal/hf/architectures":{"get":{"tags":["huggingface-internal"],"summary":"List Architectures","description":"List all supported architectures.\n\nCan be filtered by family (llama, qwen, etc.) or by supported backend.","operationId":"list_architectures_internal_hf_architectures_get","parameters":[{"name":"family","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by architecture family","title":"Family"},"description":"Filter by architecture family"},{"name":"backend_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by supported backend","title":"Backend Id"},"description":"Filter by supported backend"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Architectures Internal Hf Architectures Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/inference/credentials/huggingface":{"put":{"tags":["inference-credentials"],"summary":"Put Hf Credential","operationId":"put_hf_credential_api_v1_inference_credentials_huggingface_put","parameters":[{"name":"X-Account-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Account-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HFCredentialPut"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["inference-credentials"],"summary":"Get Hf Credential Status","operationId":"get_hf_credential_status_api_v1_inference_credentials_huggingface_get","parameters":[{"name":"X-Account-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Account-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["inference-credentials"],"summary":"Delete Hf Credential","operationId":"delete_hf_credential_api_v1_inference_credentials_huggingface_delete","parameters":[{"name":"X-Account-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Account-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/inference/credentials/digitalocean":{"put":{"tags":["inference-credentials"],"summary":"Put Do Credential","operationId":"put_do_credential_api_v1_inference_credentials_digitalocean_put","parameters":[{"name":"X-Account-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Account-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DOCredentialPut"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["inference-credentials"],"summary":"Get Do Credential Status","operationId":"get_do_credential_status_api_v1_inference_credentials_digitalocean_get","parameters":[{"name":"X-Account-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Account-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["inference-credentials"],"summary":"Delete Do Credential","operationId":"delete_do_credential_api_v1_inference_credentials_digitalocean_delete","parameters":[{"name":"X-Account-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Account-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/credentials/digitalocean":{"get":{"tags":["internal-credentials"],"summary":"Configured Do Accounts","operationId":"configured_do_accounts_internal_credentials_digitalocean_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/internal/credentials/digitalocean/{account_id}":{"get":{"tags":["internal-credentials"],"summary":"Resolve Do Credential","operationId":"resolve_do_credential_internal_credentials_digitalocean__account_id__get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/data-protection/effective":{"get":{"tags":["data-protection"],"summary":"Get Effective Policy","operationId":"get_effective_policy_api_v1_data_protection_effective_get","parameters":[{"name":"workload_type","in":"query","required":false,"schema":{"anyOf":[{"enum":["inference_endpoint","training_job"],"type":"string"},{"type":"null"}],"title":"Workload Type"}},{"name":"workload_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workload Id"}},{"name":"task_exec_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Task Exec Id"}},{"name":"X-Account-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Account-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/compliance/placement-attestation":{"get":{"tags":["data-protection"],"summary":"Get Placement Attestation","operationId":"get_placement_attestation_api_v1_compliance_placement_attestation_get","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date-time","title":"From"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date-time","title":"To"}},{"name":"X-Account-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Account-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/accounts/{account_id}/data-protection":{"patch":{"tags":["data-protection"],"summary":"Patch Account Policy","operationId":"patch_account_policy_api_v1_accounts__account_id__data_protection_patch","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Account Id"}},{"name":"X-Account-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Account-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/endpoints/{endpoint_id}/data-protection":{"patch":{"tags":["data-protection"],"summary":"Patch Endpoint Policy","operationId":"patch_endpoint_policy_api_v1_endpoints__endpoint_id__data_protection_patch","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}},{"name":"X-Account-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Account-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/training/jobs/{job_id}/data-protection":{"patch":{"tags":["data-protection"],"summary":"Patch Training Policy","operationId":"patch_training_policy_api_v1_training_jobs__job_id__data_protection_patch","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"X-Account-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Account-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/data-protection/placement-preflight":{"post":{"tags":["data-protection"],"summary":"Placement Preflight","operationId":"placement_preflight_api_v1_data_protection_placement_preflight_post","parameters":[{"name":"X-Account-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Account-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlacementPreflightRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/metrics":{"get":{"summary":"Prometheus Metrics","description":"Prometheus metrics endpoint","operationId":"prometheus_metrics_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/routing/groups":{"post":{"summary":"Route To Groups","description":"Group-aware routing (experimental)\n\nRoutes request to model groups based on taxons.\n\nHeaders:\n  - X-User-ID: User identifier\n  - X-Org-ID: Organization ID (optional, for preferences)\n\nBody:\n  - prompt: User's prompt\n  - taxons: Explicit taxon list (optional, extracted if not provided)\n  - strategy: 'single', 'top-k', 'ensemble', 'router' (default: 'top-k')\n  - k: Number of agents for top-k (default: 1)","operationId":"route_to_groups_api_v1_routing_groups_post","parameters":[{"name":"X-User-ID","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}},{"name":"X-Org-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Root","description":"Health check","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health","description":"Detailed health check","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/inference/batch":{"post":{"summary":"Batch Inference","description":"Submit multiple inference requests in a single batch.\n\nMuch more efficient than individual requests:\n- Single HTTP connection for N requests\n- Reduced overhead\n- Get batch_id to track all tasks at once\n\nBody:\n    - endpoint_id: UUID of inference endpoint\n    - inputs: List of input data objects (max 10000)\n    - account_id: Optional account identifier\n\nReturns:\n    - batch_id: UUID to track this batch\n    - task_ids: List of individual task IDs\n    - total: Number of tasks created","operationId":"batch_inference_api_v1_inference_batch_post","parameters":[{"name":"X-User-ID","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}},{"name":"X-Account-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Account-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchInferenceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchInferenceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Inference Batches","description":"List durable batches for exactly one authenticated account.","operationId":"list_inference_batches_api_v1_inference_batch_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"X-User-ID","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}},{"name":"X-Account-ID","in":"header","required":true,"schema":{"type":"string","title":"X-Account-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/inference/batch/{batch_id}/status":{"get":{"summary":"Get Batch Status","description":"Get status of a batch inference request.\n\nReturns:\n    - status: Overall batch status (pending, processing, completed, partial_failure)\n    - progress: Count of tasks by status\n    - results: Completed/failed task results (if include_results=true)","operationId":"get_batch_status_api_v1_inference_batch__batch_id__status_get","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"include_results","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Results"}},{"name":"X-User-ID","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}},{"name":"X-Account-ID","in":"header","required":true,"schema":{"type":"string","title":"X-Account-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/inference/batch/{batch_id}/cancel":{"post":{"summary":"Cancel Batch Inference","description":"Cancel an account-owned durable batch and fence active tasks.","operationId":"cancel_batch_inference_api_v1_inference_batch__batch_id__cancel_post","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"X-User-ID","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}},{"name":"X-Account-ID","in":"header","required":true,"schema":{"type":"string","title":"X-Account-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/inference/{task_id}/stream":{"post":{"summary":"Ingest Inference Stream","description":"Recibe el SSE del nodo y lo encola para el gateway. Best-effort: si Redis no está,\ndevolvemos ok igual — el nodo NO debe fallar la inferencia por un problema de streaming\n(el resultado agregado se reporta por el camino normal de siempre).","operationId":"ingest_inference_stream_api_v1_inference__task_id__stream_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/inference/custom":{"post":{"summary":"Custom Model Inference","description":"Run inference using a registered endpoint or custom model\n\nON-DEMAND INFERENCE with MODEL CACHING:\n- If model is loaded in node (residency): Immediate inference\n- If model is cached on disk: Load from cache (~2-10s) + inference\n- If model not cached: Download (~30-300s) + load + inference\n\nBody:\n  - endpoint_id: UUID of inference endpoint (from model registration)\n  - model_id: Alternative: Direct model ID (legacy)\n  - model_version_id: Optional specific version\n  - input: Input data for inference\n  - account_id: Account identifier (optional, can come from header)\n\nHeaders:\n  - X-User-ID: User identifier (required)\n  - X-Account-ID: Account identifier (optional)\n\nReturns:\n  - prediction: Model output\n  - inference_time_ms: Time taken for inference\n  - model_state: 'resident', 'cached', or 'cold' (load strategy used)\n  - node_id: Node that served the inference","operationId":"custom_model_inference_api_v1_inference_custom_post","parameters":[{"name":"X-User-ID","in":"header","required":true,"schema":{"type":"string","title":"X-User-Id"}},{"name":"X-Account-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Account-Id"}},{"name":"X-Node-Eligibility","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Node-Eligibility"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomInferenceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/{task_id}":{"get":{"summary":"Get Task Status","description":"Get task status and result from task_executions.\n\nArgs:\n    task_id: Task UUID\n\nReturns:\n    Task status, result (if completed), and metrics","operationId":"get_task_status_api_v1_tasks__task_id__get","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"X-Account-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Account-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/orchestrator__api__TaskStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/rebalance-plan":{"get":{"summary":"Admin Rebalance Plan","description":"Mapa actual, mapa objetivo y plan del Hive Rebalancer (read-only).","operationId":"admin_rebalance_plan_admin_rebalance_plan_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/inference/cluster-state":{"get":{"summary":"Inference Cluster State","description":"Estado del cluster de inferencia (read-only, dashboard/ops).","operationId":"inference_cluster_state_api_v1_inference_cluster_state_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/inference/admin/burst-status":{"get":{"summary":"Inference Burst Status","description":"Bounded read-only Cloud Burst view for account admins and operators.","operationId":"inference_burst_status_api_v1_inference_admin_burst_status_get","parameters":[{"name":"X-Account-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Account-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/inference/admin/burst-controls":{"put":{"summary":"Update Inference Burst Controls","description":"Set only this account's durable Cloud Burst kill switch.","operationId":"update_inference_burst_controls_api_v1_inference_admin_burst_controls_put","parameters":[{"name":"X-Account-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Account-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BurstControlUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/nodes/register":{"post":{"summary":"Register Node","description":"Register a new node in the network\n\nNode provides:\n  - Public key (for PKI)\n  - Hardware capabilities\n  - Network quality\n  - Location\n\nOrchestrator returns:\n  - Node ID\n  - Assigned agents (smart balancing)","operationId":"register_node_api_v1_nodes_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodeRegisterRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodeRegisterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/agents":{"get":{"summary":"List Agents","description":"List all available agents in the registry\n\nReturns agent metadata, capabilities, hardware requirements","operationId":"list_agents_api_v1_agents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/models/readiness":{"get":{"summary":"Get Models Readiness","description":"Returns cluster-wide readiness status for all models.\n\nFor each model known to the cluster, reports:\n- readiness: \"warm\" | \"cached\" | \"cold\"\n- warm_nodes: number of nodes with the model loaded in VRAM\n- cached_nodes: number of nodes with the model on disk\n- estimated_latency_ms: approximate inference latency given current state\n\nReadiness is derived from:\n- node_model_residency (warm/resident models with valid heartbeat)\n- node_model_cache (models downloaded to disk)\n- Models absent from both tables are \"cold\"\n\nResponse is cached centrally in Redis to avoid excessive DB queries.","operationId":"get_models_readiness_api_v1_models_readiness_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/nodes/{node_id}":{"get":{"summary":"Get Node Detail","description":"Get detailed information for a specific node\n\nReturns node configuration, status, capabilities, and earnings summary","operationId":"get_node_detail_api_v1_nodes__node_id__get","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/nodes/{node_id}/earnings":{"get":{"summary":"Get Node Earnings","description":"Get earnings for a specific node\n\nShows HiveCredits earned by executing tasks\n\nQuery params:\n  - period: \"today\", \"7d\", \"30d\", \"all\" (default: 7d)","operationId":"get_node_earnings_api_v1_nodes__node_id__earnings_get","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","default":"7d","title":"Period"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/nodes/{node_id}/stats":{"get":{"summary":"Get Node Stats","description":"Get detailed statistics for a specific node\n\nIncludes:\n- Uptime\n- Total jobs executed\n- Success rate\n- Average response time\n- Reputation score","operationId":"get_node_stats_api_v1_nodes__node_id__stats_get","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/nodes/{node_id}/jobs":{"get":{"summary":"Get Node Jobs","description":"Get job history for a specific node\n\nShows all tasks executed by this node\n\nQuery params:\n  - limit: Max results (default: 50)\n  - offset: Pagination offset (default: 0)\n  - status: Filter by status (optional)","operationId":"get_node_jobs_api_v1_nodes__node_id__jobs_get","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/nodes/{node_id}/hardware":{"get":{"summary":"Get Node Hardware","description":"Get hardware information for a specific node\n\nShows GPUs, CPU, RAM, etc.","operationId":"get_node_hardware_api_v1_nodes__node_id__hardware_get","parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/{job_id}/events":{"get":{"summary":"Get Job Events Stream","description":"Stream job events via Server-Sent Events (SSE)\n\nReal-time updates for job progress\n\nUsage (JavaScript):\n    const eventSource = new EventSource('/api/v1/jobs/JOB_ID/events');\n    eventSource.addEventListener('job.planning.completed', (event) => {\n        const data = JSON.parse(event.data);\n        console.log('Planning done:', data);\n    });","operationId":"get_job_events_stream_api_v1_jobs__job_id__events_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/{job_id}":{"get":{"summary":"Get Job Status","description":"Get job status and result\n\nArgs:\n    job_id: Job UUID\n\nReturns:\n    Job status, result (if completed), and metrics","operationId":"get_job_status_api_v1_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/stats":{"get":{"summary":"Get Stats","description":"Get network statistics\n\nReturns aggregated metrics about the network","operationId":"get_stats_api_v1_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/debug/cost-function":{"get":{"summary":"Debug Cost Function","description":"Debug cost function calculation\n\nShows detailed breakdown of C(n,A;u) for specific node and agent","operationId":"debug_cost_function_api_v1_debug_cost_function_get","parameters":[{"name":"agent_id","in":"query","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"node_id","in":"query","required":true,"schema":{"type":"string","title":"Node Id"}},{"name":"user_lat","in":"query","required":false,"schema":{"type":"number","default":0.0,"title":"User Lat"}},{"name":"user_lon","in":"query","required":false,"schema":{"type":"number","default":0.0,"title":"User Lon"}},{"name":"mode","in":"query","required":false,"schema":{"type":"string","default":"balanced","title":"Mode"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/cluster/status":{"get":{"summary":"Get Cluster Status","description":"Get Raft cluster status\n\nReturns information about the current orchestrator cluster:\n- Leader status\n- Partner count\n- Active tasks\n- Health","operationId":"get_cluster_status_api_v1_cluster_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/cluster/leader":{"get":{"summary":"Get Cluster Leader","description":"Get current Raft leader\n\nReturns the address of the current leader orchestrator","operationId":"get_cluster_leader_api_v1_cluster_leader_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/cluster/nodes":{"get":{"summary":"Get Cluster Nodes","description":"Get all orchestrator nodes in Raft cluster\n\nReturns list of all orchestrator addresses and their status","operationId":"get_cluster_nodes_api_v1_cluster_nodes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/p2p/status":{"get":{"summary":"Get P2P Status","description":"Get P2P network status\n\nReturns information about the P2P network:\n- Peer count\n- Peer list\n- Network health","operationId":"get_p2p_status_api_v1_p2p_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/p2p/peers":{"get":{"summary":"Get P2P Peers","description":"Get P2P peers, optionally filtered by node type\n\nArgs:\n    node_type: Optional filter (orchestrator, worker, gateway)\n\nReturns list of discovered peers","operationId":"get_p2p_peers_api_v1_p2p_peers_get","parameters":[{"name":"node_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Node Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tasks/{task_id}/cancel":{"post":{"summary":"Cancel Inference Task","description":"Withdraw a standalone /v1 task whose caller stopped waiting.\n\nThe builder's /v1 calls it when a non-streamed request reaches the public\nedge's limit without a result (follow-up #25): the task ends ``failed`` with\n``caller_deadline_exceeded``, its hold is refunded and a node that holds it\nis fenced (inference_terminal.withdraw_inference_task). The answer carries\nwhat the caller needs to answer its client: a task that had already\nsucceeded comes back with its result; a failed one with its stamped\n``error_code``; one that never reached a node and waited for a model to\nload with ``retry_after_s``, the rest of that model's measured load\n(caller_deadline.load_retry_after_s). Only the internal network reaches it:\nthe host site sends /api/v1/tasks/ to the training scheduler (edge_perimeter,\ntenant-internal).","operationId":"cancel_inference_task_api_v1_tasks__task_id__cancel_post","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","title":"Task Id"}},{"name":"X-Account-ID","in":"header","required":true,"schema":{"type":"string","title":"X-Account-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AllocationResponse":{"properties":{"cpu_cores_allocatable":{"type":"integer","title":"Cpu Cores Allocatable"},"ram_mb_allocatable":{"type":"integer","title":"Ram Mb Allocatable"},"disk_gb_allocatable_total":{"type":"integer","title":"Disk Gb Allocatable Total"},"gpu_allocations":{"items":{"$ref":"#/components/schemas/GPUAllocation"},"type":"array","title":"Gpu Allocations","default":[]}},"type":"object","required":["cpu_cores_allocatable","ram_mb_allocatable","disk_gb_allocatable_total"],"title":"AllocationResponse","description":"Resource allocation"},"AnnounceModelRequest":{"properties":{"node_id":{"type":"string","title":"Node Id"},"model_name":{"type":"string","title":"Model Name"},"revision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revision"},"size_bytes":{"type":"integer","title":"Size Bytes"},"checksum":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checksum"}},"type":"object","required":["node_id","model_name","size_bytes"],"title":"AnnounceModelRequest","description":"Request to announce a model is available on this node"},"ArchitectureBackendInfo":{"properties":{"backend_id":{"type":"string","title":"Backend Id"},"backend_name":{"type":"string","title":"Backend Name"},"compatibility_level":{"type":"string","title":"Compatibility Level"},"estimated_throughput":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Estimated Throughput"},"priority":{"type":"integer","title":"Priority"},"tested":{"type":"boolean","title":"Tested"}},"type":"object","required":["backend_id","backend_name","compatibility_level","priority","tested"],"title":"ArchitectureBackendInfo","description":"Backend compatibility info for an architecture."},"ArchitectureInfo":{"properties":{"architecture_id":{"type":"string","title":"Architecture Id"},"architecture_name":{"type":"string","title":"Architecture Name"},"architecture_family":{"type":"string","title":"Architecture Family"},"typical_use_case":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Typical Use Case"},"backends":{"items":{"$ref":"#/components/schemas/ArchitectureBackendInfo"},"type":"array","title":"Backends"}},"type":"object","required":["architecture_id","architecture_name","architecture_family","backends"],"title":"ArchitectureInfo","description":"Architecture with its compatible backends."},"BatchInferenceRequest":{"properties":{"endpoint_id":{"type":"string","title":"Endpoint Id","description":"UUID of inference endpoint"},"inputs":{"items":{"additionalProperties":true,"type":"object"},"type":"array","maxItems":10000,"minItems":1,"title":"Inputs","description":"List of input data objects"},"account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"}},"type":"object","required":["endpoint_id","inputs"],"title":"BatchInferenceRequest","description":"Request for batch inference - multiple inputs in one request"},"BatchInferenceResponse":{"properties":{"batch_id":{"type":"string","title":"Batch Id"},"task_ids":{"items":{"type":"string"},"type":"array","title":"Task Ids"},"total":{"type":"integer","title":"Total"},"message":{"type":"string","title":"Message"}},"type":"object","required":["batch_id","task_ids","total","message"],"title":"BatchInferenceResponse","description":"Response for batch inference submission"},"BatchListResponse":{"properties":{"batches":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Batches"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["batches","total","limit","offset"],"title":"BatchListResponse","description":"Durable account-scoped batch page."},"BatchResponse":{"properties":{"processed":{"type":"integer","title":"Processed"},"failed":{"type":"integer","title":"Failed"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors","default":[]}},"type":"object","required":["processed","failed"],"title":"BatchResponse","description":"Response for batch operations"},"BatchResultItem":{"properties":{"task_id":{"type":"string","title":"Task Id"},"status":{"type":"string","title":"Status"},"output":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"lease_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lease Id"},"retryable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Retryable"},"failure_is_final":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Failure Is Final"}},"type":"object","required":["task_id","status"],"title":"BatchResultItem","description":"Single result in a batch"},"BatchResultRequest":{"properties":{"results":{"items":{"$ref":"#/components/schemas/BatchResultItem"},"type":"array","title":"Results"},"node_id":{"type":"string","title":"Node Id"}},"type":"object","required":["results","node_id"],"title":"BatchResultRequest","description":"Batch of results from node"},"BatchStatusItem":{"properties":{"task_id":{"type":"string","title":"Task Id"},"status":{"type":"string","title":"Status"},"substatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Substatus"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","default":{}},"progress_pct":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Progress Pct"}},"type":"object","required":["task_id","status"],"title":"BatchStatusItem","description":"Single status update in a batch"},"BatchStatusRequest":{"properties":{"updates":{"items":{"$ref":"#/components/schemas/BatchStatusItem"},"type":"array","title":"Updates"},"node_id":{"type":"string","title":"Node Id"},"timestamp":{"type":"string","title":"Timestamp"}},"type":"object","required":["updates","node_id","timestamp"],"title":"BatchStatusRequest","description":"Batch of status updates from node"},"BatchStatusResponse":{"properties":{"batch_id":{"type":"string","title":"Batch Id"},"status":{"type":"string","title":"Status"},"progress":{"additionalProperties":{"type":"integer"},"type":"object","title":"Progress"},"results":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Results"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["batch_id","status","progress","created_at"],"title":"BatchStatusResponse","description":"Response for batch status query"},"BurstControlUpdate":{"properties":{"kill_switch":{"type":"boolean","title":"Kill Switch"}},"type":"object","required":["kill_switch"],"title":"BurstControlUpdate"},"CPUSpec":{"properties":{"model":{"type":"string","title":"Model"},"sockets":{"type":"integer","title":"Sockets","default":1},"cores_per_socket":{"type":"integer","title":"Cores Per Socket"},"threads_per_core":{"type":"integer","title":"Threads Per Core","default":2},"total_cores":{"type":"integer","title":"Total Cores"},"total_threads":{"type":"integer","title":"Total Threads"},"architecture":{"type":"string","title":"Architecture","default":"x86_64"},"vendor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor Id"}},"type":"object","required":["model","cores_per_socket","total_cores","total_threads"],"title":"CPUSpec","description":"CPU specifications"},"CleanupImagesRequest":{"properties":{"days":{"type":"integer","title":"Days","default":10},"node_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Node Ids"}},"type":"object","title":"CleanupImagesRequest","description":"Request to cleanup Docker images on nodes"},"CohortExecutionPolicy":{"properties":{"mode":{"type":"string","enum":["single","cohort","auto"],"title":"Mode","default":"cohort"},"fallback":{"type":"string","enum":["single","structured","fail"],"title":"Fallback","default":"single"},"trace":{"type":"string","enum":["none","summary"],"title":"Trace","default":"summary"},"max_members":{"anyOf":[{"type":"integer","maximum":8.0,"minimum":2.0},{"type":"null"}],"title":"Max Members"},"latency_budget_ms":{"anyOf":[{"type":"integer","maximum":300000.0,"minimum":1000.0},{"type":"null"}],"title":"Latency Budget Ms"},"cost_budget_credits":{"anyOf":[{"type":"number","maximum":1000.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Cost Budget Credits"}},"additionalProperties":false,"type":"object","title":"CohortExecutionPolicy"},"CompatibilityEvidenceRegistration":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"evidence_id":{"type":"string","format":"uuid","title":"Evidence Id"},"source_model_digest":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$","title":"Source Model Digest"},"target_model_digest":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$","title":"Target Model Digest"},"source_space_id":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$","title":"Source Space Id"},"target_space_id":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$","title":"Target Space Id"},"translator_digest":{"anyOf":[{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},{"type":"null"}],"title":"Translator Digest"},"evaluator_digest":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$","title":"Evaluator Digest"},"environment_digest":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$","title":"Environment Digest"},"quality_score":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Quality Score"},"evaluated_at":{"type":"string","format":"date-time","title":"Evaluated At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"additionalProperties":false,"type":"object","required":["account_id","evidence_id","source_model_digest","target_model_digest","source_space_id","target_space_id","evaluator_digest","environment_digest","quality_score","evaluated_at","expires_at"],"title":"CompatibilityEvidenceRegistration"},"CompatibilityMatrixResponse":{"properties":{"last_updated":{"type":"string","title":"Last Updated"},"total_architectures":{"type":"integer","title":"Total Architectures"},"total_backends":{"type":"integer","title":"Total Backends"},"architectures":{"items":{"$ref":"#/components/schemas/ArchitectureInfo"},"type":"array","title":"Architectures"},"backends_summary":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Backends Summary"}},"type":"object","required":["last_updated","total_architectures","total_backends","architectures","backends_summary"],"title":"CompatibilityMatrixResponse","description":"Response with full compatibility matrix."},"CustomInferenceRequest":{"properties":{"endpoint_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endpoint Id"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"model_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Version Id"},"input":{"additionalProperties":true,"type":"object","title":"Input"},"account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"},"webhook_source_family":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Source Family"},"webhook_origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Origin"},"sync":{"type":"boolean","title":"Sync","default":false},"sync_timeout_s":{"type":"number","title":"Sync Timeout S","default":30.0},"execution":{"anyOf":[{"$ref":"#/components/schemas/CohortExecutionPolicy"},{"type":"null"}]},"idempotency_key":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Idempotency Key"}},"type":"object","title":"CustomInferenceRequest","description":"Request for custom inference"},"DOCredentialPut":{"properties":{"token":{"type":"string","maxLength":507,"minLength":24,"title":"Token"},"max_hourly_spend_usd":{"type":"number","exclusiveMinimum":0.0,"title":"Max Hourly Spend Usd"},"max_daily_spend_usd":{"type":"number","exclusiveMinimum":0.0,"title":"Max Daily Spend Usd"},"max_monthly_spend_usd":{"type":"number","exclusiveMinimum":0.0,"title":"Max Monthly Spend Usd"}},"type":"object","required":["token","max_hourly_spend_usd","max_daily_spend_usd","max_monthly_spend_usd"],"title":"DOCredentialPut"},"DiskSpec":{"properties":{"mount":{"type":"string","title":"Mount"},"device":{"type":"string","title":"Device"},"total_gb":{"type":"integer","title":"Total Gb"},"free_gb":{"type":"integer","title":"Free Gb"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},"type":"object","required":["mount","device","total_gb","free_gb"],"title":"DiskSpec","description":"Disk specifications"},"EdgeAttemptRequest":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"cohort_revision":{"type":"integer","minimum":1.0,"title":"Cohort Revision"},"producer_lease_id":{"type":"string","format":"uuid","title":"Producer Lease Id"},"consumer_lease_id":{"type":"string","format":"uuid","title":"Consumer Lease Id"}},"additionalProperties":false,"type":"object","required":["account_id","cohort_revision","producer_lease_id","consumer_lease_id"],"title":"EdgeAttemptRequest"},"EdgeConsumeRequest":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"cohort_revision":{"type":"integer","minimum":1.0,"title":"Cohort Revision"},"producer_lease_id":{"type":"string","format":"uuid","title":"Producer Lease Id"},"consumer_lease_id":{"type":"string","format":"uuid","title":"Consumer Lease Id"},"transferred_bytes":{"type":"integer","maximum":1099511627776.0,"exclusiveMinimum":0.0,"title":"Transferred Bytes"}},"additionalProperties":false,"type":"object","required":["account_id","cohort_revision","producer_lease_id","consumer_lease_id","transferred_bytes"],"title":"EdgeConsumeRequest"},"EdgeNegotiateRequest":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"cohort_revision":{"type":"integer","minimum":1.0,"title":"Cohort Revision"},"producer_lease_id":{"type":"string","format":"uuid","title":"Producer Lease Id"},"consumer_lease_id":{"type":"string","format":"uuid","title":"Consumer Lease Id"},"transport_kind":{"type":"string","pattern":"^(memfd|tcp_hmac|tcp_tls13_mtls)$","title":"Transport Kind"}},"additionalProperties":false,"type":"object","required":["account_id","cohort_revision","producer_lease_id","consumer_lease_id","transport_kind"],"title":"EdgeNegotiateRequest"},"EdgeRendezvousRequest":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"cohort_revision":{"type":"integer","minimum":1.0,"title":"Cohort Revision"},"attempt_lease_id":{"type":"string","format":"uuid","title":"Attempt Lease Id"}},"additionalProperties":false,"type":"object","required":["account_id","cohort_revision","attempt_lease_id"],"title":"EdgeRendezvousRequest"},"EnrollRequest":{"properties":{"enrollment_token":{"type":"string","title":"Enrollment Token"},"public_key":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Public Key","description":"Hex-encoded Ed25519 node identity key"},"node_meta":{"$ref":"#/components/schemas/NodeMeta"},"cpu":{"$ref":"#/components/schemas/CPUSpec"},"memory":{"$ref":"#/components/schemas/MemorySpec"},"disks":{"items":{"$ref":"#/components/schemas/DiskSpec"},"type":"array","title":"Disks"},"gpus":{"items":{"$ref":"#/components/schemas/GPUSpec"},"type":"array","title":"Gpus","description":"Empty for CPU-only nodes","default":[]},"network":{"anyOf":[{"$ref":"#/components/schemas/NetworkSpec"},{"type":"null"}]}},"type":"object","required":["enrollment_token","public_key","node_meta","cpu","memory","disks"],"title":"EnrollRequest","description":"Agent enrollment request"},"EnrollResponse":{"properties":{"node_id":{"type":"string","title":"Node Id"},"account_id":{"type":"string","title":"Account Id"},"status":{"type":"string","title":"Status"},"allocation":{"$ref":"#/components/schemas/AllocationResponse"},"config":{"additionalProperties":true,"type":"object","title":"Config","default":{"heartbeat_interval_seconds":30,"metrics_enabled":true}},"s3_config":{"anyOf":[{"$ref":"#/components/schemas/S3Config"},{"type":"null"}]}},"type":"object","required":["node_id","account_id","status","allocation"],"title":"EnrollResponse","description":"Agent enrollment response"},"EvidenceRevocation":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"}},"additionalProperties":false,"type":"object","required":["account_id"],"title":"EvidenceRevocation"},"FabricBootstrapRequest":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"csr_pem":{"type":"string","maxLength":8192,"minLength":100,"title":"Csr Pem"},"listen_port":{"type":"integer","maximum":65535.0,"minimum":1.0,"title":"Listen Port"},"advertise_address":{"type":"string","maxLength":45,"minLength":7,"title":"Advertise Address"},"node_public_key":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Node Public Key"},"node_runtime_version":{"type":"string","maxLength":50,"minLength":1,"title":"Node Runtime Version"}},"type":"object","required":["account_id","csr_pem","listen_port","advertise_address","node_public_key","node_runtime_version"],"title":"FabricBootstrapRequest","description":"Node-signed request for a unique, renewable Fabric TLS identity."},"FabricBootstrapResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"certificate_pem":{"type":"string","title":"Certificate Pem"},"ca_certificate_pem":{"type":"string","title":"Ca Certificate Pem"},"expires_at":{"type":"string","title":"Expires At"},"certificate_sha256":{"type":"string","title":"Certificate Sha256"},"ca_sha256":{"type":"string","title":"Ca Sha256"},"config":{"additionalProperties":true,"type":"object","title":"Config"}},"type":"object","required":["enabled","certificate_pem","ca_certificate_pem","expires_at","certificate_sha256","ca_sha256","config"],"title":"FabricBootstrapResponse"},"GPUAllocation":{"properties":{"gpu_index":{"type":"integer","title":"Gpu Index"},"enabled":{"type":"boolean","title":"Enabled"},"vram_mb_allocatable":{"type":"integer","title":"Vram Mb Allocatable"}},"type":"object","required":["gpu_index","enabled","vram_mb_allocatable"],"title":"GPUAllocation","description":"GPU allocation"},"GPUSpec":{"properties":{"gpu_index":{"type":"integer","minimum":0.0,"title":"Gpu Index","description":"Stable index (0, 1, 2, ...)"},"vendor":{"type":"string","title":"Vendor","description":"nvidia, amd, intel, unknown"},"model":{"type":"string","title":"Model"},"vram_total_mb":{"type":"integer","title":"Vram Total Mb"},"gpu_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gpu Uuid"},"pci_bus_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pci Bus Id"},"driver_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Driver Version"},"cuda_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cuda Version"},"rocm_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rocm Version"},"compute_capability":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compute Capability"}},"type":"object","required":["gpu_index","vendor","model","vram_total_mb"],"title":"GPUSpec","description":"GPU specifications"},"GenerateTokenRequest":{"properties":{"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"}},"type":"object","title":"GenerateTokenRequest","description":"Request to generate enrollment token"},"GenerateTokenResponse":{"properties":{"token_id":{"type":"string","title":"Token Id"},"token":{"type":"string","title":"Token"},"expires_at":{"type":"string","title":"Expires At"},"expires_in_seconds":{"type":"integer","title":"Expires In Seconds"},"command_suggested":{"type":"string","title":"Command Suggested"}},"type":"object","required":["token_id","token","expires_at","expires_in_seconds","command_suggested"],"title":"GenerateTokenResponse","description":"Response with enrollment token"},"HFCredentialPut":{"properties":{"token":{"type":"string","maxLength":503,"minLength":12,"title":"Token"}},"type":"object","required":["token"],"title":"HFCredentialPut"},"HFModelInfoResponse":{"properties":{"repo_id":{"type":"string","title":"Repo Id"},"requested_ref":{"type":"string","title":"Requested Ref","default":"main"},"resolved_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolved Sha"},"model_card":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Card"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"},"size_mb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Size Mb"},"files":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Files","default":[]},"compatibility":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Compatibility"},"estimated_requirements":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Estimated Requirements"},"private":{"type":"boolean","title":"Private","default":false},"gated":{"type":"boolean","title":"Gated","default":false}},"type":"object","required":["repo_id"],"title":"HFModelInfoResponse","description":"Detailed model information."},"HFRegisterRequest":{"properties":{"repo_id":{"type":"string","maxLength":255,"minLength":1,"title":"Repo Id","description":"HuggingFace repo ID"},"hf_revision":{"type":"string","maxLength":100,"title":"Hf Revision","description":"Revision (commit, tag, branch)","default":"main"},"task_type":{"type":"string","title":"Task Type","description":"Task type for this model"},"runtime_profile_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Runtime Profile Id","description":"Override runtime profile"},"resource_requirements":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Resource Requirements","description":"Override requirements"},"gguf_file":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Gguf File","description":"GGUF filename inside the repo for CPU / llama.cpp inference (e.g. 'qwen2.5-7b-instruct-q4_k_m.gguf'). Propagated to model_configs.config.gguf_file so the CPU-LLM path can pick the exact quantized file to load."},"visibility":{"type":"string","pattern":"^public$","title":"Visibility","description":"HF catalog imports are public platform models","default":"public"},"lifecycle_status":{"type":"string","pattern":"^candidate$","title":"Lifecycle Status","description":"Imports start as candidate; probes promote them","default":"candidate"},"artifact_strategy":{"type":"string","pattern":"^(auto|direct_hf|mirror)$","title":"Artifact Strategy","description":"auto uses the direct immutable HF source for every repo, gated or not; mirror is an explicit opt-in; private repos are rejected","default":"auto"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags","description":"Tags for discovery"},"display_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Display Name","description":"Display name"},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Description","description":"Description"}},"type":"object","required":["repo_id","task_type"],"title":"HFRegisterRequest","description":"Request to register a HuggingFace model.","example":{"artifact_strategy":"auto","hf_revision":"main","lifecycle_status":"candidate","repo_id":"sentence-transformers/all-MiniLM-L6-v2","tags":["embeddings","sentence-transformers"],"task_type":"embeddings","visibility":"public"}},"HFRegisterResponse":{"properties":{"model_config_id":{"type":"string","title":"Model Config Id"},"endpoint_id":{"type":"string","title":"Endpoint Id"},"repo_id":{"type":"string","title":"Repo Id"},"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"},"inference_url":{"type":"string","title":"Inference Url"},"test_request":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Test Request"},"artifact_strategy":{"type":"string","title":"Artifact Strategy"},"artifact_status":{"type":"string","title":"Artifact Status"}},"type":"object","required":["model_config_id","endpoint_id","repo_id","status","message","inference_url","artifact_strategy","artifact_status"],"title":"HFRegisterResponse","description":"Response from model registration."},"HFSearchRequest":{"properties":{"query":{"type":"string","maxLength":500,"minLength":1,"title":"Query","description":"Search query"},"task_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Type","description":"Filter by task type"},"max_size_gb":{"anyOf":[{"type":"number","minimum":0.1},{"type":"null"}],"title":"Max Size Gb","description":"Maximum size in GB (sin cap: el límite real es la capacidad física de la flota)"},"license":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"License","description":"Allowed licenses"},"min_downloads":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Min Downloads","description":"Minimum downloads"},"limit":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Limit","description":"Maximum results","default":20},"only_supported":{"type":"boolean","title":"Only Supported","description":"Only return models compatible with our runtime","default":true}},"type":"object","required":["query"],"title":"HFSearchRequest","description":"Request to search HuggingFace models.","example":{"license":["apache-2.0","mit"],"limit":20,"max_size_gb":2,"min_downloads":1000,"query":"embedding model","task_type":"embeddings"}},"HFSearchResponse":{"properties":{"results":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Results"},"total":{"type":"integer","title":"Total"},"query":{"type":"string","title":"Query"},"filters_applied":{"additionalProperties":true,"type":"object","title":"Filters Applied"}},"type":"object","required":["results","total","query","filters_applied"],"title":"HFSearchResponse","description":"Response from HuggingFace search."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InferenceTaskClaimRequest":{"properties":{"node_id":{"type":"string","title":"Node Id"},"lease_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lease Id"},"account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"}},"type":"object","required":["node_id"],"title":"InferenceTaskClaimRequest","description":"Request to claim an inference task"},"InferenceTaskClaimResponse":{"properties":{"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"},"task":{"additionalProperties":true,"type":"object","title":"Task"}},"type":"object","required":["status","message","task"],"title":"InferenceTaskClaimResponse","description":"Response after claiming an inference task"},"JobEstimateRequest":{"properties":{"agent":{"type":"string","title":"Agent"},"taskType":{"type":"string","title":"Tasktype"},"parameters":{"additionalProperties":true,"type":"object","title":"Parameters"}},"type":"object","required":["agent","taskType","parameters"],"title":"JobEstimateRequest","description":"Request model for job cost estimation"},"JobEstimateResponse":{"properties":{"estimatedCost":{"type":"number","title":"Estimatedcost"},"estimatedDuration":{"type":"string","title":"Estimatedduration"},"breakdown":{"additionalProperties":{"type":"number"},"type":"object","title":"Breakdown"}},"type":"object","required":["estimatedCost","estimatedDuration","breakdown"],"title":"JobEstimateResponse","description":"Response model for job cost estimation"},"JobSubmitRequest":{"properties":{"agent":{"type":"string","title":"Agent"},"taskType":{"type":"string","title":"Tasktype"},"parameters":{"additionalProperties":true,"type":"object","title":"Parameters"},"estimatedCost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimatedcost"}},"type":"object","required":["agent","taskType","parameters"],"title":"JobSubmitRequest","description":"Request model for job submission"},"JobSubmitResponse":{"properties":{"jobId":{"type":"string","title":"Jobid"},"status":{"type":"string","title":"Status"},"createdAt":{"type":"string","title":"Createdat"}},"type":"object","required":["jobId","status","createdAt"],"title":"JobSubmitResponse","description":"Response model for job submission"},"LeaseRenewalRequest":{"properties":{"node_id":{"type":"string","title":"Node Id"},"lease_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lease Id"},"lease_ttl_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lease Ttl Seconds","default":300}},"type":"object","required":["node_id"],"title":"LeaseRenewalRequest","description":"Lease renewal request"},"LeaseRenewalResponse":{"properties":{"renewed":{"type":"boolean","title":"Renewed"},"lease_id":{"type":"string","title":"Lease Id"},"lease_expires_at":{"type":"string","format":"date-time","title":"Lease Expires At"},"ttl_seconds":{"type":"integer","title":"Ttl Seconds"}},"type":"object","required":["renewed","lease_id","lease_expires_at","ttl_seconds"],"title":"LeaseRenewalResponse","description":"Lease renewal response"},"LeasedTask":{"properties":{"task_exec_id":{"type":"string","title":"Task Exec Id"},"job_id":{"type":"string","title":"Job Id"},"lease_id":{"type":"string","title":"Lease Id"},"lease_ttl_seconds":{"type":"integer","title":"Lease Ttl Seconds"},"task_type":{"type":"string","title":"Task Type","default":"agent"},"execution_kind":{"type":"string","title":"Execution Kind","default":"single"},"task_spec":{"additionalProperties":true,"type":"object","title":"Task Spec"}},"type":"object","required":["task_exec_id","job_id","lease_id","lease_ttl_seconds","task_spec"],"title":"LeasedTask","description":"Leased task details"},"LifecycleUpdateRequest":{"properties":{"lifecycle_status":{"type":"string","title":"Lifecycle Status","description":"New status: candidate, ready, preferred, disabled"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Reason (required for disabled)"}},"type":"object","required":["lifecycle_status"],"title":"LifecycleUpdateRequest","description":"Request to update model lifecycle status."},"MemorySpec":{"properties":{"total_mb":{"type":"integer","title":"Total Mb"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"speed_mhz":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Speed Mhz"}},"type":"object","required":["total_mb"],"title":"MemorySpec","description":"Memory specifications"},"ModelPeersResponse":{"properties":{"model_id":{"type":"string","title":"Model Id"},"peer_count":{"type":"integer","title":"Peer Count"},"peers":{"items":{"$ref":"#/components/schemas/PeerInfo"},"type":"array","title":"Peers"}},"type":"object","required":["model_id","peer_count","peers"],"title":"ModelPeersResponse","description":"Response with list of peers that have a model"},"ModelSpaceRegistration":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"model_config_id":{"type":"string","format":"uuid","title":"Model Config Id"},"model_digest":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$","title":"Model Digest"},"residency_key":{"type":"string","maxLength":512,"minLength":1,"title":"Residency Key"},"bridge_launch_config_identity":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Bridge Launch Config Identity"},"representation_space_id":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$","title":"Representation Space Id"},"reader_digest":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$","title":"Reader Digest"},"writer_digest":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$","title":"Writer Digest"},"image_digest":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$","title":"Image Digest"},"evaluated_at":{"type":"string","format":"date-time","title":"Evaluated At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"additionalProperties":false,"type":"object","required":["account_id","model_config_id","model_digest","residency_key","bridge_launch_config_identity","representation_space_id","reader_digest","writer_digest","image_digest","evaluated_at","expires_at"],"title":"ModelSpaceRegistration"},"ModelSpaceRevocation":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"model_digest":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$","title":"Model Digest"}},"additionalProperties":false,"type":"object","required":["account_id","model_digest"],"title":"ModelSpaceRevocation"},"NetworkInterface":{"properties":{"name":{"type":"string","title":"Name"},"link_speed_mbps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Link Speed Mbps"},"is_up":{"type":"boolean","title":"Is Up","default":true}},"type":"object","required":["name"],"title":"NetworkInterface","description":"Network interface"},"NetworkSpec":{"properties":{"interfaces":{"items":{"$ref":"#/components/schemas/NetworkInterface"},"type":"array","title":"Interfaces","default":[]},"public_ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Ip"}},"type":"object","title":"NetworkSpec","description":"Network specifications"},"NodeCopyAckResult":{"properties":{"accepted":{"type":"boolean","title":"Accepted"}},"additionalProperties":false,"type":"object","required":["accepted"],"title":"NodeCopyAckResult"},"NodeCopyCommand":{"properties":{"command_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","title":"Command Id"},"nonce":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","title":"Nonce"},"node_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","title":"Node Id"},"backend_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","title":"Backend Id"},"storage_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","title":"Storage Id"},"boot_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","title":"Boot Id"},"account_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","title":"Account Id"},"namespace_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","title":"Namespace Id"},"record_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","title":"Record Id"},"record_version":{"type":"integer","maximum":9.223372036854776e+18,"minimum":1.0,"title":"Record Version"},"intent_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","title":"Intent Id"},"fencing_token":{"type":"integer","maximum":9.223372036854776e+18,"minimum":1.0,"title":"Fencing Token"},"binding_digest":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Binding Digest"},"proof_digest":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Proof Digest"},"expires_at_ms":{"type":"integer","maximum":9.223372036854776e+18,"minimum":1.0,"title":"Expires At Ms"},"copy_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","title":"Copy Id"}},"additionalProperties":false,"type":"object","required":["command_id","nonce","node_id","backend_id","storage_id","boot_id","account_id","namespace_id","record_id","record_version","intent_id","fencing_token","binding_digest","proof_digest","expires_at_ms","copy_id"],"title":"NodeCopyCommand"},"NodeListItem":{"properties":{"node_id":{"type":"string","title":"Node Id"},"account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"},"created_by_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By User Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"hostname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hostname"},"os":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Os"},"worker_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Worker Type"},"status":{"type":"string","title":"Status","default":"unknown"},"cpu_cores":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cpu Cores"},"ram_total_gb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ram Total Gb"},"disk_total_gb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Disk Total Gb"},"gpu_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Gpu Count"},"gpu_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gpu Model"},"gpu_vram_gb":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gpu Vram Gb"},"last_heartbeat":{"anyOf":[{},{"type":"null"}],"title":"Last Heartbeat"},"joined_at":{"anyOf":[{},{"type":"null"}],"title":"Joined At"}},"type":"object","required":["node_id"],"title":"NodeListItem","description":"Node list item with hardware summary"},"NodeMeta":{"properties":{"hostname":{"type":"string","title":"Hostname"},"os":{"type":"string","title":"Os"},"kernel":{"type":"string","title":"Kernel"},"agent_version":{"type":"string","title":"Agent Version"},"location":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Location"}},"type":"object","required":["hostname","os","kernel","agent_version"],"title":"NodeMeta","description":"Node metadata"},"NodeRecordPollResult":{"properties":{"request_nonce":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","title":"Request Nonce"},"commands":{"items":{"anyOf":[{"$ref":"#/components/schemas/NodeCopyCommand"},{"$ref":"#/components/schemas/NodeRecordPurgeCommand"}]},"type":"array","maxItems":1,"title":"Commands"}},"additionalProperties":false,"type":"object","required":["request_nonce","commands"],"title":"NodeRecordPollResult"},"NodeRecordPurgeCommand":{"properties":{"command_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","title":"Command Id"},"nonce":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","title":"Nonce"},"node_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","title":"Node Id"},"backend_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","title":"Backend Id"},"storage_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","title":"Storage Id"},"boot_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","title":"Boot Id"},"account_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","title":"Account Id"},"namespace_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","title":"Namespace Id"},"record_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","title":"Record Id"},"record_version":{"type":"integer","maximum":9.223372036854776e+18,"minimum":1.0,"title":"Record Version"},"intent_id":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","title":"Intent Id"},"fencing_token":{"type":"integer","maximum":9.223372036854776e+18,"minimum":1.0,"title":"Fencing Token"},"binding_digest":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Binding Digest"},"proof_digest":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Proof Digest"},"expires_at_ms":{"type":"integer","maximum":9.223372036854776e+18,"minimum":1.0,"title":"Expires At Ms"},"scope_kind":{"type":"string","const":"record","title":"Scope Kind"}},"additionalProperties":false,"type":"object","required":["command_id","nonce","node_id","backend_id","storage_id","boot_id","account_id","namespace_id","record_id","record_version","intent_id","fencing_token","binding_digest","proof_digest","expires_at_ms","scope_kind"],"title":"NodeRecordPurgeCommand"},"NodeRegisterRequest":{"properties":{"public_key":{"type":"string","title":"Public Key"},"capabilities":{"additionalProperties":true,"type":"object","title":"Capabilities"},"network_quality":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Network Quality"},"location":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Location"},"active_roles":{"items":{"type":"string"},"type":"array","title":"Active Roles","default":["worker"]},"worker_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Worker Type"},"compatible_agents":{"items":{"type":"string"},"type":"array","title":"Compatible Agents","default":[]},"pricing":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Pricing","description":"Pricing info: gpu_per_hour, cpu_per_core_hour, ram_per_gb_hour"}},"type":"object","required":["public_key","capabilities"],"title":"NodeRegisterRequest","description":"Request to register a new node"},"NodeRegisterResponse":{"properties":{"node_id":{"type":"string","title":"Node Id"},"assigned_agents":{"items":{"type":"string"},"type":"array","title":"Assigned Agents"},"message":{"type":"string","title":"Message"}},"type":"object","required":["node_id","assigned_agents","message"],"title":"NodeRegisterResponse","description":"Response for node registration"},"NodesListResponse":{"properties":{"nodes":{"items":{"$ref":"#/components/schemas/NodeListItem"},"type":"array","title":"Nodes"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["nodes","total"],"title":"NodesListResponse","description":"List of nodes"},"PeerInfo":{"properties":{"node_id":{"type":"string","title":"Node Id"},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"},"p2p_port":{"type":"integer","title":"P2P Port","default":8765},"size_mb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Mb"},"last_verified_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Verified At"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"bandwidth_score":{"type":"integer","title":"Bandwidth Score","default":100}},"type":"object","required":["node_id"],"title":"PeerInfo","description":"Information about a peer that has a model"},"PerformanceMetricsRequest":{"properties":{"node_id":{"type":"string","title":"Node Id"},"model_id":{"type":"string","title":"Model Id"},"inference_time_ms":{"type":"number","title":"Inference Time Ms"},"success":{"type":"boolean","title":"Success","default":true},"load_time_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Load Time Ms"}},"type":"object","required":["node_id","model_id","inference_time_ms"],"title":"PerformanceMetricsRequest","description":"Performance metrics reported by nodes after inference"},"PlacementPreflightRequest":{"properties":{"workload_type":{"type":"string","enum":["inference_endpoint","training_job"],"title":"Workload Type"},"workload_id":{"type":"string","format":"uuid","title":"Workload Id"},"node_eligibility":{"anyOf":[{"type":"string","enum":["own_hardware_only","own_account_only","any_node"]},{"type":"null"}],"title":"Node Eligibility"},"model_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Model Id"},"explain":{"type":"boolean","title":"Explain","default":false}},"type":"object","required":["workload_type","workload_id"],"title":"PlacementPreflightRequest"},"PlanRequest":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"endpoint_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Endpoint Id"},"input":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input"},"objective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Objective"},"execution":{"$ref":"#/components/schemas/CohortExecutionPolicy"}},"additionalProperties":false,"type":"object","required":["account_id"],"title":"PlanRequest"},"PolicyPatch":{"properties":{"node_eligibility":{"anyOf":[{"type":"string","enum":["own_hardware_only","own_account_only","any_node"]},{"type":"null"}],"title":"Node Eligibility"}},"type":"object","required":["node_eligibility"],"title":"PolicyPatch"},"ReadinessProbeRequest":{"properties":{"vendor":{"type":"string","title":"Vendor"},"tp_size":{"type":"integer","title":"Tp Size"}},"type":"object","required":["vendor","tp_size"],"title":"ReadinessProbeRequest","description":"Exact model shape to validate on one operator-selected node."},"RegistryListResponse":{"properties":{"models":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Models"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["models","total","limit","offset"],"title":"RegistryListResponse","description":"Response from registry list."},"RunRequest":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"endpoint_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Endpoint Id"},"input":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input"},"objective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Objective"},"execution":{"$ref":"#/components/schemas/CohortExecutionPolicy"},"idempotency_key":{"anyOf":[{"type":"string","maxLength":255,"minLength":8},{"type":"null"}],"title":"Idempotency Key"}},"additionalProperties":false,"type":"object","required":["account_id"],"title":"RunRequest"},"S3Config":{"properties":{"endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endpoint"},"access_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Key"},"secret_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret Key"},"bucket":{"type":"string","title":"Bucket","default":"colabhive-model-cache"},"use_ssl":{"type":"boolean","title":"Use Ssl","default":true},"region":{"type":"string","title":"Region","default":"us-east-1"}},"type":"object","title":"S3Config","description":"S3/MinIO configuration for centralized model cache"},"S3ConfigHeartbeat":{"properties":{"endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endpoint"},"access_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Key"},"secret_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret Key"},"bucket":{"type":"string","title":"Bucket","default":"colabhive-model-cache"},"use_ssl":{"type":"boolean","title":"Use Ssl","default":false},"region":{"type":"string","title":"Region","default":"us-east-1"}},"type":"object","title":"S3ConfigHeartbeat","description":"S3 configuration for centralized model cache (sent in heartbeat)"},"SplitTokensRequest":{"properties":{"node_id":{"type":"string","title":"Node Id"},"instances":{"items":{"type":"string"},"type":"array","title":"Instances"},"timestamp":{"type":"integer","title":"Timestamp"},"signature":{"type":"string","title":"Signature"}},"type":"object","required":["node_id","instances","timestamp","signature"],"title":"SplitTokensRequest","description":"Pedido de un nodo EXISTENTE para dividirse en N instancias por-GPU (GPU-as-node).\nAutenticado por firma ed25519 de la propia key del nodo (no user/api_key)."},"StructuredEvaluationRun":{"properties":{"account_id":{"type":"string","format":"uuid","title":"Account Id"},"user_id":{"type":"string","maxLength":100,"minLength":1,"title":"User Id"},"endpoint_id":{"type":"string","format":"uuid","title":"Endpoint Id"},"payload_b64":{"type":"string","maxLength":8388608,"minLength":4,"title":"Payload B64"},"object_sha256":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$","title":"Object Sha256"},"idempotency_key":{"type":"string","maxLength":255,"minLength":8,"title":"Idempotency Key"}},"additionalProperties":false,"type":"object","required":["account_id","user_id","endpoint_id","payload_b64","object_sha256","idempotency_key"],"title":"StructuredEvaluationRun","description":"Evaluator-only two-member run; never exposed through the public API."},"TaskClaimRequest":{"properties":{"node_id":{"type":"string","title":"Node Id"},"lease_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lease Id"}},"type":"object","required":["node_id"],"title":"TaskClaimRequest","description":"Request to claim a task"},"TaskClaimResponse":{"properties":{"status":{"type":"string","title":"Status"},"task":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Task"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["status"],"title":"TaskClaimResponse","description":"Response from task claim"},"TaskLeaseRequest":{"properties":{"max_tasks":{"type":"integer","title":"Max Tasks","default":1},"worker_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Worker Type"},"capabilities":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Capabilities"}},"type":"object","title":"TaskLeaseRequest","description":"Request to lease tasks"},"TaskLeaseResponse":{"properties":{"tasks":{"items":{"$ref":"#/components/schemas/LeasedTask"},"type":"array","title":"Tasks"},"leased_count":{"type":"integer","title":"Leased Count"}},"type":"object","required":["tasks","leased_count"],"title":"TaskLeaseResponse","description":"Response with leased tasks"},"TaskProgressRequest":{"properties":{"node_id":{"type":"string","title":"Node Id"},"progress":{"type":"integer","title":"Progress"},"logs":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logs"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"}},"type":"object","required":["node_id","progress"],"title":"TaskProgressRequest","description":"Task progress update"},"TaskProgressResponse":{"properties":{"acknowledged":{"type":"boolean","title":"Acknowledged"}},"type":"object","required":["acknowledged"],"title":"TaskProgressResponse","description":"Progress acknowledgment"},"TaskResultRequest":{"properties":{"node_id":{"type":"string","title":"Node Id"},"status":{"type":"string","title":"Status"},"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"logs":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logs"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"}},"type":"object","required":["node_id","status"],"title":"TaskResultRequest","description":"Task result submission"},"TaskResultResponse":{"properties":{"acknowledged":{"type":"boolean","title":"Acknowledged"},"task_status":{"type":"string","title":"Task Status"}},"type":"object","required":["acknowledged","task_status"],"title":"TaskResultResponse","description":"Task result acknowledgment"},"TaskStatusUpdate":{"properties":{"task_id":{"type":"string","title":"Task Id"},"status":{"type":"string","title":"Status"},"substatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Substatus"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","default":{}},"progress_pct":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Progress Pct"},"timestamp":{"type":"string","title":"Timestamp"},"node_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Node Id"}},"type":"object","required":["task_id","status","timestamp"],"title":"TaskStatusUpdate","description":"Real-time status update from node during inference execution.\n\nStatus values (UX states):\n- queued: Task waiting in queue\n- assigned: Task assigned to node\n- claimed: Node accepted the task\n- preparing: Node preparing environment\n- downloading_model: Downloading model from HF/cache\n- loading_model: Loading model into VRAM\n- warming_up: Running warm-up inference\n- running: Executing inference\n- finalizing: Post-processing results\n- completed: Success\n- failed: Error occurred"},"TrainingTaskClaimRequest":{"properties":{"node_id":{"type":"string","format":"uuid4","title":"Node Id"},"lease_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lease Id"}},"type":"object","required":["node_id"],"title":"TrainingTaskClaimRequest","description":"Request to claim training task"},"TrainingTaskClaimResponse":{"properties":{"status":{"type":"string","title":"Status"},"task":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Task"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["status"],"title":"TrainingTaskClaimResponse","description":"Response from claim"},"TrainingTaskCreateRequest":{"properties":{"job_id":{"type":"string","format":"uuid4","title":"Job Id"},"node_id":{"anyOf":[{"type":"string","format":"uuid4"},{"type":"null"}],"title":"Node Id"},"job_config":{"additionalProperties":true,"type":"object","title":"Job Config"},"timeout_ms":{"type":"integer","title":"Timeout Ms","default":86400000}},"type":"object","required":["job_id","job_config"],"title":"TrainingTaskCreateRequest","description":"Request to create training task execution"},"TrainingTaskResponse":{"properties":{"task_id":{"type":"string","title":"Task Id"},"job_id":{"type":"string","title":"Job Id"},"node_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Node Id"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["task_id","job_id","status","created_at"],"title":"TrainingTaskResponse","description":"Response after creating training task"},"UpdateStatusRequest":{"properties":{"update_id":{"type":"string","title":"Update Id"},"status":{"type":"string","title":"Status"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},"type":"object","required":["update_id","status"],"title":"UpdateStatusRequest","description":"Update status from node"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"orchestrator__agent_api__HeartbeatRequest":{"properties":{"node_id":{"type":"string","title":"Node Id"},"status":{"type":"string","title":"Status","default":"online"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"}},"type":"object","required":["node_id"],"title":"HeartbeatRequest","description":"Agent heartbeat request"},"orchestrator__agent_api__HeartbeatResponse":{"properties":{"acknowledged":{"type":"boolean","title":"Acknowledged","default":true},"commands":{"items":{"type":"string"},"type":"array","title":"Commands","default":[]}},"type":"object","title":"HeartbeatResponse","description":"Agent heartbeat response"},"orchestrator__api__TaskStatusResponse":{"properties":{"task_id":{"type":"string","title":"Task Id"},"status":{"type":"string","title":"Status"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"status_detail":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Status Detail"},"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"created_at":{"type":"string","title":"Created At"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["task_id","status","created_at"],"title":"TaskStatusResponse","description":"Response for task status query"},"orchestrator__inference_tasks_api__TaskStatusResponse":{"properties":{"task_id":{"type":"string","title":"Task Id"},"status":{"type":"string","title":"Status"},"status_detail":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Status Detail"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["task_id","status"],"title":"TaskStatusResponse","description":"Response with current task status"},"orchestrator__nodes_api__HeartbeatRequest":{"properties":{"node_id":{"type":"string","title":"Node Id"},"status":{"type":"string","title":"Status","default":"active"},"node_runtime_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Node Runtime Version"},"capabilities":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Capabilities"},"heartbeat_type":{"type":"string","enum":["full","delta"],"title":"Heartbeat Type","default":"full"},"resources_used":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Resources Used"},"resources_available":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Resources Available"},"loaded_models":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Loaded Models"},"model_cache":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Model Cache"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"container_diagnostics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Container Diagnostics"},"worker_pools":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Worker Pools"},"present_images":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Present Images"},"gpu_power":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Gpu Power"}},"type":"object","required":["node_id"],"title":"HeartbeatRequest","description":"Node heartbeat request (EXTENDED for bidirectional sync)"},"orchestrator__nodes_api__HeartbeatResponse":{"properties":{"acknowledged":{"type":"boolean","title":"Acknowledged"},"commands":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Commands","default":[]},"desired_roles":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Desired Roles"},"desired_models":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Desired Models"},"desired_inference_models":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Desired Inference Models"},"models_to_unload":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Models To Unload"},"desired_images":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Desired Images"},"ws_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ws Token"},"s3_config":{"anyOf":[{"$ref":"#/components/schemas/S3ConfigHeartbeat"},{"type":"null"}]}},"type":"object","required":["acknowledged"],"title":"HeartbeatResponse","description":"Heartbeat acknowledgment (EXTENDED with desired_state)"}}}}