{"openapi":"3.1.0","info":{"title":"Pendra API","description":"UK-based open-source LLM inference — OpenAI-compatible API","version":"main-6e810ea"},"paths":{"/api/v1/chat/completions":{"post":{"tags":["Chat"],"summary":"Create Chat Completion","operationId":"create_chat_completion_api_v1_chat_completions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Pendra-Worker-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Pendra-Worker-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chat/completions":{"post":{"tags":["Chat"],"summary":"Create Chat Completion","operationId":"create_chat_completion_v1_chat_completions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Pendra-Worker-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Pendra-Worker-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/images/generations":{"post":{"tags":["Images"],"summary":"Create Image","operationId":"create_image_api_v1_images_generations_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Pendra-Worker-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Pendra-Worker-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/images/generations":{"post":{"tags":["Images"],"summary":"Create Image","operationId":"create_image_v1_images_generations_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Pendra-Worker-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Pendra-Worker-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/audio/transcriptions":{"post":{"tags":["Audio"],"summary":"Create Transcription","description":"Create a transcription from an uploaded audio file.\n\nOpenAI-compatible multipart endpoint. The file is base64-encoded and\nrouted to a transcription-capable worker, which runs it through the\nbuilt-in Pendra whisper.cpp engine.\n\n``beam_size`` selects the decoding strategy (1 = greedy, higher = beam\nsearch over that many candidates). Omitting it lets the worker apply its\naccuracy-first default.\n\nA private-inference (encrypted) transcription arrives as ``application/json``\non this same path — the audio bytes and form fields are sealed inside the\nenvelope's ``binary_ciphertext``, decrypted only on the worker. The multipart\npath below is unchanged for plaintext callers.","operationId":"create_transcription_api_v1_audio_transcriptions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Pendra-Worker-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Pendra-Worker-Id"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_transcription_api_v1_audio_transcriptions_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/audio/speech":{"post":{"tags":["Audio"],"summary":"Create Speech","description":"Synthesise speech from text (OpenAI-compatible ``POST /v1/audio/speech``).\n\nJSON body ``{model, input, voice?, response_format?}`` → ``audio/wav`` bytes.\nThe request is routed to a speech-capable worker running the in-process\nPendra (audio.cpp) engine, which returns the audio base64-encoded; this\nrouter decodes it into the binary response.\n\nContent negotiation: with ``Accept: application/json`` (the console\nPlayground) the response is instead a JSON envelope ``{audio: <base64 wav>,\nformat, duration_ms, request_id}`` served through ``json_with_keepalive`` so a\nslow generation survives the edge proxy's idle cut (issue #1572). Without it\n(OpenAI SDKs) the raw-binary ``audio/wav`` contract is unchanged.\n\nAn end-to-end encrypted body (``pendra_encrypted``, v2) is relayed to a\nworker advertising ``sealed_speech``, which validates it, runs the key's\ncontent filter on the text and seals the ``{audio, format, duration_ms}``\nbody; the response is always that sealed JSON envelope, like encrypted\ntranscription. A 400 ``speech_encryption_unsupported`` means the workers\nserving the model predate it.","operationId":"create_speech_api_v1_audio_speech_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Pendra-Worker-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Pendra-Worker-Id"}},{"name":"accept","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/audio/transcriptions":{"post":{"tags":["Audio"],"summary":"Create Transcription","description":"Create a transcription from an uploaded audio file.\n\nOpenAI-compatible multipart endpoint. The file is base64-encoded and\nrouted to a transcription-capable worker, which runs it through the\nbuilt-in Pendra whisper.cpp engine.\n\n``beam_size`` selects the decoding strategy (1 = greedy, higher = beam\nsearch over that many candidates). Omitting it lets the worker apply its\naccuracy-first default.\n\nA private-inference (encrypted) transcription arrives as ``application/json``\non this same path — the audio bytes and form fields are sealed inside the\nenvelope's ``binary_ciphertext``, decrypted only on the worker. The multipart\npath below is unchanged for plaintext callers.","operationId":"create_transcription_v1_audio_transcriptions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Pendra-Worker-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Pendra-Worker-Id"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_transcription_v1_audio_transcriptions_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/audio/speech":{"post":{"tags":["Audio"],"summary":"Create Speech","description":"Synthesise speech from text (OpenAI-compatible ``POST /v1/audio/speech``).\n\nJSON body ``{model, input, voice?, response_format?}`` → ``audio/wav`` bytes.\nThe request is routed to a speech-capable worker running the in-process\nPendra (audio.cpp) engine, which returns the audio base64-encoded; this\nrouter decodes it into the binary response.\n\nContent negotiation: with ``Accept: application/json`` (the console\nPlayground) the response is instead a JSON envelope ``{audio: <base64 wav>,\nformat, duration_ms, request_id}`` served through ``json_with_keepalive`` so a\nslow generation survives the edge proxy's idle cut (issue #1572). Without it\n(OpenAI SDKs) the raw-binary ``audio/wav`` contract is unchanged.\n\nAn end-to-end encrypted body (``pendra_encrypted``, v2) is relayed to a\nworker advertising ``sealed_speech``, which validates it, runs the key's\ncontent filter on the text and seals the ``{audio, format, duration_ms}``\nbody; the response is always that sealed JSON envelope, like encrypted\ntranscription. A 400 ``speech_encryption_unsupported`` means the workers\nserving the model predate it.","operationId":"create_speech_v1_audio_speech_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Pendra-Worker-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Pendra-Worker-Id"}},{"name":"accept","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accept"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/embeddings":{"post":{"tags":["Embeddings"],"summary":"Create Embedding","operationId":"create_embedding_api_v1_embeddings_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Pendra-Worker-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Pendra-Worker-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/embeddings":{"post":{"tags":["Embeddings"],"summary":"Create Embedding","operationId":"create_embedding_v1_embeddings_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Pendra-Worker-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Pendra-Worker-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/rerank":{"post":{"tags":["Rerank"],"summary":"Create Rerank","operationId":"create_rerank_api_v1_rerank_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Pendra-Worker-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Pendra-Worker-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/rerank":{"post":{"tags":["Rerank"],"summary":"Create Rerank","operationId":"create_rerank_v1_rerank_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Pendra-Worker-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Pendra-Worker-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/moderations":{"post":{"tags":["Moderations"],"summary":"Create Moderation","operationId":"create_moderation_api_v1_moderations_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Pendra-Worker-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Pendra-Worker-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModerationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/moderations":{"post":{"tags":["Moderations"],"summary":"Create Moderation","operationId":"create_moderation_v1_moderations_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Pendra-Worker-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Pendra-Worker-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModerationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/private-inference/key":{"get":{"tags":["Private Inference"],"summary":"Get Workload Key","description":"Return the org's registered workload public key(s), newest-seen first.\n\n404 with guidance when none exists yet — the org has no worker that has\never held a key, so there is nothing for a client to seal to. The guidance\npoints at approval instead when a connected worker is waiting on it.","operationId":"get_workload_key_api_v1_private_inference_key_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/private-inference/org":{"get":{"tags":["Private Inference"],"summary":"Get Org Encryption","description":"Encryption status for the caller's active org: the `require_e2e`\nenforcement switch, the independent `require_worker_approval` admission\nswitch, the registered workload key(s), and per-worker key coverage. Any\nmember may read it; owners and operators may change either switch.","operationId":"get_org_encryption_api_v1_private_inference_org_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/private-inference/require-e2e":{"put":{"tags":["Private Inference"],"summary":"Set Require E2E","description":"Owner or operator. Turn the org's `require_e2e` enforcement on/off.\n\nGuard: enabling with **no** connected, approved worker holding a workload\nkey would reject every request (plaintext blocked, and no worker can serve\nan encrypted one), so it's refused with 409. A worker awaiting approval\ndoesn't count even if it holds a key — routing never picks it. Enabling while *some* workers lack\na key is allowed — those workers simply receive no traffic while it's on;\nthe UI warns about them from the `/org` coverage figures.","operationId":"set_require_e2e_api_v1_private_inference_require_e2e_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequireE2eBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/private-inference/require-worker-approval":{"put":{"tags":["Private Inference"],"summary":"Set Require Worker Approval","description":"Owner or operator. Turn the org's worker-approval policy on/off.\n\nIndependent of `require_e2e`. Approval answers \"may a machine nobody has\nlooked at serve traffic and be handed the fleet encryption key?\"; enforcement\nanswers \"may plaintext inference run?\". Either is useful without the other,\nso neither switches the other.\n\nTurning it ON auto-approves everything connected right now: the fleet already\nrunning is the fleet the operator already trusts, and approval is about what\nturns up next. Without that, switching the policy on would stop the org's own\ntraffic in the same instant.\n\nTurning it OFF admits whatever is sitting pending, immediately — clearing the\nrouting flag *and* handing over the encryption key each one was refused at\nhello. Leaving the key out would produce admitted-but-keyless workers that\nserve nothing under enforcement until they happen to reconnect.","operationId":"set_require_worker_approval_api_v1_private_inference_require_worker_approval_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequireWorkerApprovalBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/private-inference/keys/rotate":{"post":{"tags":["Private Inference"],"summary":"Rotate Workload Key","description":"Owner only. Give the fleet a new encryption key alongside its current one.\n\nThis is the \"add\" half of a rotation, and it has to be an explicit request:\nthe automatic path always seals the EXISTING key across to a worker that\njoins a keyed fleet, so no new fingerprint ever appears on its own.\n\nNothing is retired and nothing breaks. Both keys are live afterwards and\nclients seal to every live key, so a request works whichever of the two the\nworker serving it holds — including requests already in flight, and clients\nstill using a cached key set. Call ``/keys/{fingerprint}/retire`` on the old\nfingerprint when you are ready to complete the rotation; that is the step\nthat actually revokes it.\n\n409 when the org is already at its key cap (retire one first) or when no\nconnected worker can carry the rotation out.","operationId":"rotate_workload_key_api_v1_private_inference_keys_rotate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/private-inference/keys/{fingerprint}/retire":{"post":{"tags":["Private Inference"],"summary":"Retire Workload Key","description":"Owner only. Retire (\"abandon\") a workload key the org no longer uses.\n\nRetirement is a tombstone, not a DELETE. A worker that is merely\n*disconnected* still holds the key in RAM and re-advertises it on reconnect,\nso deleting the row would simply resurrect it; ``retired_at`` makes the\nexclusion stick (see ``register_workload_keys``).\n\nHolders are pushed a drop instruction rather than refused. Dropping is what\nmakes retirement a real revocation: while the key is still in RAM the worker\ncan open anything sealed to it, so merely ceasing to advertise it would\nleave the key live on every machine that has it.\n\nA worker is only asked to drop a key it is not alone on, and only when the\norg has another live key — otherwise retiring would strip the fleet of the\nonly key it can serve encrypted traffic with, which is a self-inflicted\noutage rather than a revocation. That case is still refused (409).\n\nThis is what unwedges an org stuck at ``MAX_ORG_WORKLOAD_KEYS``: the cap\ncounts live rows only, so retiring a dead key frees a slot immediately.","operationId":"retire_workload_key_api_v1_private_inference_keys__fingerprint__retire_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"fingerprint","in":"path","required":true,"schema":{"type":"string","title":"Fingerprint"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/private-inference/key":{"get":{"tags":["Private Inference"],"summary":"Get Workload Key","description":"Return the org's registered workload public key(s), newest-seen first.\n\n404 with guidance when none exists yet — the org has no worker that has\never held a key, so there is nothing for a client to seal to. The guidance\npoints at approval instead when a connected worker is waiting on it.","operationId":"get_workload_key_v1_private_inference_key_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/private-inference/org":{"get":{"tags":["Private Inference"],"summary":"Get Org Encryption","description":"Encryption status for the caller's active org: the `require_e2e`\nenforcement switch, the independent `require_worker_approval` admission\nswitch, the registered workload key(s), and per-worker key coverage. Any\nmember may read it; owners and operators may change either switch.","operationId":"get_org_encryption_v1_private_inference_org_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/private-inference/require-e2e":{"put":{"tags":["Private Inference"],"summary":"Set Require E2E","description":"Owner or operator. Turn the org's `require_e2e` enforcement on/off.\n\nGuard: enabling with **no** connected, approved worker holding a workload\nkey would reject every request (plaintext blocked, and no worker can serve\nan encrypted one), so it's refused with 409. A worker awaiting approval\ndoesn't count even if it holds a key — routing never picks it. Enabling while *some* workers lack\na key is allowed — those workers simply receive no traffic while it's on;\nthe UI warns about them from the `/org` coverage figures.","operationId":"set_require_e2e_v1_private_inference_require_e2e_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequireE2eBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/private-inference/require-worker-approval":{"put":{"tags":["Private Inference"],"summary":"Set Require Worker Approval","description":"Owner or operator. Turn the org's worker-approval policy on/off.\n\nIndependent of `require_e2e`. Approval answers \"may a machine nobody has\nlooked at serve traffic and be handed the fleet encryption key?\"; enforcement\nanswers \"may plaintext inference run?\". Either is useful without the other,\nso neither switches the other.\n\nTurning it ON auto-approves everything connected right now: the fleet already\nrunning is the fleet the operator already trusts, and approval is about what\nturns up next. Without that, switching the policy on would stop the org's own\ntraffic in the same instant.\n\nTurning it OFF admits whatever is sitting pending, immediately — clearing the\nrouting flag *and* handing over the encryption key each one was refused at\nhello. Leaving the key out would produce admitted-but-keyless workers that\nserve nothing under enforcement until they happen to reconnect.","operationId":"set_require_worker_approval_v1_private_inference_require_worker_approval_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequireWorkerApprovalBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/private-inference/keys/rotate":{"post":{"tags":["Private Inference"],"summary":"Rotate Workload Key","description":"Owner only. Give the fleet a new encryption key alongside its current one.\n\nThis is the \"add\" half of a rotation, and it has to be an explicit request:\nthe automatic path always seals the EXISTING key across to a worker that\njoins a keyed fleet, so no new fingerprint ever appears on its own.\n\nNothing is retired and nothing breaks. Both keys are live afterwards and\nclients seal to every live key, so a request works whichever of the two the\nworker serving it holds — including requests already in flight, and clients\nstill using a cached key set. Call ``/keys/{fingerprint}/retire`` on the old\nfingerprint when you are ready to complete the rotation; that is the step\nthat actually revokes it.\n\n409 when the org is already at its key cap (retire one first) or when no\nconnected worker can carry the rotation out.","operationId":"rotate_workload_key_v1_private_inference_keys_rotate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/private-inference/keys/{fingerprint}/retire":{"post":{"tags":["Private Inference"],"summary":"Retire Workload Key","description":"Owner only. Retire (\"abandon\") a workload key the org no longer uses.\n\nRetirement is a tombstone, not a DELETE. A worker that is merely\n*disconnected* still holds the key in RAM and re-advertises it on reconnect,\nso deleting the row would simply resurrect it; ``retired_at`` makes the\nexclusion stick (see ``register_workload_keys``).\n\nHolders are pushed a drop instruction rather than refused. Dropping is what\nmakes retirement a real revocation: while the key is still in RAM the worker\ncan open anything sealed to it, so merely ceasing to advertise it would\nleave the key live on every machine that has it.\n\nA worker is only asked to drop a key it is not alone on, and only when the\norg has another live key — otherwise retiring would strip the fleet of the\nonly key it can serve encrypted traffic with, which is a self-inflicted\noutage rather than a revocation. That case is still refused (409).\n\nThis is what unwedges an org stuck at ``MAX_ORG_WORKLOAD_KEYS``: the cap\ncounts live rows only, so retiring a dead key frees a slot immediately.","operationId":"retire_workload_key_v1_private_inference_keys__fingerprint__retire_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"fingerprint","in":"path","required":true,"schema":{"type":"string","title":"Fingerprint"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/models":{"get":{"tags":["Models"],"summary":"List Models","description":"List available models from connected GPU workers.\n\nEach entry says what a client needs to plan a request: `context_length` and\n`context_length_source` (`served`, the window the workers serve, or\n`catalogue`, the model's full length before they have all reported one),\n`max_output_tokens` with `top_provider.max_completion_tokens` (replies have\nno cap below the window, so they equal `context_length`),\n`architecture.input_modalities`, `supported_parameters`, and\n`reasoning_support` (effort levels and whether thinking can be switched off).\n`context_window` is only ever the served window, and is omitted until known.","operationId":"list_models_api_v1_models_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"enum":["chat","image","embedding","rerank","ocr","transcription","speech"],"type":"string"},{"type":"null"}],"description":"Filter by model type: 'chat', 'image', 'embedding', 'rerank', 'ocr', 'transcription', or 'speech'","title":"Type"},"description":"Filter by model type: 'chat', 'image', 'embedding', 'rerank', 'ocr', 'transcription', or 'speech'"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{},"example":{"object":"list","data":[{"id":"qwen3.8:27b-ud-q4_k_m","object":"model","created":1776313891,"owned_by":"pendra","type":"chat","capabilities":["completion","vision","tools","thinking"],"parameter_size":"27B","reasoning":"hybrid","default_thinking":true,"reasoning_controls":{"mandatory":false,"toggle":true,"default_enabled":true,"supported_efforts":["low","medium","xhigh"],"default_effort":"xhigh","effort_aliases":{"none":"none","minimal":"none","high":"xhigh","max":"xhigh"},"budget":true},"reasoning_support":{"supported_efforts":["low","medium","xhigh"],"default_effort":"xhigh","default_enabled":true,"can_disable":true},"context_window":32768,"context_length":32768,"context_length_source":"served","max_output_tokens":32768,"top_provider":{"context_length":32768,"max_completion_tokens":32768},"architecture":{"input_modalities":["text","image"]},"supported_parameters":["max_tokens","max_completion_tokens","temperature","top_p","top_k","min_p","stop","seed","response_format","frequency_penalty","presence_penalty","repeat_penalty","repeat_last_n","logit_bias","xtc_probability","xtc_threshold","mirostat","mirostat_tau","mirostat_eta","tools","tool_choice","reasoning","reasoning_effort","enable_thinking"]}]}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/catalogue":{"get":{"tags":["Catalogue"],"summary":"Get Catalogue","description":"Return the catalogue, filtered for the caller's organisation.\n\nServed from the live DB-backed snapshot (`catalogue_store`) — the sole\nsource of truth — refreshed on boot and after admin writes.\n\nAuth is **optional**: an anonymous caller (the marketing site, a logged-out\nconsole, a worker CLI released before `/api/v1/worker/catalogue` existed)\nsees only models with `visibility = 'enabled'`. A caller who presents a\nvalid API key / JWT additionally sees the `per_org` models their org is\nenrolled in. `disabled` models are never returned.\n\nKeeping the anonymous branch is a compatibility guarantee: the shipped\nworker CLI fetches this URL with no credential and treats a non-200 as\nfatal, so 401-ing anonymous callers would break `pendra models install` on\nevery worker not yet upgraded. Current workers use the org-scoped\n`GET /api/v1/worker/catalogue` (Ed25519 worker JWT) instead.\n\nThe anonymous view is identical for every caller and changes only when the\nsnapshot is rebuilt, so its fully-serialised body is memoized per snapshot\n(`catalogue_store.public_catalogue_json`) instead of being re-validated and\nre-serialised on every unauthenticated request. Authenticated / org-scoped\ncallers fall through to the normal per-request serialisation.","operationId":"get_catalogue_api_v1_catalogue_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogueResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/catalogue/fit":{"post":{"tags":["Catalogue"],"summary":"Post Fit","description":"Will each catalogue variant fit a worker with this memory?\n\nApplies the worker's own fit rules (``fit_verdict/AGENTS.md``) to the memory\nthe caller reports, for the variants visible to the caller's organisation.\nThe verdict is the ceiling: it cannot see models the worker already holds\nwarm or per-host operator overrides.","operationId":"post_fit_api_v1_catalogue_fit_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FitRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/api-keys":{"get":{"tags":["API Keys"],"summary":"List Api Keys","operationId":"list_api_keys_api_v1_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ApiKeyResponse"},"type":"array","title":"Response List Api Keys Api V1 Api Keys Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["API Keys"],"summary":"Create Api Key","description":"Create a key. Called with an API key, the new key belongs to that key's\nowner, records which key created it, holds no scope the caller lacks, and\nexpires no later than the caller (by default, when the caller does).","operationId":"create_api_key_api_v1_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/api-keys/{key_id}":{"delete":{"tags":["API Keys"],"summary":"Delete Api Key","operationId":"delete_api_key_api_v1_api_keys__key_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["API Keys"],"summary":"Update Api Key","description":"Rename a key or change its content filtering.\n\nConsole only: a key can never change its own filtering. Only the key's\nowner (the member who created it), an organisation owner or a Pendra\nplatform admin may edit it; anyone else gets a 404, as on delete, so other\nmembers' keys are not revealed. A field left out is unchanged;\n``content_filter: null`` returns the key to the organisation default.","operationId":"update_api_key_api_v1_api_keys__key_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateApiKeyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/api-keys/{key_id}/rotate":{"post":{"tags":["API Keys"],"summary":"Rotate Api Key","description":"Give a key a new secret, shown once, for when the old one may have leaked.\n\nThe old secret stops working at once. Everything else stays: the id, name,\nscopes, owner, expiry, content filtering and usage history. Who may rotate a\nkey is who may revoke it. An API key may rotate only a key it could have\ncreated (no scope it lacks, no later expiry, the same filtering), since\nrotating hands over that key's secret; that includes itself. The key is\nmarked as rotated by the caller's key, or unmarked for a console session\nor a key rotating itself.","operationId":"rotate_api_key_api_v1_api_keys__key_id__rotate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/content-filter":{"get":{"tags":["Content filtering"],"summary":"Get Org Content Filter","operationId":"get_org_content_filter_api_v1_content_filter_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgContentFilter"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["Content filtering"],"summary":"Put Org Content Filter","operationId":"put_org_content_filter_api_v1_content_filter_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgContentFilterUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgContentFilter"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/usage/summary":{"get":{"tags":["Usage"],"summary":"Get Usage Summary","operationId":"get_usage_summary_api_v1_usage_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/usage/daily":{"get":{"tags":["Usage"],"summary":"Get Daily Usage","operationId":"get_daily_usage_api_v1_usage_daily_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DailyUsage"},"title":"Response Get Daily Usage Api V1 Usage Daily Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/usage/breakdown":{"get":{"tags":["Usage"],"summary":"Get Usage Breakdown","description":"Usage aggregated by model and by worker over the last N days.\n\nTwo ranked lists — ``by_model`` and ``by_worker`` — each capped to the top\n10 so the leading cost/load drivers surface without an unbounded list. The\n``sort`` param picks the ranking metric: ``tokens`` (default) orders by\n``total_tokens`` then request count; ``requests`` orders by request count\nthen ``total_tokens`` — the same rows, ranked by the other legitimate\nframing (a model with many small requests can top the requests ranking yet\nsit mid-list by tokens). The by-worker query groups by ``worker_id`` (NULL\nincluded for worker-less / legacy rows) and reports the most-recent\n``worker_name`` so a renamed worker doesn't split across rows.","operationId":"get_usage_breakdown_api_v1_usage_breakdown_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}},{"name":"sort","in":"query","required":false,"schema":{"enum":["tokens","requests"],"type":"string","default":"tokens","title":"Sort"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageBreakdown"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/usage/workers/sparkline":{"get":{"tags":["Usage"],"summary":"Get Worker Sparkline","description":"Hourly request counts per worker for the last N hours.\n\nReturns ``{worker_id: [counts]}`` where each list has length ``hours``\nin chronological order (oldest → newest). Missing hours are filled\nwith 0 so the frontend can render fixed-width sparklines without\ninterpolation gymnastics. Aligns to clock-hour boundaries via\n``date_trunc('hour', …)``.","operationId":"get_worker_sparkline_api_v1_usage_workers_sparkline_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"hours","in":"query","required":false,"schema":{"type":"integer","maximum":168,"minimum":1,"default":24,"title":"Hours"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"array","items":{"type":"integer"}},"title":"Response Get Worker Sparkline Api V1 Usage Workers Sparkline Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/usage/logs":{"get":{"tags":["Usage"],"summary":"Get Usage Logs","operationId":"get_usage_logs_api_v1_usage_logs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"worker_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Worker Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UsageLog"},"title":"Response Get Usage Logs Api V1 Usage Logs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/usage/inflight":{"get":{"tags":["Usage"],"summary":"Get Inflight Requests","description":"Requests currently running on this org's workers.\n\nThese have no ``usage_logs`` row yet (that is written on completion), so\nthe dashboard reads them straight from the in-flight registry to show\n\"in progress\" rows while a worker is busy.","operationId":"get_inflight_requests_api_v1_usage_inflight_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Worker Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InflightRequest"},"title":"Response Get Inflight Requests Api V1 Usage Inflight Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/usage/throughput":{"get":{"tags":["Usage"],"summary":"Get Worker Throughput","description":"Combined output tokens per second for one of the org's workers, over the\nlast five minutes (or its last five busy minutes), with the best minute of\nthe last 24 hours and how many requests are running on it now.","operationId":"get_worker_throughput_api_v1_usage_throughput_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Worker Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerThroughput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs":{"get":{"tags":["Organisations"],"summary":"List Orgs","operationId":"list_orgs_api_v1_orgs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OrgResponse"},"type":"array","title":"Response List Orgs Api V1 Orgs Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Organisations"],"summary":"Create Org","operationId":"create_org_api_v1_orgs_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/routers__organizations__CreateOrgRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/orgs/{org_id}/attribution":{"post":{"tags":["Organisations"],"summary":"Set Org Attribution","description":"Record marketing attribution on an org the caller owns.\n\nThis is the reliable hook for \"where did this org come from\": the org is\nusually created by the Basejump on_auth_user_created trigger (not POST\n/orgs), so the console calls this once on first landing with the\nattribution forwarded from the marketing CTA. First write wins — once an\norg has attribution it is never overwritten — so a later signup/login by\nthe same user cannot clobber the original source.","operationId":"set_org_attribution_api_v1_orgs__org_id__attribution_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetAttributionRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/my-invites":{"get":{"tags":["Organisations"],"summary":"List My Invites","description":"List pending invitations addressed to the current user's email.","operationId":"list_my_invites_api_v1_orgs_my_invites_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PendingInviteResponse"},"type":"array","title":"Response List My Invites Api V1 Orgs My Invites Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/orgs/my-invites/{invite_id}/accept":{"post":{"tags":["Organisations"],"summary":"Accept My Invite","description":"Accept an invitation by ID (verified via email match).","operationId":"accept_my_invite_api_v1_orgs_my_invites__invite_id__accept_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invite Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/my-invites/{invite_id}/decline":{"post":{"tags":["Organisations"],"summary":"Decline My Invite","description":"Decline an invitation by deleting it (verified via email match).","operationId":"decline_my_invite_api_v1_orgs_my_invites__invite_id__decline_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invite Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/invite-info/{token}":{"get":{"tags":["Organisations"],"summary":"Invite Info","description":"Look up an invitation by token for the public landing page.\n\nA pure read: a mail scanner hitting this URL mutates nothing, which is the\nwhole point — the invite stays usable no matter how many times it's fetched.","operationId":"invite_info_api_v1_orgs_invite_info__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteInfoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}":{"get":{"tags":["Organisations"],"summary":"Get Org","operationId":"get_org_api_v1_orgs__org_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Organisations"],"summary":"Update Org","operationId":"update_org_api_v1_orgs__org_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/routers__organizations__UpdateOrgRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Organisations"],"summary":"Delete Org","description":"Delete the org: stop its rented GPUs, cancel its subscription, then\ndelete it, keeping its billing records (``org_deletion``).","operationId":"delete_org_api_v1_orgs__org_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/primary-owner":{"put":{"tags":["Organisations"],"summary":"Transfer Primary Owner","description":"Hand the org's primary ownership to another owner.\n\nThe primary owner can't leave the org or delete their account while they\nhold it, so this is how they step back without deleting the org. Only the\ncurrent primary owner can do it, and only to someone who is already an\nowner, so the org never gains an owner nobody chose.","operationId":"transfer_primary_owner_api_v1_orgs__org_id__primary_owner_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrimaryOwnerRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/members":{"get":{"tags":["Organisations"],"summary":"List Members","operationId":"list_members_api_v1_orgs__org_id__members_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MemberResponse"},"title":"Response List Members Api V1 Orgs  Org Id  Members Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/members/{user_id}":{"patch":{"tags":["Organisations"],"summary":"Update Member","operationId":"update_member_api_v1_orgs__org_id__members__user_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMemberRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Organisations"],"summary":"Remove Member","operationId":"remove_member_api_v1_orgs__org_id__members__user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/leave":{"post":{"tags":["Organisations"],"summary":"Leave Org","description":"Remove the calling user from an organisation they belong to.\n\nThe self-service counterpart to remove_member (which is owner-only). The\nsame integrity guards apply, keyed on the caller: the primary owner can't\nwalk away and orphan the org, and neither the last member nor the last\nremaining owner may leave — those callers must transfer ownership or delete\nthe organisation instead.","operationId":"leave_org_api_v1_orgs__org_id__leave_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/invites":{"get":{"tags":["Organisations"],"summary":"List Invites","operationId":"list_invites_api_v1_orgs__org_id__invites_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/routers__organizations__InviteResponse"},"title":"Response List Invites Api V1 Orgs  Org Id  Invites Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Organisations"],"summary":"Create Invite","operationId":"create_invite_api_v1_orgs__org_id__invites_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/routers__organizations__InviteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/invites/{invite_id}":{"delete":{"tags":["Organisations"],"summary":"Revoke Invite","operationId":"revoke_invite_api_v1_orgs__org_id__invites__invite_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invite Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/accept-invite":{"post":{"tags":["Organisations"],"summary":"Accept Invite","operationId":"accept_invite_api_v1_orgs_accept_invite_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptInviteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/orgs/{org_id}/signup-survey":{"get":{"tags":["Organisations"],"summary":"Get Signup Survey Status","description":"Whether the console should show this user the signup questions.","operationId":"get_signup_survey_status_api_v1_orgs__org_id__signup_survey_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupSurveyStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Organisations"],"summary":"Submit Signup Survey","description":"Store the answers (or a skip) for an org the caller created.\n\nOnly the org's primary owner can answer. The first answer wins: a second\nsubmit, from a double click or another tab, changes nothing.","operationId":"submit_signup_survey_api_v1_orgs__org_id__signup_survey_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupSurveyRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/hosted-api-interest":{"get":{"tags":["Organisations"],"summary":"Get Hosted Api Interest","description":"Whether the caller has asked to be told about a hosted API.","operationId":"get_hosted_api_interest_api_v1_orgs__org_id__hosted_api_interest_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HostedApiInterestStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Organisations"],"summary":"Add Hosted Api Interest","description":"Put the caller on the list. Asking twice changes nothing.","operationId":"add_hosted_api_interest_api_v1_orgs__org_id__hosted_api_interest_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Organisations"],"summary":"Remove Hosted Api Interest","description":"Take the caller off the list. Fine if they were never on it.","operationId":"remove_hosted_api_interest_api_v1_orgs__org_id__hosted_api_interest_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/notifications/settings":{"get":{"tags":["Notifications"],"summary":"Get Notification Settings","description":"Current preferences for the active org. No row → everything off.","operationId":"get_notification_settings_api_v1_notifications_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationSettings"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["Notifications"],"summary":"Set Notification Settings","description":"Owner-only. Upsert the org's preferences.\n\nUpsert (not UPDATE) because the row is created lazily — the same org may\nhave had ``require_e2e`` written first, or nothing at all.","operationId":"set_notification_settings_api_v1_notifications_settings_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationSettings"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationSettings"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/workers":{"get":{"tags":["workers"],"summary":"List Workers","operationId":"list_workers_api_v1_workers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/workers/{worker_id}":{"delete":{"tags":["workers"],"summary":"Delete Worker","description":"Delete a worker's durable roster record.\n\nOffline-only: a currently-connected worker returns 409 (its daemon would\njust reconnect and recreate the row seconds later — disconnect it or revoke\nits key first). 404 when there is no offline record to remove.","operationId":"delete_worker_api_v1_workers__worker_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workers/install-notice":{"get":{"tags":["workers"],"summary":"Install Notice","description":"For each variant of the model, the notice shown before installing it when\nanother quant of the same model is already installed on a worker in this org\n(online or offline). ``{\"notices\": {variant_id: notice}}``; a variant with\nnothing to warn about is absent.","operationId":"install_notice_api_v1_workers_install_notice_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"query","required":true,"schema":{"type":"string","description":"Any variant id (or uuid) of the model being installed","title":"Model Id"},"description":"Any variant id (or uuid) of the model being installed"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workers/latest-version":{"get":{"tags":["workers"],"summary":"Latest Worker Version","operationId":"latest_worker_version_api_v1_workers_latest_version_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/workers/install-link/email":{"post":{"tags":["workers"],"summary":"Email Install Link","description":"Email the signed-in user a link to the worker install step.\n\nOnly ever sends to the address on the caller's own session, never one\nsupplied in the request, so it can't be pointed at anyone else. The link is\nthe console page itself: no key or token travels in the email, and opening\nit means signing in first.","operationId":"email_install_link_api_v1_workers_install_link_email_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/workers/{worker_id}/power":{"get":{"tags":["workers"],"summary":"Get Worker Power","description":"Power usage history for one of the caller's workers: a series per power\nchannel (each GPU, the CPU, the whole machine) plus energy/average/peak\ntotals. 1h → 1-minute points, 24h → 5-minute, 7d/30d → hourly. A worker\nthat has reported nothing yet returns empty series, not an error.\n\nPower history is a Pro/Enterprise feature: a Free org gets 403\nplan_required. Free still sees the live draw, which rides on the worker\nlist/detail payloads rather than this route.","operationId":"get_worker_power_api_v1_workers__worker_id__power_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"range","in":"query","required":false,"schema":{"enum":["1h","24h","7d","30d"],"type":"string","default":"24h","title":"Range"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workers/events":{"get":{"tags":["workers"],"summary":"List Worker Events","operationId":"list_worker_events_api_v1_workers_events_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Worker Id"}},{"name":"event_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkerEvent"},"title":"Response List Worker Events Api V1 Workers Events Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workers/{worker_id}/approval":{"post":{"tags":["workers"],"summary":"Set Worker Approval","description":"Approve or reject a worker awaiting admission.\n\nApproving admits it to routing and qualifies it to receive the org's\nencryption key — one decision, so \"what is serving my traffic?\" and \"what\nholds my key?\" always have the same answer.\n\nRejecting is deliberately NOT a disconnect. The worker stays connected and\nobservable but serves nothing, so an operator who changes their mind can\napprove it without needing physical access to the machine. Kicking the\nsocket would be fatal on the worker side, leaving it dead until someone\nrestarted it by hand.","operationId":"set_worker_approval_api_v1_workers__worker_id__approval_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerApprovalBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/worker-keys":{"get":{"tags":["Worker Keys"],"summary":"List Worker Keys","operationId":"list_worker_keys_api_v1_worker_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WorkerKeyResponse"},"type":"array","title":"Response List Worker Keys Api V1 Worker Keys Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Worker Keys"],"summary":"Create Worker Key","operationId":"create_worker_key_api_v1_worker_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkerKeyRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedWorkerKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/worker-keys/enrol":{"post":{"tags":["Worker Keys"],"summary":"Create Enrol Token","description":"Mint a short-lived, single-use enrolment token for the CLI install\none-liner. No worker key is created here — the key is minted only when the\ntoken is redeemed (``redeem_enrol_token``), so an unredeemed token that\nexpires leaves nothing behind.","operationId":"create_enrol_token_api_v1_worker_keys_enrol_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEnrolTokenRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrolTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/worker-keys/enrol/redeem":{"post":{"tags":["Worker Keys"],"summary":"Redeem Enrol Token","description":"Redeem an enrolment token for a freshly-minted worker key. **Unauthenticated\nby design** — the token IS the credential (like a GitHub runner registration\ntoken), so install.sh can call this from a bare `curl | sh` with no login.\n\nThe claim is atomic and single-use: the token is marked consumed in the same\n``UPDATE`` that selects it, so a leaked token can't be replayed and two\nconcurrent redeems can't both mint a key. The token is high-entropy (256-bit)\nand short-lived, so brute force is infeasible.","operationId":"redeem_enrol_token_api_v1_worker_keys_enrol_redeem_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemEnrolTokenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemedEnrolTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/worker-keys/{key_id}":{"delete":{"tags":["Worker Keys"],"summary":"Revoke Worker Key","operationId":"revoke_worker_key_api_v1_worker_keys__key_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/worker/web-search":{"post":{"tags":["Worker Web Search"],"summary":"Worker Web Search","operationId":"worker_web_search_api_v1_worker_web_search_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebSearchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/worker/catalogue":{"get":{"tags":["Worker Catalogue"],"summary":"Worker Catalogue","description":"Return the catalogue scoped to the authenticated worker's org.\n\nIncludes the org's ``per_org`` models on top of the public 'enabled' set, so\na bespoke model enrolled for the org is installable via the CLI. ``disabled``\nmodels are never returned. 401 if the worker JWT is missing or invalid.","operationId":"worker_catalogue_api_v1_worker_catalogue_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/worker/install-notice":{"get":{"tags":["Worker Catalogue"],"summary":"Worker Install Notice","description":"The console's install notice for the CLI (``pendra models install``):\nanother quant of this model already installed in the worker's org, online or\noffline. ``{\"notice\": {...} | null}``. Authenticated like the catalogue.","operationId":"worker_install_notice_api_v1_worker_install_notice_get","parameters":[{"name":"model_id","in":"query","required":true,"schema":{"type":"string","description":"The variant id being installed","title":"Model Id"},"description":"The variant id being installed"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Worker Install Notice Api V1 Worker Install Notice Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/worker/catalogue/resolve":{"get":{"tags":["Worker Catalogue"],"summary":"Worker Catalogue Resolve","description":"The catalogue build ``pendra models install <name>`` installs.\n\n*name* resolves as a request's model string does (``catalogue_store.\nresolve_name``): a current id, a variant UUID, a former id\n(``previous_ids``) or ``family:size:quant`` is that build; a stem\n(``qwen3.8:27b``) is the recommended build of that model and size\n(``is_default``). A name spanning several models (a bare family with more\nthan one size) names no single build. Only builds the worker's org may see\nand install are considered (the same set ``GET /worker/catalogue`` returns).\n404 ``Model not found`` otherwise; 401 like the catalogue.","operationId":"worker_catalogue_resolve_api_v1_worker_catalogue_resolve_get","parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":256,"description":"A model name as typed","title":"Name"},"description":"A model name as typed"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolvedVariant"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workers/{worker_id}/models":{"post":{"tags":["worker-model-jobs"],"summary":"Install Model","operationId":"install_model_api_v1_workers__worker_id__models_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelInstallRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workers/{worker_id}/models/{model_id}":{"delete":{"tags":["worker-model-jobs"],"summary":"Uninstall Model","operationId":"uninstall_model_api_v1_workers__worker_id__models__model_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workers/{worker_id}/models/{model_id}/serving":{"post":{"tags":["worker-model-jobs"],"summary":"Set Model Serving","description":"Turn serving on or off for one installed model.\n\nTurning it off stops requests for this model being routed to this worker —\nthey go to another worker that has it, or fail as if the model weren't\ninstalled. The weights stay on disk, so turning it back on is instant, with\nno multi-GB re-download. Use it to take one box out of rotation for a model\nthat misbehaves on its GPU, or to drain a model's traffic before\nmaintenance.\n\nTurning it off also frees the model's memory: it is evicted and un-kept-warm\n(keep-warm is not restored when you turn serving back on).\n\nOwner or operator. Catalogue-independent: the toggle resolves off what the worker\nactually hosts (so a de-listed model is still adjustable), and is applied\ninstantly by the worker — there's no progress row, just an ack and a\nre-advertisement of the model.","operationId":"set_model_serving_api_v1_workers__worker_id__models__model_id__serving_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServingToggleRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workers/{worker_id}/models/{model_id}/mtp":{"post":{"tags":["worker-model-jobs"],"summary":"Set Model Mtp","description":"Turn MTP (Multi-Token Prediction speculative decoding) on or off for one\ninstalled model.\n\nWhen on, and the model has a paired draft file in the worker's models\ndirectory, generation is sped up by proposing several tokens at once and\nverifying them in one pass. Every emitted token is the full model's own\nchoice, never the draft's — but the text is not guaranteed byte-for-byte\nidentical to decoding with the setting off, because the verify pass reads\nits scores from a batched decode rather than the one-token-at-a-time decode\nnormal generation performs (issue #1830). Off by default per model.\n\nOwner or operator. Catalogue-independent: the toggle resolves off what the worker\nactually hosts, and is applied instantly by the worker — there's no progress\nrow, just an ack and a re-advertisement of the model's capabilities.","operationId":"set_model_mtp_api_v1_workers__worker_id__models__model_id__mtp_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MtpToggleRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workers/{worker_id}/models/{model_id}/load":{"post":{"tags":["worker-model-jobs"],"summary":"Load Model","description":"Load one installed model into memory and keep it warm.\n\nNormally a model is loaded into VRAM lazily on its first request — a \"cold\nstart\" that can take many seconds for a large model. This loads it now,\nwithout sending a request, and pins it so the worker won't evict it under\nmemory pressure, so the first real request is fast. Reverse it with the\nunload endpoint.\n\nOwner or operator. Catalogue-independent: resolves off what the worker actually\nhosts. Applied instantly by the worker — no progress row, just an ack; the\n\"Kept warm\" badge follows via the worker's pinned-models push.","operationId":"load_model_api_v1_workers__worker_id__models__model_id__load_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workers/{worker_id}/models/{model_id}/unload":{"post":{"tags":["worker-model-jobs"],"summary":"Unload Model","description":"Unload one kept-warm model from memory (un-pin + free its VRAM).\n\nThe model stays installed on disk — only its in-memory copy is released, and\nit will no longer be re-warmed on worker restart. Owner or operator; applied\ninstantly with no progress row.","operationId":"unload_model_api_v1_workers__worker_id__models__model_id__unload_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workers/{worker_id}/model-jobs/{job_id}/cancel":{"post":{"tags":["worker-model-jobs"],"summary":"Cancel Model Job","description":"Cancel an in-flight model install/uninstall (owner or operator).","operationId":"cancel_model_job_api_v1_workers__worker_id__model_jobs__job_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workers/{worker_id}/model-jobs/{job_id}/resume":{"post":{"tags":["worker-model-jobs"],"summary":"Resume Model Job","description":"Manually resume an interrupted/failed model install (owner or operator).","operationId":"resume_model_job_api_v1_workers__worker_id__model_jobs__job_id__resume_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workers/{worker_id}/model-jobs/{job_id}":{"delete":{"tags":["worker-model-jobs"],"summary":"Delete Model Job","description":"Delete a terminal (failed/completed) model-job row (owner or operator).","operationId":"delete_model_job_api_v1_workers__worker_id__model_jobs__job_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","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/workers/{worker_id}/model-jobs":{"get":{"tags":["worker-model-jobs"],"summary":"List Model Jobs","operationId":"list_model_jobs_api_v1_workers__worker_id__model_jobs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["queued","running","success","error","interrupted","active"],"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ModelJob"},"title":"Response List Model Jobs Api V1 Workers  Worker Id  Model Jobs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workers/{worker_id}/models/{model_id}/config":{"patch":{"tags":["worker-model-jobs"],"summary":"Update Model Config","description":"Pin (or clear) the chat context window for a SINGLE model on a worker\n(owner or operator). 0 = Auto. The worker persists the per-model pin and applies\nit on that model's next request, then echoes the value back via\n``config_update_result`` (handled in gpu_ws.py). 202 means the change was\ndispatched, not that the worker has finished applying it.","operationId":"update_model_config_api_v1_workers__worker_id__models__model_id__config_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerConfigUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workers/{worker_id}/models/{model_id}/idle-timeout":{"patch":{"tags":["worker-model-jobs"],"summary":"Update Model Idle Timeout","description":"Set (or clear) the idle-unload window for a SINGLE model on a worker\n(owner or operator). 0 = off. When set, the worker unloads the model from the\nGPU after that many minutes without a request, freeing VRAM until the next\nrequest reloads it. This is an ADVANCED OVERRIDE of the worker-wide idle\ndefault — it is NOT mutually exclusive with Keep warm (a kept-warm model\nignores the timeout while it stays pinned). The worker persists it and echoes\nthe value back via ``idle_timeout_update_result`` (handled in gpu_ws.py). 202\nmeans the change was dispatched, not applied.","operationId":"update_model_idle_timeout_api_v1_workers__worker_id__models__model_id__idle_timeout_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdleTimeoutUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workers/{worker_id}/idle-default":{"patch":{"tags":["worker-model-jobs"],"summary":"Update Worker Idle Default","description":"Set (or clear) the worker-WIDE idle-unload default (owner or operator).\n0 = off. When set, every served model without its own per-model override is\nunloaded from the GPU after that many minutes without a request, freeing VRAM\nuntil the next request reloads it. The worker persists it and echoes the\neffective value back via ``worker_idle_default_update_result`` (handled in\ngpu_ws.py). 202 means the change was dispatched, not applied.","operationId":"update_worker_idle_default_api_v1_workers__worker_id__idle_default_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerIdleDefaultUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workers/{worker_id}/kv-prefix-cache":{"patch":{"tags":["worker-model-jobs"],"summary":"Update Kv Prefix Cache","description":"Turn the worker-wide KV prefix cache on or off (owner or operator). The worker\npersists the toggle and applies it on the next chat request, then echoes the\nstate back via ``cache_policy_update_result`` (handled in gpu_ws.py). 202\nmeans the change was dispatched, not that the worker has finished applying\nit.","operationId":"update_kv_prefix_cache_api_v1_workers__worker_id__kv_prefix_cache_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KVPrefixCacheUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workers/{worker_id}/kv-disk-cache":{"patch":{"tags":["worker-model-jobs"],"summary":"Update Kv Disk Cache","description":"Turn the NVMe-backed tier of the KV prefix cache on or off (owner or\noperator). The worker persists the toggle and applies it on the next chat\nrequest, then echoes the state — and the cache's current size on disk — back\nvia ``kv_disk_cache_update_result`` (handled in gpu_ws.py). 202 means the\nchange was dispatched, not that the worker has finished applying it.","operationId":"update_kv_disk_cache_api_v1_workers__worker_id__kv_disk_cache_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KVDiskCacheUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workers/{worker_id}/kv-cache-precision":{"patch":{"tags":["worker-model-jobs"],"summary":"Update Kv Cache Precision","description":"Change the K/V element type the worker builds contexts with (owner or\noperator). The worker persists it and applies it from the next chat request,\nrebuilding any context whose KV layout no longer matches, then echoes the\nprecision now IN EFFECT via ``kv_cache_precision_update_result``.\n\n\"auto\" is refused (409) for a worker too old to understand it, which would\nstore it as an explicit f16. Per model, the runtime still refuses a quantized\ncache for hybrid/recurrent models (their KV is priced from a measured\nallocation, which quantizing would desync) and falls back to f16 whenever a\ncontext can't be built at it. 202 means dispatched, not applied.\n\nGated behind the ``worker_kv_precision`` feature flag: a non-enrolled org\ngets a 404, matching the frontend, which hides the control when the flag is\noff.","operationId":"update_kv_cache_precision_api_v1_workers__worker_id__kv_cache_precision_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KVCachePrecisionUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workers/{worker_id}/kv-disk-cache-max-gb":{"patch":{"tags":["worker-model-jobs"],"summary":"Update Kv Disk Cache Max Gb","description":"Set the NVMe KV cache's disk-size cap in GB (owner or operator). The\nworker persists the cap and applies it on the next chat request, then echoes\nit back via ``kv_disk_cache_max_gb_update_result`` (handled in gpu_ws.py).\n202 means the change was dispatched, not that the worker has finished\napplying it.","operationId":"update_kv_disk_cache_max_gb_api_v1_workers__worker_id__kv_disk_cache_max_gb_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KVDiskCacheMaxGBUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workers/{worker_id}/kv-ram-cache":{"patch":{"tags":["worker-model-jobs"],"summary":"Update Kv Ram Cache","description":"Set the RAM KV cache's share of the worker's memory (owner or operator).\n``percent: null`` returns it to automatic. The worker applies it at once and\nechoes it via ``kv_ram_cache_update_result`` (handled in gpu_ws.py); 202\nmeans dispatched, not applied. Pendra-operated workers are locked like every\nother setting (``_reject_if_managed``).","operationId":"update_kv_ram_cache_api_v1_workers__worker_id__kv_ram_cache_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KVRAMCacheUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workers/{worker_id}/tool-grammar":{"patch":{"tags":["worker-model-jobs"],"summary":"Update Tool Grammar","description":"Turn the worker-wide tool grammar on or off (owner or operator). The worker\npersists the toggle and applies it on the next chat request, then echoes the\nstate back via ``tool_grammar_update_result`` (handled in gpu_ws.py). 202\nmeans the change was dispatched, not that the worker has finished applying\nit.\n\nGated behind the ``worker_tool_grammar`` feature flag: the toggle can crash\nthe worker on some models/toolsets, so it's only available to enrolled orgs.\nA non-enrolled org gets a 404 (the capability simply doesn't exist for them),\nmatching the frontend, which hides the toggle when the flag is off.","operationId":"update_tool_grammar_api_v1_workers__worker_id__tool_grammar_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolGrammarUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workers/{worker_id}/spec-decode-cap":{"patch":{"tags":["worker-model-jobs"],"summary":"Update Spec Decode Cap","description":"Set the worker-wide speculative-decoding draft depth (owner or operator). The\nworker persists the cap and applies it on the next chat request, then echoes\nthe value back via ``spec_decode_cap_update_result`` (handled in gpu_ws.py).\n202 means the change was dispatched, not that the worker has finished\napplying it.","operationId":"update_spec_decode_cap_api_v1_workers__worker_id__spec_decode_cap_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpecDecodeCapUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workers/{worker_id}/speculative-decoding":{"patch":{"tags":["worker-model-jobs"],"summary":"Update Speculative Decoding","description":"Switch speculative decoding off for one worker, or back to automatic\n(owner or operator). The worker stores the setting, applies it from its next\nchat request with no restart, and echoes it back via\n``speculative_pin_update_result`` (handled in gpu_ws.py). 202 means the\nchange was dispatched, not that the worker has finished applying it.\n\nThis is the organisation's own switch, the one ``policies.json`` calls\n``speculative_decoding_disabled``. It can only take speculation away: \"auto\"\nnever lifts the switch Pendra holds for a worker (``speculative_mode`` reads\n``off_by_pendra``). While Pendra's is set the choice is still stored, and\napplies once Pendra lifts it.\n\n409 for a worker whose version does not take the setting.","operationId":"update_speculative_decoding_api_v1_workers__worker_id__speculative_decoding_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeculativeDecodingUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workers/{worker_id}/vision-remote-images":{"patch":{"tags":["worker-model-jobs"],"summary":"Update Vision Remote Images","description":"Turn worker-wide remote-image fetching on or off (owner or operator). The worker\npersists the toggle and applies it on the next vision request, then echoes\nthe state back via ``vision_remote_images_update_result`` (handled in\ngpu_ws.py). 202 means the change was dispatched, not that the worker has\nfinished applying it.","operationId":"update_vision_remote_images_api_v1_workers__worker_id__vision_remote_images_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisionRemoteImagesUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workers/{worker_id}/web-tools":{"patch":{"tags":["worker-model-jobs"],"summary":"Update Web Tools","description":"Turn the worker-wide hosted web tools (web_fetch / web_search) on or off\n(owner or operator). The worker persists the toggle and applies it on the next chat\nrequest, then echoes the state back via ``web_tools_update_result`` (handled\nin gpu_ws.py). 202 means the change was dispatched, not that the worker has\nfinished applying it.","operationId":"update_web_tools_api_v1_workers__worker_id__web_tools_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebToolsUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workers/{worker_id}/task-timeout":{"patch":{"tags":["worker-model-jobs"],"summary":"Update Task Timeout","description":"Set the worker-wide non-streaming task timeout (owner or operator). The worker\npersists the ceiling and applies it on the next non-streaming task, then\nechoes the value back via ``task_timeout_update_result`` (handled in\ngpu_ws.py). 202 means the change was dispatched, not that the worker has\nfinished applying it.","operationId":"update_task_timeout_api_v1_workers__worker_id__task_timeout_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskTimeoutUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workers/{worker_id}/max-concurrent":{"patch":{"tags":["worker-model-jobs"],"summary":"Update Max Concurrent","description":"Set the worker-wide max concurrent requests cap (owner or operator). The worker\npersists the cap and resizes its task semaphore live, then echoes the value\nback via ``max_concurrent_update_result`` (handled in gpu_ws.py), which also\nupdates the API's routing capacity for the worker. 202 means the change was\ndispatched, not that the worker has finished applying it.","operationId":"update_max_concurrent_api_v1_workers__worker_id__max_concurrent_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaxConcurrentUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workers/{worker_id}/requests":{"patch":{"tags":["worker-model-jobs"],"summary":"Update Requests","description":"Set \"Requests at once\" (owner or operator): ``{\"mode\": \"automatic\"}``\nlets the worker choose how many requests each model runs at once, and\n``{\"mode\": \"limit\", \"limit\": N}`` caps it at N. 409 when Automatic is asked\nof a worker too old to run it. 202 means the change was dispatched, not that\nthe worker has applied it. ``PATCH /max-concurrent`` stays for scripts and\nmeans the same as a limit.","operationId":"update_requests_api_v1_workers__worker_id__requests_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestsUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workers/{worker_id}/name":{"patch":{"tags":["worker-model-jobs"],"summary":"Update Worker Name","description":"Rename a worker from the console (owner or operator). The name is pushed down to\nthe worker, which persists it locally and echoes it back via\n``worker_name_update_result`` (handled in gpu_ws.py), where the API reflects\nit into the registry so the dashboard updates without a reconnect — and the\nworker reports the new name on every subsequent connect. 202 means the\nchange was dispatched, not that the worker has finished applying it.\n\nNot feature-flag gated: renaming ships on for every org.","operationId":"update_worker_name_api_v1_workers__worker_id__name_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerNameUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workers/{worker_id}/batching":{"patch":{"tags":["worker-model-jobs"],"summary":"Update Batching","description":"Change per-worker batching settings (owner or operator) — the on/off\ntoggle, the cap on how many accepted requests run together, or both. The worker\npersists the toggle and applies it live, then echoes the state back via\n``batching_update_result`` (handled in gpu_ws.py), which refreshes the\ndashboard's display. 202 means the change was dispatched, not that the worker\nhas finished applying it.\n\nGated behind the ``worker_continuous_batching`` feature flag: a non-enrolled\norg gets a 404, matching the frontend, which hides the control when the flag\nis off.","operationId":"update_batching_api_v1_workers__worker_id__batching_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchingUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/compute/models":{"get":{"tags":["Compute"],"summary":"Gpu Rentable Models","description":"Catalogue models the org can start a rental with, one option per size.\n\nOptional on the rent page. Each entry is a (model, parameter size) — the size\nrides on the name so the precision picker beside it only has to offer\nquantizations, not size×quant. Picking one filters the GPU cards to those\nthat can run it and pre-installs it. Sourced from the same visibility-filtered\ncatalogue as model installs, so an org only sees what it may use.","operationId":"gpu_rentable_models_api_v1_compute_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ComputeModelOut"},"type":"array","title":"Response Gpu Rentable Models Api V1 Compute Models Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/compute/catalogue":{"get":{"tags":["Compute"],"summary":"Gpu Catalogue","description":"GPU models the org can rent, priced per jurisdiction tier.\n\nOne entry per GPU model rather than per offering: the customer chooses what\nhardware they want and where it may run, not who supplies it. A tier appears\nonly if it has a price AND at least one offering this org could actually be\nplaced on, so we never advertise a tier we can't serve.","operationId":"gpu_catalogue_api_v1_compute_catalogue_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CatalogueEntryOut"},"type":"array","title":"Response Gpu Catalogue Api V1 Compute Catalogue Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/compute/instances":{"get":{"tags":["Compute"],"summary":"List Instances","operationId":"list_instances_api_v1_compute_instances_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RentalOut"},"type":"array","title":"Response List Instances Api V1 Compute Instances Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Compute"],"summary":"Rent Instance","operationId":"rent_instance_api_v1_compute_instances_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RentInstanceRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RentalOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/compute/instances/{rental_id}":{"get":{"tags":["Compute"],"summary":"Get Instance","operationId":"get_instance_api_v1_compute_instances__rental_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rental_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rental Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RentalOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Compute"],"summary":"Stop Instance","operationId":"stop_instance_api_v1_compute_instances__rental_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rental_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rental Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RentalOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/compute/spend":{"get":{"tags":["Compute"],"summary":"Get Spend","description":"This calendar month's GPU-rental bill, broken down per instance.\n\nSame basis as `_month_to_date_cost` (which gates provisioning): the\nfinalised usage ledger plus the un-metered live tail of anything still\nrunning, so the figure here can't disagree with the budget check.","operationId":"get_spend_api_v1_compute_spend_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendOut"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/compute/instances/{rental_id}/audit":{"get":{"tags":["Compute"],"summary":"Get Instance Audit","description":"Evidence of where a rental ran and what jurisdiction guarantee applied.\n\nA UK-Sovereign customer is buying a claim, and a claim they can't verify is\nworth very little — so this exposes the operator, its legal entity and\ndomicile, the region, and the exact tier rule version and catalogue revision\nin force at placement time.","operationId":"get_instance_audit_api_v1_compute_instances__rental_id__audit_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rental_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rental Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlacementAuditOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/compute/settings":{"get":{"tags":["Compute"],"summary":"Get Settings","operationId":"get_settings_api_v1_compute_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RentalSettingsOut"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["Compute"],"summary":"Update Settings","operationId":"update_settings_api_v1_compute_settings_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSettingsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RentalSettingsOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/compute/provision-log":{"post":{"tags":["Compute"],"summary":"Provision Log","description":"Store a rented VM's boot log against its live rental (token-authenticated).","operationId":"provision_log_api_v1_compute_provision_log_post","parameters":[{"name":"rental_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Rental Id"}},{"name":"phase","in":"query","required":false,"schema":{"type":"string","default":"","title":"Phase"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/compute/attestation":{"post":{"tags":["Compute"],"summary":"Attestation","description":"Verify a confidential rental's machine (token-authenticated).\n\nThe boot stage posts its evidence and waits for the verdict: it marks the GPU\nready and starts the worker only on ``{\"verdict\": \"verified\"}``. The verdict\nis recorded once, and a repeat post (an answer lost on the way back) gets\nthe recorded one, so the nonce is spent on the first check. A chip maker's\nservice failing to answer is a 503 the stage retries, never a verdict.","operationId":"attestation_api_v1_compute_attestation_post","parameters":[{"name":"rental_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","title":"Rental Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Attestation Api V1 Compute Attestation Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/contact":{"post":{"tags":["contact"],"summary":"Submit Contact","operationId":"submit_contact_api_v1_contact_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/contact/public":{"post":{"tags":["contact"],"summary":"Submit Public Contact","operationId":"submit_public_contact_api_v1_contact_public_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicContactRequest"}}},"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/billing/status":{"get":{"tags":["billing"],"summary":"Billing Status","description":"Return the current org's subscription plan and worker usage.","operationId":"billing_status_api_v1_billing_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingStatusResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/billing/checkout":{"post":{"tags":["billing"],"summary":"Create Checkout","description":"Create a Stripe Checkout Session for a subscription upgrade.","operationId":"create_checkout_api_v1_billing_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/billing/portal":{"post":{"tags":["billing"],"summary":"Create Portal","description":"Create a Stripe Billing Portal session for subscription management.","operationId":"create_portal_api_v1_billing_portal_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/billing/setup-card":{"post":{"tags":["billing"],"summary":"Setup Card","description":"Stripe Checkout in ``setup`` mode to add a card without charging it — the\ncard a customer must have on file before renting an on-demand GPU.\n\nThe Session is bound to the org's own Stripe customer (created here if needed).\nPassing ``customer_email`` alone does NOT create or attach a customer, so the\nsaved card would have nowhere to live and be silently discarded — the card had\nto attach to a concrete ``customer`` for setup mode to save it at all.","operationId":"setup_card_api_v1_billing_setup_card_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"return_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/payment-method":{"get":{"tags":["billing"],"summary":"Payment Method","description":"Whether the org has a card on file (the wallet UI: top-ups and auto top-up).\nReadable by any org member — the wallet is shown to everyone; only owners\ncan add a card or top up.","operationId":"payment_method_api_v1_billing_payment_method_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethodResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/billing/wallet/topup":{"post":{"tags":["billing"],"summary":"Wallet Topup","description":"Stripe Checkout in ``payment`` mode to buy wallet credit, between\n``settings.min_topup_gbp`` and ``settings.max_topup_gbp``. The card is saved for future off-session use, so a\nfirst top-up also establishes card-on-file. The wallet is credited by the\nwebhook on ``checkout.session.completed`` (idempotent on the payment intent).","operationId":"wallet_topup_api_v1_billing_wallet_topup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/billing/credits":{"get":{"tags":["billing"],"summary":"Get Credits","description":"The org's wallet + free-credit balances (shown separately) and recent ledger.\nReadable by any org member — the wallet is visible to everyone; only owners can\nadd a card or top up (those endpoints stay owner-only).","operationId":"get_credits_api_v1_billing_credits_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/billing/preferences":{"get":{"tags":["billing"],"summary":"Get Billing Preferences","description":"The org's auto top-up + low-balance-warning settings. Readable by any member\n(owners configure them; everyone can see how they're set).","operationId":"get_billing_preferences_api_v1_billing_preferences_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingPreferences"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["billing"],"summary":"Update Billing Preferences","description":"Set auto top-up + low-balance warning. **Owner-only** — moving money (auto top-up\ncharges the saved card off-session) is an owner action, like adding a card or\ntopping up.\n\nValidates that, when auto top-up is on, both a threshold and an amount are set and\nthe amount is within the same bounds as a manual top-up (``min_topup_gbp`` …\n``max_topup_gbp``).","operationId":"update_billing_preferences_api_v1_billing_preferences_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingPreferences"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingPreferences"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/billing/wallet/topup-request":{"post":{"tags":["billing"],"summary":"Request Topup","description":"An operator (or member) asks the org's owners to top up — only owners can add a\ncard or charge one, so this just emails them. Deduped per requester so a keen\noperator can't spam the owners.","operationId":"request_topup_api_v1_billing_wallet_topup_request_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopupRequestNotice"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/billing/invoices":{"get":{"tags":["billing"],"summary":"List Invoices","description":"List recent invoices for the current org from Stripe.","operationId":"list_invoices_api_v1_billing_invoices_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/InvoiceResponse"},"type":"array","title":"Response List Invoices Api V1 Billing Invoices Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/billing/webhook":{"post":{"tags":["billing"],"summary":"Stripe Webhook","description":"Handle Stripe webhook events to sync subscription state.","operationId":"stripe_webhook_api_v1_billing_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/billing/email":{"get":{"tags":["billing"],"summary":"Get Email","description":"Where invoices and receipts go, plus any change waiting to be confirmed.","operationId":"get_email_api_v1_billing_email_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingEmailResponse"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["billing"],"summary":"Request Change","description":"Ask to send invoices to a new address.\n\n202 with ``pending`` set: a confirmation link went to the new address and\nnothing changes until it's clicked. 200: the address was the caller's own\nverified login email, so it applied at once.","operationId":"request_change_api_v1_billing_email_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingEmailUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingEmailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/billing/email/pending":{"delete":{"tags":["billing"],"summary":"Cancel Change","description":"Cancel the change waiting for confirmation, if any. Its link stops working.","operationId":"cancel_change_api_v1_billing_email_pending_delete","responses":{"204":{"description":"Successful Response"}},"security":[{"HTTPBearer":[]}]}},"/api/v1/billing/email/confirm/preview":{"post":{"tags":["billing"],"summary":"Preview Confirmation","description":"What a confirmation link would do, without doing it. Public: the person\nholding the link may not have a Pendra account.","operationId":"preview_confirmation_api_v1_billing_email_confirm_preview_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmPreview"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/email/confirm":{"post":{"tags":["billing"],"summary":"Confirm Change","description":"Confirm a change from its emailed link. Public, token only.","operationId":"confirm_change_api_v1_billing_email_confirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/logout":{"post":{"tags":["session"],"summary":"Logout","description":"Revoke the current session so the JWT is rejected on future requests.","operationId":"logout_api_v1_auth_logout_post","responses":{"204":{"description":"Successful Response"}},"security":[{"HTTPBearer":[]}]}},"/api/v1/me/deletion-blockers":{"get":{"tags":["session"],"summary":"Deletion Blockers","description":"The orgs that stop the caller deleting their account, so the console can\nsay what to do before asking them to confirm. Empty when nothing blocks.","operationId":"deletion_blockers_api_v1_me_deletion_blockers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/me":{"delete":{"tags":["session"],"summary":"Delete Me","description":"Delete the caller's account. 409 while they still own an organisation.","operationId":"delete_me_api_v1_me_delete","responses":{"204":{"description":"Successful Response"}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/activity":{"post":{"tags":["session"],"summary":"Record Activity","description":"Record that the signed-in user is using the console right now.\n\nThe console calls this while someone is interacting with it (clicks, typing,\nnavigation, returning to the tab), not from its background polling, so\n``user_activity.last_active_at`` reflects real use rather than an idle tab.\nThe admin console shows it as \"Last active\".","operationId":"record_activity_api_v1_auth_activity_post","responses":{"204":{"description":"Successful Response"}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/me":{"get":{"tags":["Admin"],"summary":"Admin Me","description":"Self-introspection. Deliberately scope-free — this is how a caller\ndiscovers what its own credential can do, so it must work for every key.\n\n``scopes`` is resolved through the same ``scopes_of`` the enforcement path\nuses, so this can never disagree with ``require_admin_scope``.","operationId":"admin_me_api_v1_admin_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminMeResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/stats":{"get":{"tags":["Admin"],"summary":"Admin Stats","operationId":"admin_stats_api_v1_admin_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformStats"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/metrics/engagement":{"get":{"tags":["Admin"],"summary":"Admin Engagement Metrics","operationId":"admin_engagement_metrics_api_v1_admin_metrics_engagement_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EngagementMetrics"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/metrics/signup-survey":{"get":{"tags":["Admin"],"summary":"Admin Signup Survey Summary","description":"Who's signing up: the signup answers across every org, over a window.","operationId":"admin_signup_survey_summary_api_v1_admin_metrics_signup_survey_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupSurveySummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/metrics/hosted-api-interest":{"get":{"tags":["Admin"],"summary":"Admin Hosted Api Interest","description":"Who asked to be told about a hosted API (\"Alert me\" on the console).\n\nLists user emails, so it needs `users:read` rather than `platform:read`.","operationId":"admin_hosted_api_interest_api_v1_admin_metrics_hosted_api_interest_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HostedApiInterestList"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/usage/summary":{"get":{"tags":["Admin"],"summary":"Admin Usage Summary","description":"Platform-wide usage totals for the last `days` UTC days (today is partial):\nrequests, errors, tokens, images, audio, active orgs and models, plus the\nsame-length previous window for a like-for-like delta.","operationId":"admin_usage_summary_api_v1_admin_usage_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/usage/timeseries":{"get":{"tags":["Admin"],"summary":"Admin Usage Timeseries","description":"Platform-wide usage per UTC day or hour, zero-filled. Ungrouped, each\npoint carries requests, errors and tokens. With `group_by` (and the `metric`\nto rank and plot), each point carries the top 5 groups plus `other`.","operationId":"admin_usage_timeseries_api_v1_admin_usage_timeseries_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}},{"name":"granularity","in":"query","required":false,"schema":{"enum":["day","hour"],"type":"string","default":"day","title":"Granularity"}},{"name":"group_by","in":"query","required":false,"schema":{"anyOf":[{"enum":["model","org"],"type":"string"},{"type":"null"}],"title":"Group By"}},{"name":"metric","in":"query","required":false,"schema":{"anyOf":[{"enum":["requests","tokens"],"type":"string"},{"type":"null"}],"title":"Metric"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/usage/breakdown":{"get":{"tags":["Admin"],"summary":"Admin Usage Breakdown","description":"Platform-wide usage ranked by model and by organisation (top `limit`\neach), plus a split by request type, for the last `days` UTC days.","operationId":"admin_usage_breakdown_api_v1_admin_usage_breakdown_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}},{"name":"sort","in":"query","required":false,"schema":{"enum":["tokens","requests"],"type":"string","default":"tokens","title":"Sort"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/usage/errors":{"get":{"tags":["Admin"],"summary":"Admin Usage Errors","description":"Failed requests across every organisation for the last `days` UTC days,\nsplit into client errors (4xx) and system errors (5xx): totals per class\nand per code against the previous window, a zero-filled series (hourly up\nto 7 days, daily beyond), and the top sources and messages.","operationId":"admin_usage_errors_api_v1_admin_usage_errors_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":7,"title":"Days"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(?:[45]xx|[45]\\d\\d)$"},{"type":"null"}],"description":"Narrow the points, sources and messages to 4xx, 5xx or one code","title":"Status"},"description":"Narrow the points, sources and messages to 4xx, 5xx or one code"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/search":{"get":{"tags":["Admin"],"summary":"Admin Search","operationId":"admin_search_api_v1_admin_search_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SearchResult"},"title":"Response Admin Search Api V1 Admin Search Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/admins":{"get":{"tags":["Admin"],"summary":"List Admins","operationId":"list_admins_api_v1_admin_admins_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AdminUserSummary"},"type":"array","title":"Response List Admins Api V1 Admin Admins Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/orgs":{"get":{"tags":["Admin"],"summary":"List Orgs","operationId":"list_orgs_api_v1_admin_orgs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"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"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminOrgSummary"},"title":"Response List Orgs Api V1 Admin Orgs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin"],"summary":"Create Org","operationId":"create_org_api_v1_admin_orgs_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/routers__admin__CreateOrgRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrgDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orgs/{org_id}":{"get":{"tags":["Admin"],"summary":"Get Org","operationId":"get_org_api_v1_admin_orgs__org_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrgDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Admin"],"summary":"Update Org","operationId":"update_org_api_v1_admin_orgs__org_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/routers__admin__UpdateOrgRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrgDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete Org","description":"Delete an org as its owner would (``org_deletion``): stop its rented\nGPUs, cancel its subscription, keep its billing records.\n\n``staff_confirmed_shutdown``: when the provider can't confirm a rented\nmachine is gone (502, ``rental_shutdown_unconfirmed``), staff who have\nchecked by hand can record it and finish the delete.","operationId":"delete_org_api_v1_admin_orgs__org_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"staff_confirmed_shutdown","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Staff Confirmed Shutdown"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orgs/{org_id}/members":{"get":{"tags":["Admin"],"summary":"List Org Members","operationId":"list_org_members_api_v1_admin_orgs__org_id__members_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminMember"},"title":"Response List Org Members Api V1 Admin Orgs  Org Id  Members Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orgs/{org_id}/members/{user_id}":{"get":{"tags":["Admin"],"summary":"Get Org Member","operationId":"get_org_member_api_v1_admin_orgs__org_id__members__user_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminMemberDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Remove Org Member","description":"Remove a member from an organisation (support action).\n\nMirrors the console's owner-only remove_member guards: the primary owner,\nthe last member, and the last remaining owner are all protected so support\ncan't orphan an org with zero owners or zero members. The user's account\nitself is untouched — this only drops their membership of this org.","operationId":"remove_org_member_api_v1_admin_orgs__org_id__members__user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orgs/{org_id}/members/{user_id}/role":{"patch":{"tags":["Admin"],"summary":"Change Member Role","operationId":"change_member_role_api_v1_admin_orgs__org_id__members__user_id__role_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeRoleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeRoleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orgs/{org_id}/members/{user_id}/mfa":{"delete":{"tags":["Admin"],"summary":"Reset Member Mfa","operationId":"reset_member_mfa_api_v1_admin_orgs__org_id__members__user_id__mfa_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orgs/{org_id}/members/{user_id}/admin":{"put":{"tags":["Admin"],"summary":"Set Member Admin","operationId":"set_member_admin_api_v1_admin_orgs__org_id__members__user_id__admin_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetAdminRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/users/{user_id}/block":{"put":{"tags":["Admin"],"summary":"Block User","operationId":"block_user_api_v1_admin_users__user_id__block_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlockUserRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/users/{user_id}":{"delete":{"tags":["Admin"],"summary":"Delete User","operationId":"delete_user_api_v1_admin_users__user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Admin"],"summary":"Get User","operationId":"get_user_api_v1_admin_users__user_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/users":{"get":{"tags":["Admin"],"summary":"List Users","operationId":"list_users_api_v1_admin_users_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminUserListItem"},"title":"Response List Users Api V1 Admin Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/users/{user_id}/login-history":{"get":{"tags":["Admin"],"summary":"List User Login History","operationId":"list_user_login_history_api_v1_admin_users__user_id__login_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LoginEvent"},"title":"Response List User Login History Api V1 Admin Users  User Id  Login History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/users/{user_id}/invites":{"get":{"tags":["Admin"],"summary":"List User Invites","description":"List every org invitation addressed to this user's email — pending and\nexpired alike, newest first.\n\nInvitations are keyed by email (basejump.invitations has no user_id), so we\nmatch the user's email case-insensitively against the invite email. A user\nwith no email (or no matching invites) yields an empty list.\n``pending``/``expires_at`` are derived from ``created_at`` exactly as the\norg-facing route does, since the table has no status/expiry column.","operationId":"list_user_invites_api_v1_admin_users__user_id__invites_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminUserInvite"},"title":"Response List User Invites Api V1 Admin Users  User Id  Invites Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/users/{user_id}/admin":{"put":{"tags":["Admin"],"summary":"Set User Admin","operationId":"set_user_admin_api_v1_admin_users__user_id__admin_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetAdminRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/users/{user_id}/mfa":{"delete":{"tags":["Admin"],"summary":"Reset User Mfa","operationId":"reset_user_mfa_api_v1_admin_users__user_id__mfa_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orgs/{org_id}/workers":{"get":{"tags":["Admin"],"summary":"List Org Workers","operationId":"list_org_workers_api_v1_admin_orgs__org_id__workers_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org 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/orgs/{org_id}/workers/{worker_id}":{"delete":{"tags":["Admin"],"summary":"Delete Org Worker","description":"Delete an org's worker from the durable roster. Offline-only: a connected\nworker returns 409 (force-disconnect it first). 404 if no record exists.","operationId":"delete_org_worker_api_v1_admin_orgs__org_id__workers__worker_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Admin"],"summary":"Get Org Worker","description":"A single worker in the full ``AdminWorker`` shape (parity with the fleet\nlist rows). The admin worker-detail page polls this so status, live memory\nand the action buttons refresh, instead of re-pulling the entire\nplatform-wide fleet (``GET /admin/workers``) on every tick and mutation.","operationId":"get_org_worker_api_v1_admin_orgs__org_id__workers__worker_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminWorker"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers":{"get":{"tags":["Admin"],"summary":"List All Workers","operationId":"list_all_workers_api_v1_admin_workers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AdminWorker"},"type":"array","title":"Response List All Workers Api V1 Admin Workers Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/workers/{worker_id}/events":{"get":{"tags":["Admin"],"summary":"List Worker Events","operationId":"list_worker_events_api_v1_admin_workers__worker_id__events_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."},{"name":"event_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"CSV of event types to include","title":"Event Type"},"description":"CSV of event types to include"},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only return events at/after this ISO timestamp","title":"Since"},"description":"Only return events at/after this ISO timestamp"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminWorkerEvent"},"title":"Response List Worker Events Api V1 Admin Workers  Worker Id  Events Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orgs/{org_id}/workload-keys":{"get":{"tags":["Admin"],"summary":"List Org Workload Keys","description":"Private-inference workload public keys registered for an org, newest-seen\nfirst. Read-only support view. More than one row means multiple distinct\nkeys are/were live (a rotation, or the ``workload_key_conflict`` worker\nevent on the Activity log). Shown regardless of the org's feature-flag state.","operationId":"list_org_workload_keys_api_v1_admin_orgs__org_id__workload_keys_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminWorkloadKey"},"title":"Response List Org Workload Keys Api V1 Admin Orgs  Org Id  Workload Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orgs/{org_id}/events":{"get":{"tags":["Admin"],"summary":"List Org Worker Events","description":"Raw worker lifecycle events for **every** worker in an org, newest first.\n\nOrg-wide sibling of ``list_worker_events`` (the per-worker endpoint) — same\nrows and same ``transient`` display heuristic, just scoped by ``org_id``\nalone with no ``worker_id`` filter. Powers the admin org Workers-tab\nActivity log. No client-side coalescing: every row is returned as-is.","operationId":"list_org_worker_events_api_v1_admin_orgs__org_id__events_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"event_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"CSV of event types to include","title":"Event Type"},"description":"CSV of event types to include"},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only return events at/after this ISO timestamp","title":"Since"},"description":"Only return events at/after this ISO timestamp"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminWorkerEvent"},"title":"Response List Org Worker Events Api V1 Admin Orgs  Org Id  Events Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/requests":{"get":{"tags":["Admin"],"summary":"List Worker Requests","operationId":"list_worker_requests_api_v1_admin_workers__worker_id__requests_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminUsageLog"},"title":"Response List Worker Requests Api V1 Admin Workers  Worker Id  Requests Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Admin"],"summary":"Admin Update Requests","operationId":"admin_update_requests_api_v1_admin_workers__worker_id__requests_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestsUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orgs/{org_id}/usage":{"get":{"tags":["Admin"],"summary":"Get Org Usage","operationId":"get_org_usage_api_v1_admin_orgs__org_id__usage_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org 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/orgs/{org_id}/usage/logs":{"get":{"tags":["Admin"],"summary":"List Org Usage Logs","description":"Paginated, full-detail per-request usage logs for an org (newest first).","operationId":"list_org_usage_logs_api_v1_admin_orgs__org_id__usage_logs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminUsageLog"},"title":"Response List Org Usage Logs Api V1 Admin Orgs  Org Id  Usage Logs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orgs/{org_id}/worker-keys":{"get":{"tags":["Admin"],"summary":"List Org Worker Keys","operationId":"list_org_worker_keys_api_v1_admin_orgs__org_id__worker_keys_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminWorkerKey"},"title":"Response List Org Worker Keys Api V1 Admin Orgs  Org Id  Worker Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orgs/{org_id}/worker-keys/{key_id}":{"delete":{"tags":["Admin"],"summary":"Revoke Org Worker Key","operationId":"revoke_org_worker_key_api_v1_admin_orgs__org_id__worker_keys__key_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orgs/{org_id}/invite":{"post":{"tags":["Admin"],"summary":"Create Org Invite","operationId":"create_org_invite_api_v1_admin_orgs__org_id__invite_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/routers__admin__InviteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orgs/{org_id}/invites":{"get":{"tags":["Admin"],"summary":"List Org Invites","description":"List every invitation for an org — both pending and expired.\n\nUnlike the owner-facing route, this deliberately drops the 24h filter so\nsupport can see expired invites (which linger in the table until consumed or\nrevoked). ``pending``/``expires_at`` are derived from ``created_at`` since the\ntable has no status/expiry column.","operationId":"list_org_invites_api_v1_admin_orgs__org_id__invites_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminInvite"},"title":"Response List Org Invites Api V1 Admin Orgs  Org Id  Invites Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orgs/{org_id}/invites/{invite_id}":{"delete":{"tags":["Admin"],"summary":"Revoke Org Invite","operationId":"revoke_org_invite_api_v1_admin_orgs__org_id__invites__invite_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invite Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orgs/{org_id}/invites/{invite_id}/resend":{"post":{"tags":["Admin"],"summary":"Resend Org Invite","description":"Re-issue an invite so its 24h clock restarts (an expired one becomes\npending again) and re-send the email if it is addressed to one.\n\nThe invite is *replaced*, not updated: Basejump's BEFORE-UPDATE timestamp\ntrigger pins ``created_at`` to the old value, so the only way to reset the\nexpiry window is to delete the row and insert a fresh one. This also rotates\nthe token, invalidating the stale (and possibly already-emailed) link.","operationId":"resend_org_invite_api_v1_admin_orgs__org_id__invites__invite_id__resend_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invite Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminInvite"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orgs/{org_id}/workers/host":{"post":{"tags":["Admin"],"summary":"Host Worker","operationId":"host_worker_api_v1_admin_orgs__org_id__workers_host_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HostWorkerRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HostWorkerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orgs/{org_id}/api-keys":{"get":{"tags":["Admin"],"summary":"List Org Api Keys","operationId":"list_org_api_keys_api_v1_admin_orgs__org_id__api_keys_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminApiKey"},"title":"Response List Org Api Keys Api V1 Admin Orgs  Org Id  Api Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orgs/{org_id}/api-keys/{key_id}":{"delete":{"tags":["Admin"],"summary":"Revoke Org Api Key","operationId":"revoke_org_api_key_api_v1_admin_orgs__org_id__api_keys__key_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}":{"delete":{"tags":["Admin"],"summary":"Force Disconnect Worker","operationId":"force_disconnect_worker_api_v1_admin_workers__worker_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/health":{"post":{"tags":["Admin"],"summary":"Run Worker Health Check","description":"Trigger `health.Run` on the live worker over the existing WebSocket\nand return the structured Report. Mirrors `pendra doctor` but runs\non-demand from the admin dashboard so operators can probe a worker\nwithout shelling onto the host.","operationId":"run_worker_health_check_api_v1_admin_workers__worker_id__health_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/logs":{"get":{"tags":["Admin"],"summary":"Get Worker Logs","description":"Pull recent log lines from the live worker over the existing\nWebSocket and return them oldest-first. Mirrors the local\n`pendra status` log tail but runs on-demand from the admin dashboard\nso operators can debug a worker without shelling onto the host.\n\nWith no ``file``, the worker returns whatever it has retained in its\nin-memory ring buffer (so asking for more lines than the ring holds\nsimply returns the whole window). With ``file`` set to a name from the\n``/logs/files`` listing, the worker tails that specific rotated log file\nfrom disk — which survives a restart that would have wiped the ring.","operationId":"get_worker_logs_api_v1_admin_workers__worker_id__logs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."},{"name":"lines","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"minimum":1,"description":"How many of the most recent log lines to return. Capped at the worker's retained ring-buffer size.","default":500,"title":"Lines"},"description":"How many of the most recent log lines to return. Capped at the worker's retained ring-buffer size."},{"name":"file","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional rotated log file (base name from the /logs/files listing) to tail from disk instead of the live ring. Omit for the live ring.","title":"File"},"description":"Optional rotated log file (base name from the /logs/files listing) to tail from disk instead of the live ring. Omit for the live ring."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/logs/files":{"get":{"tags":["Admin"],"summary":"List Worker Log Files","description":"List the on-disk log files (the live file plus rotated backups)\navailable on the live worker, newest first. Each entry is\n``{name, size_bytes, modified_unix, current}``. The dashboard uses this\nto offer a session picker so an operator can read the log from before a\nrestart — pass a returned ``name`` to ``GET /workers/{id}/logs?file=``.","operationId":"list_worker_log_files_api_v1_admin_workers__worker_id__logs_files_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/kv-prefix-cache":{"patch":{"tags":["Admin"],"summary":"Admin Update Kv Prefix Cache","operationId":"admin_update_kv_prefix_cache_api_v1_admin_workers__worker_id__kv_prefix_cache_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KVPrefixCacheUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/kv-disk-cache":{"patch":{"tags":["Admin"],"summary":"Admin Update Kv Disk Cache","operationId":"admin_update_kv_disk_cache_api_v1_admin_workers__worker_id__kv_disk_cache_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KVDiskCacheUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/kv-ram-cache":{"patch":{"tags":["Admin"],"summary":"Admin Update Kv Ram Cache","operationId":"admin_update_kv_ram_cache_api_v1_admin_workers__worker_id__kv_ram_cache_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KVRAMCacheUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/kv-disk-cache-max-gb":{"patch":{"tags":["Admin"],"summary":"Admin Update Kv Disk Cache Max Gb","operationId":"admin_update_kv_disk_cache_max_gb_api_v1_admin_workers__worker_id__kv_disk_cache_max_gb_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KVDiskCacheMaxGBUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/kv-cache-precision":{"patch":{"tags":["Admin"],"summary":"Admin Update Kv Cache Precision","operationId":"admin_update_kv_cache_precision_api_v1_admin_workers__worker_id__kv_cache_precision_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KVCachePrecisionUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/tool-grammar":{"patch":{"tags":["Admin"],"summary":"Admin Update Tool Grammar","operationId":"admin_update_tool_grammar_api_v1_admin_workers__worker_id__tool_grammar_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolGrammarUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/spec-decode-cap":{"patch":{"tags":["Admin"],"summary":"Admin Update Spec Decode Cap","operationId":"admin_update_spec_decode_cap_api_v1_admin_workers__worker_id__spec_decode_cap_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpecDecodeCapUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/speculative":{"patch":{"tags":["Admin"],"summary":"Admin Update Speculative Mode","description":"Switch speculative decoding off for one connected worker, or back to\nautomatic. This is Pendra's own switch: the customer's is a separate one\n(``PATCH /workers/{worker_id}/speculative-decoding``) and neither lifts the\nother.\n\nThe worker applies it from its next chat request, with no restart, stores\nit so a restart keeps it, and reports the mode in effect at once\n(``speculative_mode`` reads ``admin_off`` while it is off). 202 means the\nmessage reached the worker, not that it has applied it.\n\nThe message also carries the platform grant, permanently true, so \"auto\"\nreturns the worker to automatic for its organisation.","operationId":"admin_update_speculative_mode_api_v1_admin_workers__worker_id__speculative_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeculativeModeUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/vision-remote-images":{"patch":{"tags":["Admin"],"summary":"Admin Update Vision Remote Images","operationId":"admin_update_vision_remote_images_api_v1_admin_workers__worker_id__vision_remote_images_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisionRemoteImagesUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/web-tools":{"patch":{"tags":["Admin"],"summary":"Admin Update Web Tools","operationId":"admin_update_web_tools_api_v1_admin_workers__worker_id__web_tools_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebToolsUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/task-timeout":{"patch":{"tags":["Admin"],"summary":"Admin Update Task Timeout","operationId":"admin_update_task_timeout_api_v1_admin_workers__worker_id__task_timeout_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskTimeoutUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/max-concurrent":{"patch":{"tags":["Admin"],"summary":"Admin Update Max Concurrent","operationId":"admin_update_max_concurrent_api_v1_admin_workers__worker_id__max_concurrent_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaxConcurrentUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/name":{"patch":{"tags":["Admin"],"summary":"Admin Update Worker Name","operationId":"admin_update_worker_name_api_v1_admin_workers__worker_id__name_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerNameUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/batching":{"patch":{"tags":["Admin"],"summary":"Admin Update Batching","operationId":"admin_update_batching_api_v1_admin_workers__worker_id__batching_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchingUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/models/{model_id}/config":{"patch":{"tags":["Admin"],"summary":"Admin Update Model Config","operationId":"admin_update_model_config_api_v1_admin_workers__worker_id__models__model_id__config_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerConfigUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/models/{model_id}/idle-timeout":{"patch":{"tags":["Admin"],"summary":"Admin Update Model Idle Timeout","operationId":"admin_update_model_idle_timeout_api_v1_admin_workers__worker_id__models__model_id__idle_timeout_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdleTimeoutUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/idle-default":{"patch":{"tags":["Admin"],"summary":"Admin Update Worker Idle Default","description":"Set (or clear) the worker-WIDE idle-unload default (admin, any org).\n\nNot feature-flag gated — like every other admin worker-settings route,\nplatform admins act on any org's behalf. Delegates to the shared\n``_apply_worker_idle_default`` helper the customer route uses.","operationId":"admin_update_worker_idle_default_api_v1_admin_workers__worker_id__idle_default_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerIdleDefaultUpdate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/models/{model_id}/mtp":{"post":{"tags":["Admin"],"summary":"Admin Set Model Mtp","operationId":"admin_set_model_mtp_api_v1_admin_workers__worker_id__models__model_id__mtp_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MtpToggleRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/models/{model_id}/serving":{"post":{"tags":["Admin"],"summary":"Admin Set Model Serving","operationId":"admin_set_model_serving_api_v1_admin_workers__worker_id__models__model_id__serving_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServingToggleRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/models/{model_id}/load":{"post":{"tags":["Admin"],"summary":"Admin Load Model","operationId":"admin_load_model_api_v1_admin_workers__worker_id__models__model_id__load_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/models/{model_id}/unload":{"post":{"tags":["Admin"],"summary":"Admin Unload Model","operationId":"admin_unload_model_api_v1_admin_workers__worker_id__models__model_id__unload_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/models":{"post":{"tags":["Admin"],"summary":"Admin Install Model","operationId":"admin_install_model_api_v1_admin_workers__worker_id__models_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelInstallRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/models/{model_id}":{"delete":{"tags":["Admin"],"summary":"Admin Uninstall Model","operationId":"admin_uninstall_model_api_v1_admin_workers__worker_id__models__model_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/model-jobs/{job_id}/cancel":{"post":{"tags":["Admin"],"summary":"Admin Cancel Model Job","operationId":"admin_cancel_model_job_api_v1_admin_workers__worker_id__model_jobs__job_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/model-jobs/{job_id}/resume":{"post":{"tags":["Admin"],"summary":"Admin Resume Model Job","operationId":"admin_resume_model_job_api_v1_admin_workers__worker_id__model_jobs__job_id__resume_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/model-jobs/{job_id}":{"delete":{"tags":["Admin"],"summary":"Admin Delete Model Job","operationId":"admin_delete_model_job_api_v1_admin_workers__worker_id__model_jobs__job_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/model-jobs":{"get":{"tags":["Admin"],"summary":"Admin List Model Jobs","operationId":"admin_list_model_jobs_api_v1_admin_workers__worker_id__model_jobs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["queued","running","success","error","interrupted","active"],"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ModelJob"},"title":"Response Admin List Model Jobs Api V1 Admin Workers  Worker Id  Model Jobs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/power":{"get":{"tags":["Admin"],"summary":"Admin Get Worker Power","description":"A worker's machine-power history — the same response the customer console\ngets from ``GET /workers/{id}/power``. 404 when the org has never seen the\nworker (live, in its roster, or in its power history).","operationId":"admin_get_worker_power_api_v1_admin_workers__worker_id__power_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."},{"name":"range","in":"query","required":false,"schema":{"enum":["1h","24h","7d","30d"],"type":"string","default":"24h","title":"Range"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workers/{worker_id}/throughput":{"get":{"tags":["Admin"],"summary":"Admin Get Worker Throughput","description":"A worker's combined output throughput — the same response the customer\nconsole gets from ``GET /usage/throughput``.","operationId":"admin_get_worker_throughput_api_v1_admin_workers__worker_id__throughput_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"worker_id","in":"path","required":true,"schema":{"type":"string","title":"Worker Id"}},{"name":"org_id","in":"query","required":true,"schema":{"type":"string","format":"uuid","description":"Owning organisation. Required to disambiguate cross-org worker_id collisions.","title":"Org Id"},"description":"Owning organisation. Required to disambiguate cross-org worker_id collisions."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/power/fleet":{"get":{"tags":["Admin"],"summary":"Admin Power Fleet","description":"Fleet-wide machine power: connected workers reporting now and their summed\nlive draw, plus the last 24 hours of energy (kWh), the share of it that was\nmeasured rather than estimated, and 15-minute points of total draw.","operationId":"admin_power_fleet_api_v1_admin_power_fleet_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/orgs/{org_id}/power":{"get":{"tags":["Admin"],"summary":"Admin Org Power","description":"One org's machine power across all its workers: connected workers\nreporting now and their summed live draw, the range's energy (kWh), the share\nof it that was measured, the summed draw over time and a per-worker energy\nbreakdown. An org with no power data returns zeros, not 404.","operationId":"admin_org_power_api_v1_admin_orgs__org_id__power_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"range","in":"query","required":false,"schema":{"enum":["1h","24h","7d","30d"],"type":"string","default":"24h","title":"Range"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orgs/{org_id}/billing":{"get":{"tags":["Admin"],"summary":"Get Org Billing","operationId":"get_org_billing_api_v1_admin_orgs__org_id__billing_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminBillingStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orgs/{org_id}/billing/override":{"post":{"tags":["Admin"],"summary":"Override Org Plan","description":"Manually set an org's plan (for Enterprise onboarding or free downgrade).\n\nEnterprise requires ``max_workers`` to be specified.\nPro plans should be set up through self-serve Stripe checkout.","operationId":"override_org_plan_api_v1_admin_orgs__org_id__billing_override_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanOverrideRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orgs/{org_id}/credits":{"get":{"tags":["Admin"],"summary":"Get Org Credits","description":"An org's credit balances, its discrete free-credit allocations (coupons),\nand the recent movement ledger — the support view of its credit.","operationId":"get_org_credits_api_v1_admin_orgs__org_id__credits_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin"],"summary":"Allocate Org Credit","description":"Allocate free credit to an org as a discrete, timestamped grant (a coupon).\n\nRecorded as its own ``org_free_credit_grants`` row + a ``grant`` ledger entry —\nnever folded into a single balance. ``expires_at`` omitted = never expires.","operationId":"allocate_org_credit_api_v1_admin_orgs__org_id__credits_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllocateCreditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orgs/{org_id}/credits/transactions":{"get":{"tags":["Admin"],"summary":"List Org Credit Transactions","description":"The org's full credit ledger, newest first — paginated and filterable, so\nsupport can walk the whole history rather than the recent slice on ``/credits``.","operationId":"list_org_credit_transactions_api_v1_admin_orgs__org_id__credits_transactions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only this ledger kind (topup, grant, debit, …)","title":"Kind"},"description":"Only this ledger kind (topup, grant, debit, …)"},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only this pot: 'wallet' or 'free_credit'","title":"Source"},"description":"Only this pot: 'wallet' or 'free_credit'"},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Entries at/after this ISO timestamp","title":"Since"},"description":"Entries at/after this ISO timestamp"},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Entries strictly before this ISO timestamp","title":"Until"},"description":"Entries strictly before this ISO timestamp"},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Matches the entry, rental or grant id, Stripe payment intent, idempotency key, or the grant's note","title":"Q"},"description":"Matches the entry, rental or grant id, Stripe payment intent, idempotency key, or the grant's note"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminCreditLedgerPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orgs/{org_id}/credits/transactions/export":{"get":{"tags":["Admin"],"summary":"Export Org Credit Transactions","description":"Every ledger entry matching the filters as CSV, OLDEST first (the order a\nreconciliation reads in) — no paging. Refused with 413 past\n``LEDGER_EXPORT_MAX_ROWS`` rather than truncated.","operationId":"export_org_credit_transactions_api_v1_admin_orgs__org_id__credits_transactions_export_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only this ledger kind (topup, grant, debit, …)","title":"Kind"},"description":"Only this ledger kind (topup, grant, debit, …)"},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only this pot: 'wallet' or 'free_credit'","title":"Source"},"description":"Only this pot: 'wallet' or 'free_credit'"},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Entries at/after this ISO timestamp","title":"Since"},"description":"Entries at/after this ISO timestamp"},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Entries strictly before this ISO timestamp","title":"Until"},"description":"Entries strictly before this ISO timestamp"},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Matches the entry, rental or grant id, Stripe payment intent, idempotency key, or the grant's note","title":"Q"},"description":"Matches the entry, rental or grant id, Stripe payment intent, idempotency key, or the grant's note"}],"responses":{"200":{"description":"Successful Response","content":{"text/csv":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orgs/{org_id}/gpu-rentals":{"get":{"tags":["Admin"],"summary":"Admin List Gpu Rentals","operationId":"admin_list_gpu_rentals_api_v1_admin_orgs__org_id__gpu_rentals_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"include_boot_log","in":"query","required":false,"schema":{"type":"boolean","description":"Include each rental's boot log (up to 64 KB each). Off by default: the console doesn't show it; the debugging MCP asks for it.","default":false,"title":"Include Boot Log"},"description":"Include each rental's boot log (up to 64 KB each). Off by default: the console doesn't show it; the debugging MCP asks for it."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminGpuRental"},"title":"Response Admin List Gpu Rentals Api V1 Admin Orgs  Org Id  Gpu Rentals Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orgs/{org_id}/gpu-rentals/{rental_id}/stop":{"post":{"tags":["Admin"],"summary":"Admin Stop Gpu Rental","operationId":"admin_stop_gpu_rental_api_v1_admin_orgs__org_id__gpu_rentals__rental_id__stop_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"rental_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rental Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminGpuRental"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/orgs/{org_id}/gpu-rental-policy":{"get":{"tags":["Admin"],"summary":"Admin Get Gpu Rental Policy","operationId":"admin_get_gpu_rental_policy_api_v1_admin_orgs__org_id__gpu_rental_policy_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminGpuRentalPolicy"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Admin"],"summary":"Admin Set Gpu Rental Policy","operationId":"admin_set_gpu_rental_policy_api_v1_admin_orgs__org_id__gpu_rental_policy_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminGpuRentalPolicyUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminGpuRentalPolicy"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/api-keys":{"get":{"tags":["Admin API Keys"],"summary":"List Admin Api Keys","operationId":"list_admin_api_keys_api_v1_admin_api_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AdminApiKeyResponse"},"type":"array","title":"Response List Admin Api Keys Api V1 Admin Api Keys Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Admin API Keys"],"summary":"Create Admin Api Key","operationId":"create_admin_api_key_api_v1_admin_api_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAdminApiKeyRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAdminApiKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/api-keys/{key_id}":{"patch":{"tags":["Admin API Keys"],"summary":"Update Admin Api Key","operationId":"update_admin_api_key_api_v1_admin_api_keys__key_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAdminApiKeyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminApiKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin API Keys"],"summary":"Revoke Admin Api Key","operationId":"revoke_admin_api_key_api_v1_admin_api_keys__key_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/feature-flags":{"get":{"tags":["Feature Flags"],"summary":"List Flags For Org","operationId":"list_flags_for_org_api_v1_feature_flags_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlagsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/feature-flags":{"get":{"tags":["Admin"],"summary":"List Flags","operationId":"list_flags_api_v1_admin_feature_flags_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FlagListItem"},"type":"array","title":"Response List Flags Api V1 Admin Feature Flags Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/feature-flags/{key}":{"get":{"tags":["Admin"],"summary":"Get Flag","operationId":"get_flag_api_v1_admin_feature_flags__key__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlagDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Admin"],"summary":"Update Status","operationId":"update_status_api_v1_admin_feature_flags__key__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlagStatusUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlagDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/feature-flags/{key}/orgs":{"post":{"tags":["Admin"],"summary":"Enrol Org","operationId":"enrol_org_api_v1_admin_feature_flags__key__orgs_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/routers__feature_flags_admin__EnrolOrgRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlagDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/feature-flags/{key}/orgs/{org_id}":{"delete":{"tags":["Admin"],"summary":"Unenrol Org","operationId":"unenrol_org_api_v1_admin_feature_flags__key__orgs__org_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/feature-flags/purge-orphans":{"post":{"tags":["Admin"],"summary":"Purge Orphans","description":"Delete state rows whose key is no longer in the code registry.\n\nEnrolments cascade via FK. Safe to call repeatedly.","operationId":"purge_orphans_api_v1_admin_feature_flags_purge_orphans_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurgeOrphansResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/orgs/{org_id}/feature-flags":{"get":{"tags":["Admin"],"summary":"List Flags For Org","description":"Per-org view: each registered flag's global state + resolved boolean\nfor the requested org. Mirrors the user-facing eval endpoint but lets\nadmins peek at any org without switching context.","operationId":"list_flags_for_org_api_v1_admin_orgs__org_id__feature_flags_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FlagForOrgItem"},"title":"Response List Flags For Org Api V1 Admin Orgs  Org Id  Feature Flags Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/gpu-providers":{"get":{"tags":["Admin"],"summary":"List Providers","operationId":"list_providers_api_v1_admin_gpu_providers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ProviderListItem"},"type":"array","title":"Response List Providers Api V1 Admin Gpu Providers Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/gpu-providers/{provider}":{"get":{"tags":["Admin"],"summary":"Get Provider","operationId":"get_provider_api_v1_admin_gpu_providers__provider__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Admin"],"summary":"Update Status","operationId":"update_status_api_v1_admin_gpu_providers__provider__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderStatusUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/gpu-providers/{provider}/orgs":{"post":{"tags":["Admin"],"summary":"Allowlist Org","operationId":"allowlist_org_api_v1_admin_gpu_providers__provider__orgs_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllowlistOrgRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/gpu-providers/{provider}/orgs/{org_id}":{"delete":{"tags":["Admin"],"summary":"Remove Org","operationId":"remove_org_api_v1_admin_gpu_providers__provider__orgs__org_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/gpu-catalogue":{"get":{"tags":["Admin"],"summary":"Get Catalogue","description":"The entire GPU catalogue (all blocks), including internal ``cost_per_hour`` —\nadmin-only, so cost/margin is fair to expose here (never on the customer path).\n\nEnriched over the validation payload with the DB **ids** of price cards and tier\nrules (which the strict ``Catalogue`` models omit), so the console can target them\nfor PATCH/DELETE.\n\nEach price card also carries ``cheapest_eligible_cost_per_hour``: its margin\nbaseline, the lowest offering cost for that GPU model among offerings that can\nserve the card's tier (#2180), on a provider that isn't disabled (#2472). When\nthat is null, ``stranded_by_disabled_providers`` lists the disabled providers\nwhose offerings would otherwise serve the card, and each provider carries\n``disabled`` (#2630).","operationId":"get_catalogue_api_v1_admin_gpu_catalogue_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Catalogue Api V1 Admin Gpu Catalogue Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/gpu-catalogue/providers":{"post":{"tags":["Admin"],"summary":"Create Provider","operationId":"create_provider_api_v1_admin_gpu_catalogue_providers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Provider Api V1 Admin Gpu Catalogue Providers Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/gpu-catalogue/providers/{provider_id}":{"patch":{"tags":["Admin"],"summary":"Update Provider","operationId":"update_provider_api_v1_admin_gpu_catalogue_providers__provider_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string","title":"Provider Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Provider Api V1 Admin Gpu Catalogue Providers  Provider Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete Provider","operationId":"delete_provider_api_v1_admin_gpu_catalogue_providers__provider_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"provider_id","in":"path","required":true,"schema":{"type":"string","title":"Provider Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/gpu-catalogue/regions":{"post":{"tags":["Admin"],"summary":"Create Region","operationId":"create_region_api_v1_admin_gpu_catalogue_regions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegionIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Region Api V1 Admin Gpu Catalogue Regions Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/gpu-catalogue/regions/{region_id}":{"patch":{"tags":["Admin"],"summary":"Update Region","operationId":"update_region_api_v1_admin_gpu_catalogue_regions__region_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"region_id","in":"path","required":true,"schema":{"type":"string","title":"Region Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegionPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Region Api V1 Admin Gpu Catalogue Regions  Region Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete Region","operationId":"delete_region_api_v1_admin_gpu_catalogue_regions__region_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"region_id","in":"path","required":true,"schema":{"type":"string","title":"Region Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/gpu-catalogue/gpu-models":{"post":{"tags":["Admin"],"summary":"Create Gpu Model","operationId":"create_gpu_model_api_v1_admin_gpu_catalogue_gpu_models_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GpuModelIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Gpu Model Api V1 Admin Gpu Catalogue Gpu Models Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/gpu-catalogue/gpu-models/{gpu_model_id}":{"patch":{"tags":["Admin"],"summary":"Update Gpu Model","operationId":"update_gpu_model_api_v1_admin_gpu_catalogue_gpu_models__gpu_model_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"gpu_model_id","in":"path","required":true,"schema":{"type":"string","title":"Gpu Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GpuModelPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Gpu Model Api V1 Admin Gpu Catalogue Gpu Models  Gpu Model Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete Gpu Model","operationId":"delete_gpu_model_api_v1_admin_gpu_catalogue_gpu_models__gpu_model_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"gpu_model_id","in":"path","required":true,"schema":{"type":"string","title":"Gpu Model Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/gpu-catalogue/offerings":{"post":{"tags":["Admin"],"summary":"Create Offering","operationId":"create_offering_api_v1_admin_gpu_catalogue_offerings_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferingIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Offering Api V1 Admin Gpu Catalogue Offerings Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/gpu-catalogue/offerings/{offering_id}":{"patch":{"tags":["Admin"],"summary":"Update Offering","operationId":"update_offering_api_v1_admin_gpu_catalogue_offerings__offering_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"offering_id","in":"path","required":true,"schema":{"type":"string","title":"Offering Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferingPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Offering Api V1 Admin Gpu Catalogue Offerings  Offering Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete Offering","operationId":"delete_offering_api_v1_admin_gpu_catalogue_offerings__offering_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"offering_id","in":"path","required":true,"schema":{"type":"string","title":"Offering Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/gpu-catalogue/tiers":{"post":{"tags":["Admin"],"summary":"Create Tier","operationId":"create_tier_api_v1_admin_gpu_catalogue_tiers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TierIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Tier Api V1 Admin Gpu Catalogue Tiers Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/gpu-catalogue/tiers/{tier_id}":{"patch":{"tags":["Admin"],"summary":"Update Tier","operationId":"update_tier_api_v1_admin_gpu_catalogue_tiers__tier_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"tier_id","in":"path","required":true,"schema":{"type":"string","title":"Tier Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TierPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Tier Api V1 Admin Gpu Catalogue Tiers  Tier Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/gpu-catalogue/tier-rules":{"post":{"tags":["Admin"],"summary":"Create Tier Rule","operationId":"create_tier_rule_api_v1_admin_gpu_catalogue_tier_rules_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TierRuleIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Tier Rule Api V1 Admin Gpu Catalogue Tier Rules Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/gpu-catalogue/tier-rules/{rule_id}":{"delete":{"tags":["Admin"],"summary":"Delete Tier Rule","operationId":"delete_tier_rule_api_v1_admin_gpu_catalogue_tier_rules__rule_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","title":"Rule Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/gpu-catalogue/price-cards":{"post":{"tags":["Admin"],"summary":"Create Price Card","operationId":"create_price_card_api_v1_admin_gpu_catalogue_price_cards_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceCardIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Create Price Card Api V1 Admin Gpu Catalogue Price Cards Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/gpu-catalogue/price-cards/{card_id}":{"patch":{"tags":["Admin"],"summary":"Update Price Card","operationId":"update_price_card_api_v1_admin_gpu_catalogue_price_cards__card_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"card_id","in":"path","required":true,"schema":{"type":"string","title":"Card Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceCardPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Price Card Api V1 Admin Gpu Catalogue Price Cards  Card Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete Price Card","operationId":"delete_price_card_api_v1_admin_gpu_catalogue_price_cards__card_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"card_id","in":"path","required":true,"schema":{"type":"string","title":"Card Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/gpu-catalogue/fx":{"put":{"tags":["Admin"],"summary":"Set Fx","operationId":"set_fx_api_v1_admin_gpu_catalogue_fx_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FxIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Set Fx Api V1 Admin Gpu Catalogue Fx Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/gpu-rentals":{"get":{"tags":["Admin"],"summary":"List Rentals Log","description":"Every rental and refused rental request across all organisations.","operationId":"list_rentals_log_api_v1_admin_gpu_rentals_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","default":"created_at","title":"Sort"}},{"name":"order","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","default":"desc","title":"Order"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Repeatable. Any of placing, provisioning, running, stopping, stopped, error, refused; 'unfulfilled' means error + refused","title":"Status"},"description":"Repeatable. Any of placing, provisioning, running, stopping, stopped, error, refused; 'unfulfilled' means error + refused"},{"name":"org_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Only this organisation","title":"Org Id"},"description":"Only this organisation"},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Matches the organisation's name, slug or id","title":"Q"},"description":"Matches the organisation's name, slug or id"},{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Provider"}},{"name":"instance_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Instance Type"}},{"name":"gpu_model_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Gpu Model Id"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"At/after this ISO timestamp","title":"Since"},"description":"At/after this ISO timestamp"},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Strictly before this ISO timestamp","title":"Until"},"description":"Strictly before this ISO timestamp"},{"name":"date_field","in":"query","required":false,"schema":{"type":"string","description":"Which timestamp since/until apply to: created_at (requested), started_at or stopped_at","default":"created_at","title":"Date Field"},"description":"Which timestamp since/until apply to: created_at (requested), started_at or stopped_at"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RentalLogPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/gpu-rentals/summary":{"get":{"tags":["Admin"],"summary":"Rentals Summary","description":"Live rental figures for the admin dashboard.\n\nEach statement is bounded by an index: the live set by\n``gpu_rentals_live_idx``, the 24h windows by the created/started/stopped\nindexes (and the refusals table's created index). Nothing here reads a\nwhole table.","operationId":"rentals_summary_api_v1_admin_gpu_rentals_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RentalSummary"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/analytics/users/{user_id}/journey":{"get":{"tags":["Admin"],"summary":"Get User Journey","description":"One user's console visits, newest first, with every page and event.","operationId":"get_user_journey_api_v1_admin_analytics_users__user_id__journey_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserJourney"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/analytics/visits":{"get":{"tags":["Admin"],"summary":"List Visits","description":"The most recent visits to either site, newest first.","operationId":"list_visits_api_v1_admin_analytics_visits_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"site","in":"query","required":false,"schema":{"enum":["console","marketing"],"type":"string","default":"console","title":"Site"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"default":1,"title":"Days"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"segment","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A Matomo segment, e.g. deviceType==smartphone or pageUrl=@/workers/rent","title":"Segment"},"description":"A Matomo segment, e.g. deviceType==smartphone or pageUrl=@/workers/rent"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VisitList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/analytics/reports/{report}":{"get":{"tags":["Admin"],"summary":"Get Report","description":"One aggregate Matomo report for either site.","operationId":"get_report_api_v1_admin_analytics_reports__report__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"report","in":"path","required":true,"schema":{"enum":["visits_summary","pages","entry_pages","exit_pages","events","event_names","referrers","campaigns","devices","browsers","countries","transitions"],"type":"string","title":"Report"}},{"name":"site","in":"query","required":false,"schema":{"enum":["console","marketing"],"type":"string","default":"console","title":"Site"}},{"name":"period","in":"query","required":false,"schema":{"enum":["day","week","month","year","range"],"type":"string","default":"day","title":"Period"}},{"name":"date","in":"query","required":false,"schema":{"type":"string","description":"today, yesterday, lastN, previousN, YYYY-MM-DD or YYYY-MM-DD,YYYY-MM-DD","default":"today","title":"Date"},"description":"today, yesterday, lastN, previousN, YYYY-MM-DD or YYYY-MM-DD,YYYY-MM-DD"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"segment","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Segment"}},{"name":"page_url","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required for transitions: the page's full URL","title":"Page Url"},"description":"Required for transitions: the page's full URL"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsReport"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/catalogue/publishers":{"get":{"tags":["Admin"],"summary":"List Publishers","operationId":"list_publishers_api_v1_admin_catalogue_publishers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PublisherOut"},"type":"array","title":"Response List Publishers Api V1 Admin Catalogue Publishers Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["Admin"],"summary":"Create Publisher","operationId":"create_publisher_api_v1_admin_catalogue_publishers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublisherCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublisherOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/catalogue/publishers/{name}":{"patch":{"tags":["Admin"],"summary":"Update Publisher","operationId":"update_publisher_api_v1_admin_catalogue_publishers__name__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublisherUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublisherOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete Publisher","operationId":"delete_publisher_api_v1_admin_catalogue_publishers__name__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/catalogue/mirror-purge":{"post":{"tags":["Admin"],"summary":"Plan Mirror Purge","description":"Dry run: what a purge of one variant or one model would remove.\n\nWrites nothing. It always answers with the full key lists; a refusal is a\nnon-empty ``blockers``, and ``confirm_token`` is set only when there are none.","operationId":"plan_mirror_purge_api_v1_admin_catalogue_mirror_purge_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirrorPurgePlanRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Plan Mirror Purge Api V1 Admin Catalogue Mirror Purge Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/catalogue/mirror-purge/confirm":{"post":{"tags":["Admin"],"summary":"Confirm Mirror Purge","description":"Carry out a dry run's plan. See the module docstring for the order of events.\n\nA retry with the same token reports the outcome rather than redoing anything.\nThe token is never logged.","operationId":"confirm_mirror_purge_api_v1_admin_catalogue_mirror_purge_confirm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirrorPurgeConfirmRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/catalogue/mirror-purges":{"get":{"tags":["Admin"],"summary":"List Mirror Purges","description":"The purge audit trail, newest first, including purges refused at confirm.","operationId":"list_mirror_purges_api_v1_admin_catalogue_mirror_purges_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Mirror Purges Api V1 Admin Catalogue Mirror Purges Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/catalogue/mirror-reclaims":{"get":{"tags":["Admin"],"summary":"List Mirror Reclaims","description":"The deferred reclaim queue: counts and bytes by category, then the rows.\n\nRead this daily for the first week after deploy (nothing is deleted before the grace\nperiod ends): every kept reason and every due digest should make sense. A row's\n``events`` hold the pins of each variant that dropped it, which is the recipe for\nadding the variant back.","operationId":"list_mirror_reclaims_api_v1_admin_catalogue_mirror_reclaims_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Mirror Reclaims Api V1 Admin Catalogue Mirror Reclaims Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/catalogue/variants/{variant_id}/reclaim-preview":{"get":{"tags":["Admin"],"summary":"Reclaim Preview","description":"What deleting this variant would queue for removal from the mirror, and what it\nwould leave because another variant still pins it. For the delete confirmation.\n\nEvery digest the variant's pins mention is listed, because the loop reclaims all of\nthem if their objects are in R2. The answer is an estimate: the loop re-checks the whole catalogue when the grace period\nends, and adding the variant back before then keeps everything.","operationId":"reclaim_preview_api_v1_admin_catalogue_variants__variant_id__reclaim_preview_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Reclaim Preview Api V1 Admin Catalogue Variants  Variant Id  Reclaim Preview Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/catalogue/mirror-verify/report":{"post":{"tags":["Admin"],"summary":"Mirror Verify Report","description":"One verdict from a verifier VM, or its ``bootstrap_error``.\n\nNot admin-authed: authenticated by the per-dispatch ``X-Mirror-Verify-Token``\nthe API handed that VM, which can settle only the objects dispatched with it\n(so it is in ``EXEMPT`` in ``test_admin_scopes_coverage.py``). Idempotent: a\nrepeat for an object already settled under the token answers 200.","operationId":"mirror_verify_report_api_v1_admin_catalogue_mirror_verify_report_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Mirror Verify Report Api V1 Admin Catalogue Mirror Verify Report Post"}}}}}}},"/api/v1/admin/catalogue/mirror-verify/sweep":{"post":{"tags":["Admin"],"summary":"Mirror Verify Sweep","description":"Queue read-back verification for every live global variant's mirrored\nfiles that have no verdict yet, variants with no successful install since\nthey last changed first. A ``failed`` object is left alone unless ``force``. Live variants stay live meanwhile. Resumable: a\nre-run skips everything already verified or queued.","operationId":"mirror_verify_sweep_api_v1_admin_catalogue_mirror_verify_sweep_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirrorVerifySweepRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Mirror Verify Sweep Api V1 Admin Catalogue Mirror Verify Sweep Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/catalogue/mirror-verify/status":{"get":{"tags":["Admin"],"summary":"Mirror Verify Status","description":"Counts by status, active verifier VMs, the oldest waiting object, failed\nobjects with their errors, and variants waiting in ``verifying``.","operationId":"mirror_verify_status_api_v1_admin_catalogue_mirror_verify_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Mirror Verify Status Api V1 Admin Catalogue Mirror Verify Status Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/catalogue":{"get":{"tags":["Admin"],"summary":"List Models","operationId":"list_models_api_v1_admin_catalogue_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by id / name / publisher / gguf_architecture","title":"Q"},"description":"Filter by id / name / publisher / gguf_architecture"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CatalogueModelListItem"},"title":"Response List Models Api V1 Admin Catalogue Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin"],"summary":"Create Model","operationId":"create_model_api_v1_admin_catalogue_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogueModelWrite"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogueModelAdmin"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/catalogue/order":{"put":{"tags":["Admin"],"summary":"Set Order","description":"Replace the catalogue's display order (the admin console's drag-to-reorder).\n\nThe body is every global model id in its new order, so a save is idempotent\nand two saves can't interleave into a half-applied order. Positions are\nrenumbered densely from 0.\n\nThe list is what the caller loaded, and someone may have added or deleted a\nmodel since. That doesn't throw the move away: ids that no longer exist are\nskipped, and models the list doesn't name keep their current relative order\nat the bottom, which is where a new model goes anyway. The response's ``ids``\nis the order actually saved, so the caller can tell when it differs from what\nit sent. Only a list naming no current model at all is refused (409).","operationId":"set_order_api_v1_admin_catalogue_order_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogueOrderUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Set Order Api V1 Admin Catalogue Order Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/catalogue/export":{"get":{"tags":["Admin"],"summary":"Export Catalogue","description":"Bulk-export the whole global catalogue as a re-seedable snapshot in one\natomic read. Read-only; powers ``catalogue_tool.py export`` and the scheduled\nsnapshot-refresh workflow. See ``build_catalogue_export``.","operationId":"export_catalogue_api_v1_admin_catalogue_export_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Export Catalogue Api V1 Admin Catalogue Export Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/catalogue/repo-tree":{"get":{"tags":["Admin"],"summary":"Repo Tree","description":"List every file in a HuggingFace repo (recursive), with size + LFS sha256.\n\n``POST /resolve`` fetches this same listing and throws most of it away — it\nonly keeps what its quant ladder matched. The image and transcription file\npickers need the whole thing, because \"which checkpoint / which encoder /\nwhich .bin\" is an operator judgement no ladder can make.\n\nRead-only and DB-free: it takes no pooled connection, so slow HF I/O can't\nwedge the pool (same reasoning as ``/resolve``).","operationId":"repo_tree_api_v1_admin_catalogue_repo_tree_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"hf_repo","in":"query","required":true,"schema":{"type":"string","description":"HuggingFace repo id, e.g. 'Qwen/Qwen3-8B-GGUF'","title":"Hf Repo"},"description":"HuggingFace repo id, e.g. 'Qwen/Qwen3-8B-GGUF'"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepoTreeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/catalogue/validate":{"post":{"tags":["Admin"],"summary":"Validate Draft","description":"Check a draft against the house style rules — advisory, writes nothing.\n\n**Scope boundary, deliberate and load-bearing: ``catalogue_style`` runs in the\nimport wizard and HERE ONLY.** ``create_model`` / ``update_model`` do NOT\nstart enforcing it. Today free-text publishers are accepted and\n``catalogue_resolve`` itself emits a non-canonical publisher (the HF org\nslug), so turning any of these findings into a 422 on the write endpoints\nwould break existing callers — the resolver's own drafts and the debug-MCP\npath included — mid-flight. Enforcement at the write endpoint is a separate\ndecision for after the wizard is the only authoring route.\n\nThe body is taken as a free-form object on purpose: validating a draft that\ndoesn't yet satisfy ``CatalogueModelWrite`` is the entire point, so a\nPydantic 422 here would defeat the endpoint. Anything not an object is still\na 422 from FastAPI.\n\n``catalogue_style`` never queries the DB (it is a pure module), so the\ncanonical publisher list is read here and passed in.","operationId":"validate_draft_api_v1_admin_catalogue_validate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"for_publish","in":"query","required":false,"schema":{"type":"boolean","description":"Run the publish-time checks (e.g. licence required). Pass false while the draft is still half-finished.","default":true,"title":"For Publish"},"description":"Run the publish-time checks (e.g. licence required). Pass false while the draft is still half-finished."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"A draft catalogue model, in the /admin/catalogue create shape","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/catalogue/{model_id}":{"get":{"tags":["Admin"],"summary":"Get Model","operationId":"get_model_api_v1_admin_catalogue__model_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogueModelAdmin"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Admin"],"summary":"Update Model","operationId":"update_model_api_v1_admin_catalogue__model_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogueModelUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogueModelAdmin"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete Model","operationId":"delete_model_api_v1_admin_catalogue__model_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/catalogue/{model_id}/orgs":{"post":{"tags":["Admin"],"summary":"Enrol Org","description":"Add an org to a model's `per_org` allowlist.\n\nDeliberately does NOT require `visibility='per_org'` — like the feature-flag\nenrolment route, an operator can stage the allowlist before flipping the model\nto `per_org`. The serve/install filter consults enrolments only once the model\nis `per_org`, so a staged enrolment has no effect until then.","operationId":"enrol_org_api_v1_admin_catalogue__model_id__orgs_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/routers__catalogue_admin__EnrolOrgRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogueModelAdmin"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/catalogue/{model_id}/orgs/{org_id}":{"delete":{"tags":["Admin"],"summary":"Unenrol Org","description":"Remove an org from a model's `per_org` allowlist.","operationId":"unenrol_org_api_v1_admin_catalogue__model_id__orgs__org_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/catalogue/resolve":{"post":{"tags":["Admin"],"summary":"Resolve Model","description":"Resolve a HuggingFace GGUF repo into a draft catalogue model (not saved).\n\nFetches the repo metadata + file tree online and returns a\n``CatalogueModel``-shaped draft (variants with resolved SHA/size pins, the\nderived ``gguf_architecture``, and inferred capabilities/context). The admin\nreviews/edits it, then POSTs\nit to ``/admin/catalogue`` to persist. Fully async with per-call timeouts —\nit takes no DB connection, so slow HF I/O can't wedge the pool.\n\n**The draft's ``variants[]`` stays exactly ``CatalogueVariant``-shaped.** All\nthe derived advice — per-variant footprints, tier placement, the quant\nrecommendation, provenance badges, warnings — travels in SIBLING top-level\nkeys (``analysis`` keyed by variant id, plus ``recommendation`` /\n``partitions`` / ``warnings`` / ``provenance``). That is not tidiness:\n``VariantWrite`` is ``extra=\"forbid\"`` and the console pastes ``variants[]``\nverbatim into the create-mode textarea, so one analysis key inside a variant\nwould 422 every create in the existing UI.\n\n**A transcription repo resolves to a variant-less draft, not a 422.**\nwhisper.cpp ships GGML ``.bin``, which the GGUF quant ladder cannot match, so\n``ggerganov/whisper.cpp`` used to 422 here — and the wizard only enters a\nstep-2 mode after a *successful* resolve, which made its whole transcription\nbranch unreachable for the repos it exists to import. See\n``catalogue_resolve.is_transcription_repo``: everything else about the draft\n(publisher, licence, model card) still comes from HuggingFace, and the\noperator picks the files from ``GET /repo-tree``.","operationId":"resolve_model_api_v1_admin_catalogue_resolve_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Resolve Model Api V1 Admin Catalogue Resolve Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/catalogue/{model_id}/mirror":{"post":{"tags":["Admin"],"summary":"Trigger Mirror","description":"Start mirroring a model's files HuggingFace→R2.\n\nDispatches one mirror job **per variant** that isn't ``live`` (each with its\nown single-use callback token), setting each variant's\n``mirror_status='pending'``. A ``live`` variant is left alone unless\n``force``, as ``mirror-all`` does: re-mirroring one is a per-variant act, so\nadding a variant to a model never re-reads or fails its published siblings.\nThe response lists those in ``skipped_live``, and any variant whose own\ndispatch was refused (a v2 force on a published one, say) in ``refused``. The\nWorkflow reports back to ``/mirror-callback`` which flips the matching variant\nto ``live`` (never auto-publishes). The response keeps the model-grain shape\nthe admin UI expects — ``file_count`` is the total across variants and\n``instance_id`` is the first dispatched job's id.\n\nPre-flight reads run on a short-lived pooled connection that is released\nbefore the per-variant dispatch loop, so no pool slot is pinned across the\nWorker POSTs (each ``_dispatch_variant_mirror`` reacquires briefly).","operationId":"trigger_mirror_api_v1_admin_catalogue__model_id__mirror_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirrorTriggerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Trigger Mirror Api V1 Admin Catalogue  Model Id  Mirror Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Admin"],"summary":"Get Model Mirror Status","description":"Mirror progress for every variant of a model: per file bytes, parts,\nrate, ETA and last error (v2), or the variant's ``mirror_status`` (v1).\n``wait_s`` with ``since`` long-polls until a job or file status changes.","operationId":"get_model_mirror_status_api_v1_admin_catalogue__model_id__mirror_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}},{"name":"wait_s","in":"query","required":false,"schema":{"type":"number","maximum":30,"minimum":0,"default":0,"title":"Wait S"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Since"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Model Mirror Status Api V1 Admin Catalogue  Model Id  Mirror Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/catalogue/mirror-all":{"post":{"tags":["Admin"],"summary":"Trigger Mirror All","description":"Mirror every global variant that isn't already live / in-flight (a variant in\n``verifying`` is left to its read-back: only an explicit model or variant\nre-trigger takes one over) — the bulk\naction for working through the seeded catalogue before the Phase 4 cutover.\nGrouped and reported by model (slug — the true model id) for the admin UI.\n\nPre-flight reads run on a short-lived pooled connection that is released\nbefore the dispatch loop, so no pool slot is pinned across the Worker POSTs.","operationId":"trigger_mirror_all_api_v1_admin_catalogue_mirror_all_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirrorTriggerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Trigger Mirror All Api V1 Admin Catalogue Mirror All Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/catalogue/variants/{variant_id}/mirror":{"get":{"tags":["Admin"],"summary":"Get Variant Mirror Status","description":"Mirror progress for one variant; see ``get_model_mirror_status``.","operationId":"get_variant_mirror_status_api_v1_admin_catalogue_variants__variant_id__mirror_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Variant Id"}},{"name":"wait_s","in":"query","required":false,"schema":{"type":"number","maximum":30,"minimum":0,"default":0,"title":"Wait S"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Since"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Variant Mirror Status Api V1 Admin Catalogue Variants  Variant Id  Mirror Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin"],"summary":"Trigger Variant Mirror","description":"Mirror a single variant's files HuggingFace→R2 (Cloudflare Workflow). The\ncallback flips this variant to ``live`` (never auto-publishes).\n\nPre-flight reads run on a short-lived pooled connection that is released\nbefore the Worker POST, so no pool slot is pinned across the network I/O.","operationId":"trigger_variant_mirror_api_v1_admin_catalogue_variants__variant_id__mirror_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Variant Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirrorTriggerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Trigger Variant Mirror Api V1 Admin Catalogue Variants  Variant Id  Mirror Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/catalogue/mirror-jobs/{job_id}/cancel":{"post":{"tags":["Admin"],"summary":"Cancel Mirror Job","description":"Cancel a v2 mirror job. Its variant goes ``failed`` (re-mirror is allowed\nat once); files no other active job needs stop and their uploads are aborted\nby the engine. Completed files stay; the orphan sweep owns them. Repeating it,\nor cancelling a job that already finished, just reports the job's status.","operationId":"cancel_mirror_job_api_v1_admin_catalogue_mirror_jobs__job_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cancel Mirror Job Api V1 Admin Catalogue Mirror Jobs  Job Id  Cancel Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/catalogue/mirror-sweep":{"post":{"tags":["Admin"],"summary":"Sweep Mirror","description":"Reclaim mirrored R2 objects no catalogue variant pins any more.\n\nBuilds the reference set from **every** ``catalogue_variants`` row and hands\nit to the Worker's ``POST /models/sweep``, which lists the bucket and reports\n(``dry_run``, the default) or deletes the remainder. The Worker holds the\nguards that matter — age threshold, delete cap, key-shape check, and a floor\non how small a reference set it will delete against — because it is where the\ndeletion happens; this side adds one more: if the catalogue read comes back\nempty, nothing is sent at all.\n\nReturns the Worker's report verbatim, including a markdown ``summary`` — but\nonly for a sweep that completed. A partial delete failure comes back as a 200\ncarrying an ``error`` field (so the reclaimed keys aren't lost with it); that\nbecomes a **502** here, with the partial record in the detail.\n\nThe pooled connection is released before the Worker POST — same discipline as\n``_dispatch_variant_mirror``: a sweep of a large bucket is not something to\nhold a pool slot across.","operationId":"sweep_mirror_api_v1_admin_catalogue_mirror_sweep_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirrorSweepRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Sweep Mirror Api V1 Admin Catalogue Mirror Sweep Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/admin/catalogue/mirror-callback":{"post":{"tags":["Admin"],"summary":"Mirror Callback","description":"Completion callback from the mirror Workflow. Authenticated by the\n**per-job token** (NOT an admin key — this endpoint is reachable by the\nless-trusted repository Worker, so it must grant only \"finalise this one\nvariant's mirror job\"). The token identifies which variant of the family it\nbelongs to. On success the variant moves to ``mirror_status='verifying'``\n(keeping its token) and every file is queued for read-back verification\n(``mirror_verify``); it goes ``live``, with its ``pins`` rewritten to R2, only\nonce every file has been read back intact. Never auto-publishes.\n\nValidation and file coverage run on a short-lived connection; the queueing,\nthe etag HEADs it needs and the finalise run with none held.","operationId":"mirror_callback_api_v1_admin_catalogue_mirror_callback_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Mirror Callback Api V1 Admin Catalogue Mirror Callback Post"}}}}}}},"/api/v1/admin/catalogue/variants/{variant_id}":{"get":{"tags":["Admin"],"summary":"Get Variant","operationId":"get_variant_api_v1_admin_catalogue_variants__variant_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantAdmin"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Admin"],"summary":"Update Variant","description":"Partially update ONE variant. Only the fields supplied are changed: an\nomitted field keeps its stored value, an explicit ``null`` clears it. Editing\nthe download pins of a serving variant (published, or with a live mirror)\nstages them: a stage job mirrors and verifies the new files and swaps them in,\nand the variant serves its current files until then (``staged_job_id`` in the\nresponse). On any other variant, or with ``is_published: false``, it resets the\nmirror state, so it must be mirrored before it can be published.","operationId":"update_variant_api_v1_admin_catalogue_variants__variant_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Variant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantAdmin"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete Variant","description":"Delete ONE variant. Refused (409) while a connected worker still reports it\nor a non-terminal install/uninstall job references its legacy id or UUID, or\nwhen it's the family's ONLY variant (a zero-variant model breaks the loader).\nIf the deleted variant was its size's default and siblings remain for that\nsize, the first sibling is promoted so the ``model:size`` lookup still\nresolves.","operationId":"delete_variant_api_v1_admin_catalogue_variants__variant_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Variant Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/catalogue/{model_id}/variants":{"post":{"tags":["Admin"],"summary":"Create Variant","description":"Add ONE variant to an existing model (family slug). The first variant of\na stem becomes its default, Pendra's recommended quant for that model at that\nsize; an explicit ``is_default`` moves the default to it. ``is_default`` is a\nrecommendation only: a request naming the stem routes to whichever of its\nquants is installed.","operationId":"create_variant_api_v1_admin_catalogue__model_id__variants_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantWrite"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantAdmin"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/catalogue/variants/{variant_id}/verify":{"post":{"tags":["Admin"],"summary":"Verify Variant Header","description":"Re-read a variant's GGUF header from its **current** pin and record it.\n\nPersists ``gguf_metadata`` + ``header_verified_at`` and returns a\nclaimed-vs-actual diff. This is the only route that writes either column.\n\nIt also captures the embedded chat template (#2335): ``chat_template_sha256``\nand ``template_thinking_control``, plus the ``reasoning_effort`` levels the\ntemplate accepts (``template_effort_mode`` / ``_levels`` / ``_default``,\nmigration 091), again written by this route alone. A read that could not\nreach the key leaves all five as they were, and a reasoning label or thinking\ndefault the template disagrees with comes back as a warning diff. Nothing is\nrelabelled.\n\nIt also fills an **undetermined** ``gguf_architecture`` from the header it just\nread (#1847). That column is derived-from-file, not authored, and this is the\none code path that has read the authoritative bytes; leaving it NULL made\nverify report a ``severity: error`` the endpoint gave no way to clear, while\nthe Compatibility Matrix — its only consumer, and an exact match on a scalar —\nsilently badged nothing. Same reasoning for HuggingFace's ``gguf.total``, the\n``bits_per_weight`` denominator the header does not carry.\n\nTwo things it deliberately does NOT do:\n\n* It does not touch ``pins``, so verifying never resets the mirror. The write\n  is a targeted column UPDATE, not the full-replace path.\n* It does not \"correct\" a value the catalogue already holds. NULL is \"not\n  determined\" and filling it asserts nothing anyone contradicted; overwriting\n  a recorded value on the strength of a header read is the confident-but-wrong\n  behaviour this whole surface exists to remove. A real disagreement stays a\n  reported error for a human to act on.\n\nIt **does** call ``broadcast_refresh()``: the stored metadata is the input to\nthe load-time ``kv_bytes_per_token`` / ``estimated_vram_bytes`` /\n``bits_per_weight`` derivations, so without it every peer replica keeps\nserving ``None`` for all three until its next unrelated write or a restart.\n\nPre-flight reads run on a short-lived pooled connection released before the\nnetwork I/O, so no pool slot is pinned across a ranged GET of a remote file.","operationId":"verify_variant_header_api_v1_admin_catalogue_variants__variant_id__verify_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/catalogue/variants/{variant_id}/default":{"post":{"tags":["Admin"],"summary":"Set Variant Default","description":"Make this variant the default (Pendra's recommended quant) for its stem —\nthe build an install hint names for a quant-less request. Clears the sibling\ndefault of the same stem in the same transaction (the partial-unique index\nallows exactly one per (family, stem)).","operationId":"set_variant_default_api_v1_admin_catalogue_variants__variant_id__default_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"variant_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Variant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantAdmin"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/compatibility":{"get":{"tags":["Admin"],"summary":"List Rules","operationId":"list_rules_api_v1_admin_compatibility_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by title / model_id / gguf_architecture / notes","title":"Q"},"description":"Filter by title / model_id / gguf_architecture / notes"},{"name":"gguf_architecture","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Rules whose gguf_architecture SET contains this value","title":"Gguf Architecture"},"description":"Rules whose gguf_architecture SET contains this value"},{"name":"architecture","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Architecture"}},{"name":"platform","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"enforcement","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enforcement"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CompatRow"},"title":"Response List Rules Api V1 Admin Compatibility Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Admin"],"summary":"Create Rule","operationId":"create_rule_api_v1_admin_compatibility_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompatWrite"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompatRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/compatibility/{rule_id}":{"get":{"tags":["Admin"],"summary":"Get Rule","operationId":"get_rule_api_v1_admin_compatibility__rule_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompatRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Admin"],"summary":"Update Rule","operationId":"update_rule_api_v1_admin_compatibility__rule_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompatUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompatRow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Admin"],"summary":"Delete Rule","operationId":"delete_rule_api_v1_admin_compatibility__rule_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Rule Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/messages":{"post":{"tags":["Anthropic Messages"],"summary":"Create Message","description":"Serve /v1/messages by relaying to a translation-capable worker.\n\nThe Anthropic↔OpenAI translation runs on the worker for BOTH plaintext and\nencrypted requests; the API forwards the body (or sealed envelope) with\ntask_type=\"anthropic\" and relays the worker's response verbatim. Billing\nrides the worker's plaintext OpenAI-shaped ``usage`` sibling.","operationId":"create_message_v1_messages_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Pendra-Worker-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Pendra-Worker-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/models":{"get":{"tags":["Anthropic Messages"],"summary":"List Models","description":"Unified GET /v1/models listing.\n\nBoth the Anthropic SDK and the OpenAI SDK target ``GET /v1/models``, so this\nsingle endpoint carries both shapes: the Anthropic fields (``type``,\n``display_name``, ``created_at``, ``has_more``/``first_id``/``last_id``) and\nthe OpenAI ones (top-level ``object: \"list\"`` and per-item\n``object: \"model\"``/``created``/``owned_by``). Clients read the fields they\nknow and ignore the rest, so ``models.list()`` works for either SDK without\na second route shadowing this one.","operationId":"list_models_v1_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/models/{model_id}":{"get":{"tags":["Anthropic Messages"],"summary":"Get Model","description":"Anthropic-compatible model detail.","operationId":"get_model_v1_models__model_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/messages/count_tokens":{"post":{"tags":["Anthropic Messages"],"summary":"Count Tokens","operationId":"count_tokens_v1_messages_count_tokens_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/responses":{"post":{"tags":["OpenAI Responses"],"summary":"Create Response","description":"Serve /v1/responses by relaying to a translation-capable worker.\n\nThe Responses↔Chat translation runs on the worker for BOTH plaintext and\nencrypted requests; the API forwards the body (or sealed envelope) with\ntask_type=\"responses\" and relays the worker's response verbatim. Billing\nrides the worker's plaintext OpenAI-shaped ``usage`` sibling.\n``previous_response_id`` (stateless endpoint) is rejected by the worker's\ntranslator.","operationId":"create_response_v1_responses_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Pendra-Worker-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Pendra-Worker-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/responses":{"post":{"tags":["OpenAI Responses"],"summary":"Create Response","description":"Serve /v1/responses by relaying to a translation-capable worker.\n\nThe Responses↔Chat translation runs on the worker for BOTH plaintext and\nencrypted requests; the API forwards the body (or sealed envelope) with\ntask_type=\"responses\" and relays the worker's response verbatim. Billing\nrides the worker's plaintext OpenAI-shaped ``usage`` sibling.\n``previous_response_id`` (stateless endpoint) is rejected by the worker's\ntranslator.","operationId":"create_response_api_v1_responses_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"X-Pendra-Worker-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Pendra-Worker-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/completions":{"post":{"tags":["Completions"],"summary":"Create Completion","operationId":"create_completion_v1_completions_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/completions":{"post":{"tags":["Completions"],"summary":"Create Completion","operationId":"create_completion_api_v1_completions_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/health":{"get":{"summary":"Health","description":"Liveness, plus what is actually running.\n\n``status``/``service`` are unchanged — the container healthcheck, wt.sh\nand wait-for-stack.sh all read this and only look at the status. Caddy\ndoes not: it runs no health check on the api (Caddyfile,\n``api_upstream``). The version fields are additive and are plain reads of\nprocess env, so they add nothing to the 10s poll.\n\n``version``/``sha`` identify the IMAGE; ``release`` identifies the DEPLOY.\nThey differ whenever an image was pinned into a stack tag without being\nrebuilt, which is routine for a path-filtered image. Reporting one number\nwould misdescribe one of them.\n\n``listeners`` is this process's cross-replica listener liveness (#2279).\nA process whose listeners have been down for LISTENER_DEGRADED_AFTER_S\nanswers 503 ``degraded``: it can still serve a request whose worker\nhappens to hang off its own socket, but forwards every other one into a\nchannel nobody reads, so it must be restarted, which autoheal does once\nthe container healthcheck has failed. Until then Caddy still sends to it. The supervisor in\ngpu_manager normally reconnects long before this trips; it is the\nbackstop for the case it can't.\n\nA process that has been told to stop has stopped listening by the time it\nanswers 503 ``shutting_down`` (graceful_shutdown.stop_accepting), so only\na request on a connection that was already open can read it. A new one is\nrefused, which is what takes the replica out of rotation: Caddy tries the\nother one (QA-052).\n\n``?probe=liveness`` is the container healthcheck's form of the question,\n\"should this process be restarted?\". A stopping process is doing its job,\nso it answers 200 there. The healthcheck's probe is a new connection,\nthough, and is refused like any other for the length of the stop: what\nkeeps the container from being marked unhealthy, and restarted by autoheal\nin the middle of the hold, is the marker file the healthcheck accepts\ninstead (docker-compose.yml). A degraded process still answers 503 to both.","operationId":"health_api_v1_health_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"head":{"summary":"Health","description":"Liveness, plus what is actually running.\n\n``status``/``service`` are unchanged — the container healthcheck, wt.sh\nand wait-for-stack.sh all read this and only look at the status. Caddy\ndoes not: it runs no health check on the api (Caddyfile,\n``api_upstream``). The version fields are additive and are plain reads of\nprocess env, so they add nothing to the 10s poll.\n\n``version``/``sha`` identify the IMAGE; ``release`` identifies the DEPLOY.\nThey differ whenever an image was pinned into a stack tag without being\nrebuilt, which is routine for a path-filtered image. Reporting one number\nwould misdescribe one of them.\n\n``listeners`` is this process's cross-replica listener liveness (#2279).\nA process whose listeners have been down for LISTENER_DEGRADED_AFTER_S\nanswers 503 ``degraded``: it can still serve a request whose worker\nhappens to hang off its own socket, but forwards every other one into a\nchannel nobody reads, so it must be restarted, which autoheal does once\nthe container healthcheck has failed. Until then Caddy still sends to it. The supervisor in\ngpu_manager normally reconnects long before this trips; it is the\nbackstop for the case it can't.\n\nA process that has been told to stop has stopped listening by the time it\nanswers 503 ``shutting_down`` (graceful_shutdown.stop_accepting), so only\na request on a connection that was already open can read it. A new one is\nrefused, which is what takes the replica out of rotation: Caddy tries the\nother one (QA-052).\n\n``?probe=liveness`` is the container healthcheck's form of the question,\n\"should this process be restarted?\". A stopping process is doing its job,\nso it answers 200 there. The healthcheck's probe is a new connection,\nthough, and is refused like any other for the length of the stop: what\nkeeps the container from being marked unhealthy, and restarted by autoheal\nin the middle of the hold, is the marker file the healthcheck accepts\ninstead (docker-compose.yml). A degraded process still answers 503 to both.","operationId":"health_api_v1_health_head","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AcceptInviteRequest":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"AcceptInviteRequest"},"AdminApiKey":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"is_active":{"type":"boolean","title":"Is Active"},"owner_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Email"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"}},"type":"object","required":["id","name","key_prefix","created_at","is_active","user_id","scopes"],"title":"AdminApiKey"},"AdminApiKeyResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"created_by":{"type":"string","format":"uuid","title":"Created By"},"created_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Email"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"is_active":{"type":"boolean","title":"Is Active"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"}},"type":"object","required":["id","name","key_prefix","created_by","created_at","last_used_at","expires_at","is_active"],"title":"AdminApiKeyResponse"},"AdminBillingStatus":{"properties":{"plan_name":{"type":"string","title":"Plan Name"},"display_name":{"type":"string","title":"Display Name"},"billing_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Status"},"billing_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Customer Id"},"billing_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Email"},"billing_email_unavailable":{"type":"boolean","title":"Billing Email Unavailable","default":false},"billing_email_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Email Source"},"pending_billing_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pending Billing Email"},"max_workers":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Workers"},"current_workers":{"type":"integer","title":"Current Workers","default":0},"cancel_at_period_end":{"type":"boolean","title":"Cancel At Period End","default":false},"current_period_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Period End"},"subscription_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Id"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"}},"type":"object","required":["plan_name","display_name"],"title":"AdminBillingStatus"},"AdminCreditLedgerPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AdminCreditTransaction"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"credits_pence":{"type":"integer","title":"Credits Pence"},"debits_pence":{"type":"integer","title":"Debits Pence"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"kinds":{"items":{"type":"string"},"type":"array","title":"Kinds"}},"type":"object","required":["items","total","credits_pence","debits_pence","limit","offset","kinds"],"title":"AdminCreditLedgerPage"},"AdminCreditTransaction":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"kind":{"type":"string","title":"Kind"},"source":{"type":"string","title":"Source"},"amount_pence":{"type":"integer","title":"Amount Pence"},"grant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Grant Id"},"grant_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grant Source"},"grant_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grant Note"},"rental_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rental Id"},"stripe_payment_intent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Payment Intent Id"},"idempotency_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency Key"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","kind","source","amount_pence","created_at"],"title":"AdminCreditTransaction","description":"One ``credit_transactions`` row, with the grant it drew on (if any)."},"AdminEventActor":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"kind":{"type":"string","title":"Kind"}},"type":"object","required":["kind"],"title":"AdminEventActor","description":"Who initiated a worker activity event.\n\n``kind='user'`` is an org member (``email`` resolved from ``auth.users``,\nmay be null if the account is gone); ``kind='platform'`` is a Pendra-side\nadmin-console action (shown as \"Pendra\"). A null ``actor`` means the row\npredates actor attribution or is a system/lifecycle event with no initiator."},"AdminGpuRental":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"gpu_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gpu Model Id"},"requested_tier_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requested Tier Id"},"delivered_tier_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivered Tier Id"},"offering_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Offering Id"},"provider":{"type":"string","title":"Provider"},"region":{"type":"string","title":"Region"},"status":{"type":"string","title":"Status"},"worker_id":{"type":"string","title":"Worker Id"},"provider_instance_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Instance Id"},"price_per_hour_gbp":{"type":"number","title":"Price Per Hour Gbp"},"cost_per_hour_gbp":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Per Hour Gbp"},"margin_per_hour_gbp":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Margin Per Hour Gbp"},"accrued_cost_gbp":{"type":"number","title":"Accrued Cost Gbp"},"hours_billed":{"type":"integer","title":"Hours Billed"},"connected":{"type":"boolean","title":"Connected"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"stopped_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Stopped At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"boot_phase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Boot Phase"},"last_boot_report_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Boot Report At"},"boot_log":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Boot Log"},"confidential":{"type":"boolean","title":"Confidential","default":false},"attestation_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attestation Status"},"attested_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Attested At"},"attestation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attestation"}},"type":"object","required":["id","gpu_model_id","requested_tier_id","delivered_tier_id","offering_id","provider","region","status","worker_id","provider_instance_id","price_per_hour_gbp","cost_per_hour_gbp","margin_per_hour_gbp","accrued_cost_gbp","hours_billed","connected","started_at","stopped_at","created_at","error"],"title":"AdminGpuRental","description":"Support view of a rental — everything the customer view deliberately hides.\n\nBuilt from the rental row rather than from ``compute._row_to_rental``: the\ntwo views have genuinely diverged now that the customer never sees which\nprovider ran their workload or what it cost us. Deriving one from the other\nwould either leak supply-chain detail to customers or blind support to it."},"AdminGpuRentalPolicy":{"properties":{"platform_min_tier_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform Min Tier Id"},"require_confidential":{"type":"boolean","title":"Require Confidential","default":false},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["platform_min_tier_id","note","updated_at"],"title":"AdminGpuRentalPolicy"},"AdminGpuRentalPolicyUpdate":{"properties":{"platform_min_tier_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform Min Tier Id"},"require_confidential":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Require Confidential"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","title":"AdminGpuRentalPolicyUpdate"},"AdminInvite":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"role":{"type":"string","title":"Role"},"invitation_type":{"type":"string","title":"Invitation Type"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"pending":{"type":"boolean","title":"Pending"},"invited_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invited By Email"}},"type":"object","required":["id","role","invitation_type","created_at","expires_at","pending"],"title":"AdminInvite"},"AdminMeResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"auth":{"type":"string","title":"Auth","default":"jwt"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"admin_api_key_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Api Key Id"}},"type":"object","required":["user_id"],"title":"AdminMeResponse"},"AdminMember":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"role":{"type":"string","title":"Role"},"last_sign_in_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sign In At"},"last_active_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Active At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"is_primary_owner":{"type":"boolean","title":"Is Primary Owner","default":false}},"type":"object","required":["user_id","role"],"title":"AdminMember"},"AdminMemberDetail":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"role":{"type":"string","title":"Role"},"last_sign_in_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sign In At"},"last_active_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Active At"},"user_created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"User Created At"},"api_key_count":{"type":"integer","title":"Api Key Count"},"total_requests":{"type":"integer","title":"Total Requests"},"is_admin":{"type":"boolean","title":"Is Admin","default":false},"blocked":{"type":"boolean","title":"Blocked","default":false},"mfa_enabled":{"type":"boolean","title":"Mfa Enabled","default":false}},"type":"object","required":["user_id","role","api_key_count","total_requests"],"title":"AdminMemberDetail"},"AdminModelVariant":{"properties":{"id":{"type":"string","title":"Id"},"uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uuid"},"is_default":{"type":"boolean","title":"Is Default","default":false},"label":{"type":"string","title":"Label"},"parameter_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parameter Size"},"previous_ids":{"items":{"type":"string"},"type":"array","title":"Previous Ids"},"architecture":{"anyOf":[{"type":"string","enum":["dense","moe","hybrid","diffusion"]},{"type":"null"}],"title":"Architecture"},"architectures":{"anyOf":[{"items":{"type":"string","enum":["dense","moe","hybrid","diffusion"]},"type":"array"},{"type":"null"}],"title":"Architectures"},"gguf_architecture":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gguf Architecture"},"gguf_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Gguf Metadata"},"kv_bytes_per_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kv Bytes Per Token"},"estimated_vram_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Estimated Vram Bytes"},"bits_per_weight":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bits Per Weight"},"capabilities":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Capabilities"},"reasoning_controls":{"anyOf":[{"$ref":"#/components/schemas/ReasoningControls"},{"type":"null"}]},"active_parameters":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Parameters"},"base_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Model"},"original_weights":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Weights"},"quantization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quantization"},"context_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Length"},"disk_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Disk Size"},"licence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Licence"},"gguf_repo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gguf Repo"},"gguf_file":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gguf File"},"gguf_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gguf Url"},"gguf_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gguf Sha256"},"gguf_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Gguf Size Bytes"},"gguf_parts":{"anyOf":[{"items":{"$ref":"#/components/schemas/GgufPart"},"type":"array"},{"type":"null"}],"title":"Gguf Parts"},"mmproj_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mmproj Url"},"mmproj_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mmproj Sha256"},"mmproj_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mmproj Size Bytes"},"draft_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Url"},"draft_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Sha256"},"draft_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draft Size Bytes"},"embedded_mtp":{"type":"boolean","title":"Embedded Mtp","default":false},"default_thinking":{"type":"boolean","title":"Default Thinking","default":true},"continuous_batching":{"type":"boolean","title":"Continuous Batching","default":true},"reasoning":{"anyOf":[{"type":"string","enum":["reasoning","hybrid","none"]},{"type":"null"}],"title":"Reasoning"},"text_encoders":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/EncoderFile"},"type":"object"},{"type":"null"}],"title":"Text Encoders"},"normalizer_ruleset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Normalizer Ruleset"},"task":{"anyOf":[{"type":"string","enum":["chat","embedding","rerank","transcription","image","speech"]},{"type":"null"}],"title":"Task"},"installable_via":{"items":{"type":"string"},"type":"array","title":"Installable Via"},"gguf_source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gguf Source Url"},"mmproj_source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mmproj Source Url"},"draft_source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Source Url"},"capabilities_override":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Capabilities Override"},"source":{"type":"string","title":"Source"},"mirror_status":{"type":"string","title":"Mirror Status"},"is_published":{"type":"boolean","title":"Is Published"},"header_verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Header Verified At"},"host_resident_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Host Resident Bytes"},"mtp_head_layers":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mtp Head Layers"},"chat_template_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chat Template Sha256"},"template_thinking_control":{"anyOf":[{"type":"string","enum":["toggle","strength","prompt","none"]},{"type":"null"}],"title":"Template Thinking Control"},"template_effort_mode":{"anyOf":[{"type":"string","enum":["enum","freeform","none"]},{"type":"null"}],"title":"Template Effort Mode"},"template_effort_levels":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Template Effort Levels"},"template_effort_default":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Effort Default"},"template_reasoning_format":{"anyOf":[{"type":"string","enum":["think","harmony","channel","none"]},{"type":"null"}],"title":"Template Reasoning Format"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"additionalProperties":false,"type":"object","required":["id","label","source","mirror_status","is_published"],"title":"AdminModelVariant","description":"A model-grain variant row enriched with its own distribution state.\n\nThe public/served ``CatalogueVariant`` deliberately carries no mirror fields,\nbut the admin model page shows each variant's mirror + published state inline\n(so an operator sees, at a glance, which sizes are live). We layer the three\nper-variant distribution columns on top of the served variant shape. Full\nper-variant admin detail (parent context, the remaining timestamps) still comes\nfrom ``GET /admin/catalogue/variants/{uuid}`` → ``VariantAdmin``.\n\n``updated_at`` is the one timestamp carried here rather than left to\n``VariantAdmin``, because it is what lets a caller reason about the variant set\nWITHOUT a request per variant (e.g. \"which variants changed since X\") off one\nmodel GET.\n\n``capabilities_override`` is carried here because it is AUTHORING state, not\nruntime state: the bulk export builds from this shape, and a field absent here\nis simply dropped on the floor — which is how an override used to survive in\nprod but vanish from every re-seeded environment."},"AdminOrgDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"personal_account":{"type":"boolean","title":"Personal Account"},"primary_owner_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Primary Owner User Id"},"attribution":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Attribution"},"require_e2e":{"type":"boolean","title":"Require E2E","default":false},"signup_survey":{"anyOf":[{"$ref":"#/components/schemas/AdminSignupSurvey"},{"type":"null"}]}},"type":"object","required":["id","name","created_at","personal_account"],"title":"AdminOrgDetail"},"AdminOrgSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"personal_account":{"type":"boolean","title":"Personal Account"},"member_count":{"type":"integer","title":"Member Count"},"worker_count":{"type":"integer","title":"Worker Count"},"plan":{"type":"string","title":"Plan"}},"type":"object","required":["id","name","created_at","personal_account","member_count","worker_count","plan"],"title":"AdminOrgSummary"},"AdminSignupSurvey":{"properties":{"org_id":{"type":"string","format":"uuid","title":"Org Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"reasons":{"items":{"type":"string"},"type":"array","title":"Reasons"},"reason_other":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason Other"},"intent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"role_other":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role Other"},"skipped":{"type":"boolean","title":"Skipped","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["org_id","user_id","created_at"],"title":"AdminSignupSurvey","description":"What the person who created an org told us on the console's /welcome\npage (public.org_signup_survey). Keys, not labels: the admin console maps\nthem to text."},"AdminUsageLog":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"api_key_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Api Key Id"},"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"model":{"type":"string","title":"Model"},"model_variant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Variant Id"},"catalogue_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Catalogue Id"},"prompt_tokens":{"type":"integer","title":"Prompt Tokens","default":0},"completion_tokens":{"type":"integer","title":"Completion Tokens","default":0},"reasoning_tokens":{"type":"integer","title":"Reasoning Tokens","default":0},"total_tokens":{"type":"integer","title":"Total Tokens","default":0},"request_duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Request Duration Ms"},"time_to_first_token_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Time To First Token Ms"},"tokens_per_second":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tokens Per Second"},"draft_acceptance_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Draft Acceptance Rate"},"speculative_decoding":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Speculative Decoding"},"speculative_gain":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Speculative Gain"},"queue_wait_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Queue Wait Ms"},"worker_queue_wait_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Worker Queue Wait Ms"},"model_load_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Model Load Ms"},"cold_start":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Cold Start"},"status_code":{"type":"integer","title":"Status Code"},"request_type":{"type":"string","title":"Request Type","default":"chat"},"context_window":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Window"},"images_generated":{"type":"integer","title":"Images Generated","default":0},"audio_seconds":{"anyOf":[{"type":"number"},{"type":"string"}],"title":"Audio Seconds","default":0},"audio_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audio Format"},"worker_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Worker Id"},"worker_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Worker Name"},"backend":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Backend"},"accelerator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accelerator"},"offload_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Offload State"},"encryption_kid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Encryption Kid"},"client_user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client User Agent"},"request_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Path"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"request_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Request Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","model","status_code","created_at"],"title":"AdminUsageLog","description":"Full-detail per-request log for the admin per-org Usage tab.\n\nSuperset of the console's ``UsageLog`` (routers/usage.py) — it also exposes\nthe admin-only ``api_key_id``, ``user_id``, ``reasoning_tokens``,\n``context_window``, ``accelerator`` and ``offload_state`` columns.\n\nIt claimed to be a superset while silently omitting ``model_load_ms`` /\n``cold_start``, so a support engineer looking at a customer's slow request\nhere could not tell it was a cold model load — while the customer could see\nexactly that in their own console. Keep this in step with ``UsageLog``."},"AdminUserDetail":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"user_created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"User Created At"},"last_sign_in_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sign In At"},"last_active_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Active At"},"last_sign_in_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Sign In Provider"},"last_sign_in_ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Sign In Ip"},"last_sign_in_user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Sign In User Agent"},"is_admin":{"type":"boolean","title":"Is Admin","default":false},"blocked":{"type":"boolean","title":"Blocked","default":false},"mfa_enabled":{"type":"boolean","title":"Mfa Enabled","default":false},"api_key_count":{"type":"integer","title":"Api Key Count","default":0},"total_requests":{"type":"integer","title":"Total Requests","default":0},"orgs":{"items":{"$ref":"#/components/schemas/AdminUserOrgMembership"},"type":"array","title":"Orgs"},"signup_survey":{"anyOf":[{"$ref":"#/components/schemas/AdminSignupSurvey"},{"type":"null"}]}},"type":"object","required":["user_id"],"title":"AdminUserDetail"},"AdminUserInvite":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"org_name":{"type":"string","title":"Org Name"},"role":{"type":"string","title":"Role"},"invitation_type":{"type":"string","title":"Invitation Type"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"pending":{"type":"boolean","title":"Pending"},"invited_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invited By Email"}},"type":"object","required":["id","org_id","org_name","role","invitation_type","created_at","expires_at","pending"],"title":"AdminUserInvite","description":"An invitation addressed to a specific user's email, from the user's\nperspective — carries the inviting org so the user detail page can link to\nit. ``expires_at``/``pending`` are derived exactly as in ``AdminInvite``."},"AdminUserListItem":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"last_sign_in_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Sign In At"},"last_active_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Active At"},"is_admin":{"type":"boolean","title":"Is Admin","default":false},"blocked":{"type":"boolean","title":"Blocked","default":false},"org_count":{"type":"integer","title":"Org Count","default":0}},"type":"object","required":["user_id"],"title":"AdminUserListItem"},"AdminUserOrgMembership":{"properties":{"org_id":{"type":"string","format":"uuid","title":"Org Id"},"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"role":{"type":"string","title":"Role"},"personal_account":{"type":"boolean","title":"Personal Account"}},"type":"object","required":["org_id","name","role","personal_account"],"title":"AdminUserOrgMembership"},"AdminUserSummary":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"granted_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Granted By Email"},"account_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Account Id"}},"type":"object","required":["user_id","created_at"],"title":"AdminUserSummary"},"AdminWorker":{"properties":{"worker_id":{"type":"string","title":"Worker Id"},"worker_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Worker Name"},"org_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Org Id"},"org_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Name"},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version"},"ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"connected_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connected At"},"status":{"type":"string","title":"Status"},"last_seen_seconds_ago":{"type":"integer","title":"Last Seen Seconds Ago"},"offline_since":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Offline Since"},"last_seen_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Seen At"},"models_count":{"type":"integer","title":"Models Count"},"models":{"items":{},"type":"array","title":"Models"},"max_concurrent":{"type":"integer","title":"Max Concurrent","default":0},"admission_cap":{"type":"integer","title":"Admission Cap","default":0},"admission_cap_model_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admission Cap Model Type"},"max_concurrent_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Max Concurrent Mode"},"capacity":{"additionalProperties":true,"type":"object","title":"Capacity"},"capacity_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Capacity Total"},"slots":{"additionalProperties":true,"type":"object","title":"Slots"},"batching":{"type":"boolean","title":"Batching","default":false},"batch_max_running":{"type":"integer","title":"Batch Max Running","default":0},"active_tasks":{"type":"integer","title":"Active Tasks","default":0},"in_flight":{"type":"integer","title":"In Flight","default":0},"queue_depth":{"type":"integer","title":"Queue Depth","default":0},"key_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key Name"},"key_fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key Fingerprint"},"managed":{"type":"boolean","title":"Managed","default":false},"inference_backend":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inference Backend"},"backend_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Backend Version"},"gpus":{"items":{},"type":"array","title":"Gpus"},"backends":{"items":{},"type":"array","title":"Backends"},"system":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"System"},"gpu_status":{"items":{},"type":"array","title":"Gpu Status"},"model_footprints":{"items":{},"type":"array","title":"Model Footprints"},"host_model_footprints":{"items":{},"type":"array","title":"Host Model Footprints"},"resident_models":{"items":{},"type":"array","title":"Resident Models"},"pinned_models":{"items":{},"type":"array","title":"Pinned Models"},"gpu_offload_supported":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Gpu Offload Supported"},"gpu_init_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gpu Init Error"},"kv_prefix_cache_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Kv Prefix Cache Enabled"},"kv_disk_cache_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Kv Disk Cache Enabled"},"kv_disk_cache_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kv Disk Cache Bytes"},"kv_disk_hits":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kv Disk Hits"},"kv_disk_misses":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kv Disk Misses"},"kv_disk_tokens_restored":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kv Disk Tokens Restored"},"kv_ram_cache_percent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kv Ram Cache Percent"},"kv_ram_cache_set":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Kv Ram Cache Set"},"kv_ram_budget_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kv Ram Budget Bytes"},"kv_ram_entries":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kv Ram Entries"},"kv_ram_pressure_evictions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kv Ram Pressure Evictions"},"kv_ram_hits":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kv Ram Hits"},"kv_ram_misses":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kv Ram Misses"},"kv_ram_tokens_restored":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kv Ram Tokens Restored"},"kv_warm_tokens_reused":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kv Warm Tokens Reused"},"kv_ram_captures_skipped":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kv Ram Captures Skipped"},"kv_ram_budget_evictions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kv Ram Budget Evictions"},"kv_ram_captures_refused":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kv Ram Captures Refused"},"kv_cache_skipped":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kv Cache Skipped"},"kv_image_requests":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kv Image Requests"},"batch_pool_evictions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Batch Pool Evictions"},"host_memory_available_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Host Memory Available Bytes"},"kv_cache_ram_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kv Cache Ram Bytes"},"kv_disk_cache_max_gb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kv Disk Cache Max Gb"},"kv_disk_cache_effective_max_gb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kv Disk Cache Effective Max Gb"},"kv_disk_cache_dir":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kv Disk Cache Dir"},"kv_disk_cache_volume_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kv Disk Cache Volume Bytes"},"kv_cache_precision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kv Cache Precision"},"kv_cache_precision_auto":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Kv Cache Precision Auto"},"tool_grammar_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Tool Grammar Enabled"},"spec_decode_cap":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Spec Decode Cap"},"vision_remote_images_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Vision Remote Images Enabled"},"web_tools_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Web Tools Enabled"},"task_timeout_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Task Timeout Seconds"},"context_auto_max":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Auto Max"},"context_size_override":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context Size Override"},"idle_timeout_seconds":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Idle Timeout Seconds"},"idle_timeout_default_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Idle Timeout Default Seconds"},"context_resolved":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context Resolved"},"context_reduced":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context Reduced"},"context_usage_recommended":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context Usage Recommended"},"offload_state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Offload State"},"speculative_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Speculative Mode"},"speculative_state":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Speculative State"},"speculative_admin_switch":{"type":"boolean","title":"Speculative Admin Switch","default":false},"speculative_batching":{"type":"boolean","title":"Speculative Batching","default":false},"speculative_pinned_off":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Speculative Pinned Off"},"power":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Power"},"power_caps":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Power Caps"}},"type":"object","required":["worker_id","status","last_seen_seconds_ago","models_count"],"title":"AdminWorker"},"AdminWorkerEvent":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"worker_id":{"type":"string","title":"Worker Id"},"worker_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Worker Name"},"org_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Org Id"},"event_type":{"type":"string","title":"Event Type"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"actor":{"anyOf":[{"$ref":"#/components/schemas/AdminEventActor"},{"type":"null"}]},"transient":{"type":"boolean","title":"Transient","default":false}},"type":"object","required":["id","worker_id","event_type","created_at"],"title":"AdminWorkerEvent"},"AdminWorkerKey":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"key_fingerprint":{"type":"string","title":"Key Fingerprint"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"is_active":{"type":"boolean","title":"Is Active"},"created_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Email"},"active_worker_count":{"type":"integer","title":"Active Worker Count","default":0},"managed":{"type":"boolean","title":"Managed","default":false},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"}},"type":"object","required":["id","name","key_fingerprint","created_at","is_active"],"title":"AdminWorkerKey"},"AdminWorkloadKey":{"properties":{"fingerprint":{"type":"string","title":"Fingerprint"},"public_key_b64":{"type":"string","title":"Public Key B64"},"first_seen_worker_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Seen Worker Id"},"first_seen_at":{"type":"string","format":"date-time","title":"First Seen At"},"last_seen_at":{"type":"string","format":"date-time","title":"Last Seen At"}},"type":"object","required":["fingerprint","public_key_b64","first_seen_at","last_seen_at"],"title":"AdminWorkloadKey","description":"A private-inference workload public key registered for an org.\n\nThe private half lives only on the customer's worker(s); Pendra stores just\nthe public key + fingerprint. More than one row = multiple distinct keys\nseen (rotation, or a ``workload_key_conflict`` event)."},"AllocateCreditRequest":{"properties":{"amount_gbp":{"type":"number","exclusiveMinimum":0.0,"title":"Amount Gbp"},"source":{"type":"string","title":"Source","default":"promo"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["amount_gbp"],"title":"AllocateCreditRequest"},"AllowlistOrgRequest":{"properties":{"org_id":{"type":"string","format":"uuid","title":"Org Id"}},"type":"object","required":["org_id"],"title":"AllowlistOrgRequest"},"AllowlistedOrg":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"enrolled_at":{"type":"string","format":"date-time","title":"Enrolled At"}},"type":"object","required":["id","name","slug","enrolled_at"],"title":"AllowlistedOrg"},"AnalyticsReport":{"properties":{"report":{"type":"string","title":"Report"},"site":{"type":"string","title":"Site"},"period":{"type":"string","title":"Period"},"date":{"type":"string","title":"Date"},"segment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Segment"},"data":{"title":"Data"}},"type":"object","required":["report","site","period","date","data"],"title":"AnalyticsReport"},"AnalyticsVisit":{"properties":{"visit_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Visit Id"},"visitor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Visitor Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"site":{"type":"string","title":"Site"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ended At"},"duration_s":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration S"},"visit_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Visit Number"},"device_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Type"},"browser":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Browser"},"os":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Os"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code"},"referrer_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referrer Type"},"referrer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Referrer Name"},"action_count":{"type":"integer","title":"Action Count"},"actions":{"items":{"$ref":"#/components/schemas/JourneyAction"},"type":"array","title":"Actions"},"matomo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matomo Url"}},"type":"object","required":["site","action_count","actions"],"title":"AnalyticsVisit"},"ApiKeyResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"is_active":{"type":"boolean","title":"Is Active"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"owner_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Email"},"is_own":{"type":"boolean","title":"Is Own","default":false},"owner_is_member":{"type":"boolean","title":"Owner Is Member","default":true},"created_by_api_key_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Api Key Id"},"rotated_by_api_key_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rotated By Api Key Id"},"content_filter":{"anyOf":[{"$ref":"#/components/schemas/KeyContentFilter"},{"type":"null"}]}},"type":"object","required":["id","name","key_prefix","created_at","last_used_at","expires_at","is_active","scopes"],"title":"ApiKeyResponse"},"BatchingUpdate":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"max_running":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Running"}},"type":"object","title":"BatchingUpdate","description":"A PARTIAL update of the worker's batching settings — every field is\noptional and ``None`` means \"leave this one alone\".\n\nThe console changes the toggle (\"Run requests together\") and the cap\n(\"Requests running at once\") as independent actions, so a replace-style body\nwould make toggling batching off and on again silently reset the operator's\nchosen cap."},"BillingEmailResponse":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"source":{"type":"string","enum":["stripe","manual","unset"],"title":"Source"},"pending":{"anyOf":[{"$ref":"#/components/schemas/PendingChange"},{"type":"null"}]}},"type":"object","required":["email","source"],"title":"BillingEmailResponse"},"BillingEmailUpdate":{"properties":{"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"BillingEmailUpdate"},"BillingPreferences":{"properties":{"auto_topup_enabled":{"type":"boolean","title":"Auto Topup Enabled","default":false},"auto_topup_threshold_gbp":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Auto Topup Threshold Gbp"},"auto_topup_amount_gbp":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Auto Topup Amount Gbp"},"low_balance_alert_gbp":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Low Balance Alert Gbp"}},"type":"object","title":"BillingPreferences","description":"Owner-set auto top-up + low-balance-warning knobs (all amounts in GBP; None =\nunset). Mirrors ``public.org_billing_preferences`` but in pounds for the UI."},"BillingStatusResponse":{"properties":{"plan_name":{"type":"string","title":"Plan Name"},"display_name":{"type":"string","title":"Display Name"},"billing_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Status"},"max_workers":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Workers"},"current_workers":{"type":"integer","title":"Current Workers"},"cancel_at_period_end":{"type":"boolean","title":"Cancel At Period End"},"current_period_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Period Start"},"current_period_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Period End"},"canceled_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canceled At"},"has_paid_subscription":{"type":"boolean","title":"Has Paid Subscription"}},"type":"object","required":["plan_name","display_name","billing_status","max_workers","current_workers","cancel_at_period_end","current_period_start","current_period_end","canceled_at","has_paid_subscription"],"title":"BillingStatusResponse"},"BlockUserRequest":{"properties":{"blocked":{"type":"boolean","title":"Blocked"}},"type":"object","required":["blocked"],"title":"BlockUserRequest"},"Body_create_transcription_api_v1_audio_transcriptions_post":{"properties":{"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"response_format":{"type":"string","title":"Response Format","default":"json"},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature"},"beam_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Beam Size"},"timestamp_granularities":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Timestamp Granularities"}},"type":"object","title":"Body_create_transcription_api_v1_audio_transcriptions_post"},"Body_create_transcription_v1_audio_transcriptions_post":{"properties":{"file":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"File"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"response_format":{"type":"string","title":"Response Format","default":"json"},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature"},"beam_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Beam Size"},"timestamp_granularities":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Timestamp Granularities"}},"type":"object","title":"Body_create_transcription_v1_audio_transcriptions_post"},"CatalogueEmbeddingPrompts":{"properties":{"query":{"type":"string","maxLength":512,"title":"Query","default":""},"document":{"type":"string","maxLength":512,"title":"Document","default":""}},"additionalProperties":false,"type":"object","title":"CatalogueEmbeddingPrompts","description":"An embedding model's input prefix per role (``embedding_prompts``): the\ntext it was trained to see before a search query and before a document.\nTaken from the publisher's model card. Either may be ``\"\"``: Qwen3-Embedding\nprefixes queries only, and ``{}`` records a model that takes no prefix."},"CatalogueEntryOut":{"properties":{"gpu_model_id":{"type":"string","title":"Gpu Model Id"},"label":{"type":"string","title":"Label"},"vendor":{"type":"string","title":"Vendor"},"model":{"type":"string","title":"Model"},"vram_gb":{"type":"integer","title":"Vram Gb"},"generation":{"type":"string","title":"Generation"},"gpu_count":{"type":"integer","title":"Gpu Count"},"tiers":{"items":{"$ref":"#/components/schemas/TierPriceOut"},"type":"array","title":"Tiers"}},"type":"object","required":["gpu_model_id","label","vendor","model","vram_gb","generation","gpu_count","tiers"],"title":"CatalogueEntryOut","description":"One GPU model, with a price per jurisdiction tier.\n\nCarries no provider, region or cost — which supplier runs a workload is\nPendra's business, and what it costs us is nobody's but ours."},"CatalogueHfSource":{"properties":{"author":{"type":"string","title":"Author"},"search":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"},"variant_filter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variant Filter"},"exclude_quantized":{"type":"boolean","title":"Exclude Quantized","default":true}},"additionalProperties":false,"type":"object","required":["author"],"title":"CatalogueHfSource"},"CatalogueModel":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"publisher":{"type":"string","title":"Publisher"},"description":{"type":"string","title":"Description"},"capabilities":{"items":{"type":"string","enum":["completion","vision","tools","thinking","embedding","rerank","ocr","transcription","image","speech","moderation"]},"type":"array","title":"Capabilities"},"variants":{"items":{"$ref":"#/components/schemas/CatalogueVariant"},"type":"array","title":"Variants"},"context_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Length"},"homepage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Homepage"},"licence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Licence"},"publishing_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publishing Country"},"release_quarter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Release Quarter"},"recommended_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recommended Size"},"recommended_steps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recommended Steps"},"recommended_guidance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Recommended Guidance"},"embedding_prompts":{"anyOf":[{"$ref":"#/components/schemas/CatalogueEmbeddingPrompts"},{"type":"null"}]},"default_image_prompt":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Default Image Prompt"},"voices":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Voices"},"default_voice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Voice"},"engine_family":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Engine Family"},"reasoning":{"anyOf":[{"type":"string","enum":["reasoning","hybrid"]},{"type":"null"}],"title":"Reasoning"},"distilled":{"type":"boolean","title":"Distilled","default":false},"created":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created"},"hf_source":{"anyOf":[{"$ref":"#/components/schemas/CatalogueHfSource"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["id","name","publisher","description","capabilities","variants"],"title":"CatalogueModel"},"CatalogueModelAdmin":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"publisher":{"type":"string","title":"Publisher"},"description":{"type":"string","title":"Description"},"capabilities":{"items":{"type":"string","enum":["completion","vision","tools","thinking","embedding","rerank","ocr","transcription","image","speech","moderation"]},"type":"array","title":"Capabilities"},"variants":{"items":{"$ref":"#/components/schemas/AdminModelVariant"},"type":"array","title":"Variants"},"context_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Length"},"homepage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Homepage"},"licence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Licence"},"publishing_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publishing Country"},"release_quarter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Release Quarter"},"recommended_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recommended Size"},"recommended_steps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recommended Steps"},"recommended_guidance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Recommended Guidance"},"embedding_prompts":{"anyOf":[{"$ref":"#/components/schemas/CatalogueEmbeddingPrompts"},{"type":"null"}]},"default_image_prompt":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Default Image Prompt"},"voices":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Voices"},"default_voice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Voice"},"engine_family":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Engine Family"},"reasoning":{"anyOf":[{"type":"string","enum":["reasoning","hybrid"]},{"type":"null"}],"title":"Reasoning"},"distilled":{"type":"boolean","title":"Distilled","default":false},"created":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created"},"hf_source":{"anyOf":[{"$ref":"#/components/schemas/CatalogueHfSource"},{"type":"null"}]},"pk":{"type":"integer","title":"Pk"},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"},"sort_order":{"type":"integer","title":"Sort Order"},"source":{"type":"string","title":"Source"},"mirror_status":{"type":"string","title":"Mirror Status"},"mirror_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mirror Error"},"is_published":{"type":"boolean","title":"Is Published"},"visibility":{"type":"string","enum":["enabled","disabled","per_org"],"title":"Visibility","default":"enabled"},"enrolled_orgs":{"items":{"$ref":"#/components/schemas/routers__catalogue_admin__EnrolledOrg"},"type":"array","title":"Enrolled Orgs","default":[]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"additionalProperties":false,"type":"object","required":["id","name","publisher","description","capabilities","variants","pk","sort_order","source","mirror_status","is_published","created_at","updated_at"],"title":"CatalogueModelAdmin","description":"Full admin view of a model: the authored model plus DB/distribution state.\n\nUnlike the public response this is NOT stripped — admins see the authoring\nfields (``hf_source`` / ``gguf_repo`` / ``gguf_file``) they edit. The\nmodel-level distribution fields are aggregated across the family's variants;\neach entry in ``variants`` also carries its own per-variant distribution\nstate (``AdminModelVariant``)."},"CatalogueModelListItem":{"properties":{"pk":{"type":"integer","title":"Pk"},"id":{"type":"string","title":"Id"},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"},"name":{"type":"string","title":"Name"},"publisher":{"type":"string","title":"Publisher"},"publishing_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publishing Country"},"capabilities":{"items":{"type":"string"},"type":"array","title":"Capabilities"},"variant_count":{"type":"integer","title":"Variant Count"},"is_published":{"type":"boolean","title":"Is Published"},"visibility":{"type":"string","enum":["enabled","disabled","per_org"],"title":"Visibility","default":"enabled"},"enrolled_org_count":{"type":"integer","title":"Enrolled Org Count","default":0},"mirror_status":{"type":"string","title":"Mirror Status"},"source":{"type":"string","title":"Source"},"sort_order":{"type":"integer","title":"Sort Order"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["pk","id","org_id","name","publisher","capabilities","variant_count","is_published","mirror_status","source","sort_order","updated_at"],"title":"CatalogueModelListItem"},"CatalogueModelUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"publisher":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publisher"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"capabilities":{"anyOf":[{"items":{"type":"string","enum":["completion","vision","tools","thinking","embedding","rerank","ocr","transcription","image","speech","moderation"]},"type":"array"},{"type":"null"}],"title":"Capabilities"},"variants":{"anyOf":[{"items":{"$ref":"#/components/schemas/CatalogueVariant"},"type":"array"},{"type":"null"}],"title":"Variants"},"context_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Length"},"licence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Licence"},"release_quarter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Release Quarter"},"recommended_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recommended Size"},"recommended_steps":{"anyOf":[{"type":"integer","maximum":50.0,"minimum":1.0},{"type":"null"}],"title":"Recommended Steps"},"recommended_guidance":{"anyOf":[{"type":"number","maximum":20.0,"minimum":1.0},{"type":"null"}],"title":"Recommended Guidance"},"embedding_prompts":{"anyOf":[{"$ref":"#/components/schemas/CatalogueEmbeddingPrompts"},{"type":"null"}]},"default_image_prompt":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Default Image Prompt"},"voices":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Voices"},"default_voice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Voice"},"engine_family":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Engine Family"},"reasoning":{"anyOf":[{"type":"string","enum":["reasoning","hybrid"]},{"type":"null"}],"title":"Reasoning"},"distilled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Distilled"},"created":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created"},"hf_source":{"anyOf":[{"$ref":"#/components/schemas/CatalogueHfSource"},{"type":"null"}]},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"},"is_published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Published"},"visibility":{"anyOf":[{"type":"string","enum":["enabled","disabled","per_org"]},{"type":"null"}],"title":"Visibility"},"unpublish_variants":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Unpublish Variants"}},"additionalProperties":false,"type":"object","title":"CatalogueModelUpdate","description":"Partial update — only the fields supplied are changed.\n\n``variants`` still validate through ``CatalogueVariant`` when present."},"CatalogueModelWrite":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"publisher":{"type":"string","title":"Publisher"},"description":{"type":"string","title":"Description"},"capabilities":{"items":{"type":"string","enum":["completion","vision","tools","thinking","embedding","rerank","ocr","transcription","image","speech","moderation"]},"type":"array","title":"Capabilities"},"variants":{"items":{"$ref":"#/components/schemas/CatalogueVariant"},"type":"array","title":"Variants"},"context_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Length"},"homepage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Homepage"},"licence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Licence"},"publishing_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publishing Country"},"release_quarter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Release Quarter"},"recommended_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recommended Size"},"recommended_steps":{"anyOf":[{"type":"integer","maximum":50.0,"minimum":1.0},{"type":"null"}],"title":"Recommended Steps"},"recommended_guidance":{"anyOf":[{"type":"number","maximum":20.0,"minimum":1.0},{"type":"null"}],"title":"Recommended Guidance"},"embedding_prompts":{"anyOf":[{"$ref":"#/components/schemas/CatalogueEmbeddingPrompts"},{"type":"null"}]},"default_image_prompt":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Default Image Prompt"},"voices":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Voices"},"default_voice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Voice"},"engine_family":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Engine Family"},"reasoning":{"anyOf":[{"type":"string","enum":["reasoning","hybrid"]},{"type":"null"}],"title":"Reasoning"},"distilled":{"type":"boolean","title":"Distilled","default":false},"created":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created"},"hf_source":{"anyOf":[{"$ref":"#/components/schemas/CatalogueHfSource"},{"type":"null"}]},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"},"is_published":{"type":"boolean","title":"Is Published","default":false},"visibility":{"type":"string","enum":["enabled","disabled","per_org"],"title":"Visibility","default":"enabled"}},"additionalProperties":false,"type":"object","required":["id","name","publisher","description","capabilities","variants"],"title":"CatalogueModelWrite","description":"Create/replace body: the full authored model + admin-only fields.\n\nInherits ``CatalogueModel``'s ``extra='forbid'`` config and every\ncross-field variant validator, so a bad variant (unpaired gguf pin, unknown\nencoder kind, typo'd key) fails with a 422 exactly as it would at import.\nAlso replicates the two non-empty sanity checks ``load_catalogue()`` runs on\nthe JSON path so a row created here can never be one the loader would reject."},"CatalogueOrderUpdate":{"properties":{"ids":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Ids"}},"additionalProperties":false,"type":"object","required":["ids"],"title":"CatalogueOrderUpdate","description":"The global catalogue in its new display order, first shown first."},"CatalogueResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CatalogueModel"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"CatalogueResponse"},"CatalogueVariant":{"properties":{"id":{"type":"string","title":"Id"},"uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uuid"},"is_default":{"type":"boolean","title":"Is Default","default":false},"label":{"type":"string","title":"Label"},"parameter_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parameter Size"},"previous_ids":{"items":{"type":"string"},"type":"array","title":"Previous Ids"},"architecture":{"anyOf":[{"type":"string","enum":["dense","moe","hybrid","diffusion"]},{"type":"null"}],"title":"Architecture"},"architectures":{"anyOf":[{"items":{"type":"string","enum":["dense","moe","hybrid","diffusion"]},"type":"array"},{"type":"null"}],"title":"Architectures"},"gguf_architecture":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gguf Architecture"},"gguf_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Gguf Metadata"},"kv_bytes_per_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kv Bytes Per Token"},"estimated_vram_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Estimated Vram Bytes"},"bits_per_weight":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bits Per Weight"},"capabilities":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Capabilities"},"reasoning_controls":{"anyOf":[{"$ref":"#/components/schemas/ReasoningControls"},{"type":"null"}]},"active_parameters":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Parameters"},"base_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Model"},"original_weights":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Weights"},"quantization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quantization"},"context_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Length"},"disk_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Disk Size"},"licence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Licence"},"gguf_repo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gguf Repo"},"gguf_file":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gguf File"},"gguf_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gguf Url"},"gguf_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gguf Sha256"},"gguf_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Gguf Size Bytes"},"gguf_parts":{"anyOf":[{"items":{"$ref":"#/components/schemas/GgufPart"},"type":"array"},{"type":"null"}],"title":"Gguf Parts"},"mmproj_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mmproj Url"},"mmproj_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mmproj Sha256"},"mmproj_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mmproj Size Bytes"},"draft_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Url"},"draft_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Sha256"},"draft_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draft Size Bytes"},"embedded_mtp":{"type":"boolean","title":"Embedded Mtp","default":false},"default_thinking":{"type":"boolean","title":"Default Thinking","default":true},"continuous_batching":{"type":"boolean","title":"Continuous Batching","default":true},"reasoning":{"anyOf":[{"type":"string","enum":["reasoning","hybrid","none"]},{"type":"null"}],"title":"Reasoning"},"text_encoders":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/EncoderFile"},"type":"object"},{"type":"null"}],"title":"Text Encoders"},"normalizer_ruleset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Normalizer Ruleset"},"task":{"anyOf":[{"type":"string","enum":["chat","embedding","rerank","transcription","image","speech"]},{"type":"null"}],"title":"Task"},"installable_via":{"items":{"type":"string"},"type":"array","title":"Installable Via"},"gguf_source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gguf Source Url"},"mmproj_source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mmproj Source Url"},"draft_source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Source Url"}},"additionalProperties":false,"type":"object","required":["id","label"],"title":"CatalogueVariant"},"CategoryInfo":{"properties":{"id":{"type":"string","title":"Id"},"moderation_keys":{"items":{"type":"string"},"type":"array","title":"Moderation Keys"},"recommended_action":{"type":"string","enum":["off","flag","block"],"title":"Recommended Action"}},"type":"object","required":["id","moderation_keys","recommended_action"],"title":"CategoryInfo"},"ChangeRoleRequest":{"properties":{"role":{"type":"string","title":"Role"}},"type":"object","required":["role"],"title":"ChangeRoleRequest"},"ChangeRoleResponse":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"role":{"type":"string","title":"Role"}},"type":"object","required":["user_id","role"],"title":"ChangeRoleResponse"},"CheckoutRequest":{"properties":{"price_id":{"type":"string","title":"Price Id"},"return_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return To"}},"type":"object","required":["price_id"],"title":"CheckoutRequest"},"CheckoutResponse":{"properties":{"checkout_url":{"type":"string","title":"Checkout Url"}},"type":"object","required":["checkout_url"],"title":"CheckoutResponse"},"CompatRow":{"properties":{"id":{"type":"string","title":"Id"},"model_id":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Model Id"},"gguf_architecture":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Gguf Architecture"},"architecture":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Architecture"},"capability":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Capability"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Platform"},"cpu_arch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cpu Arch"},"accelerator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accelerator"},"compute_capability":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compute Capability"},"gpu_name_pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gpu Name Pattern"},"unified_memory":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Unified Memory"},"enforcement":{"type":"string","title":"Enforcement"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"title":{"type":"string","title":"Title"},"symptom":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symptom"},"root_cause":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Root Cause"},"also_affected":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Also Affected"},"resolved_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolved Version"},"github_issue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Github Issue"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","enforcement","title","created_at","updated_at"],"title":"CompatRow"},"CompatUpdate":{"properties":{"model_id":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Model Id"},"gguf_architecture":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Gguf Architecture"},"architecture":{"anyOf":[{"items":{"type":"string","enum":["dense","moe","hybrid","diffusion"]},"type":"array"},{"type":"null"}],"title":"Architecture"},"capability":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Capability"},"platform":{"anyOf":[{"type":"string","enum":["darwin","windows","linux"]},{"type":"null"}],"title":"Platform"},"cpu_arch":{"anyOf":[{"type":"string","enum":["arm64","amd64"]},{"type":"null"}],"title":"Cpu Arch"},"accelerator":{"anyOf":[{"type":"string","enum":["metal","cuda","vulkan","cpu"]},{"type":"null"}],"title":"Accelerator"},"compute_capability":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compute Capability"},"gpu_name_pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gpu Name Pattern"},"unified_memory":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Unified Memory"},"enforcement":{"anyOf":[{"type":"string","enum":["none","warn","block"]},{"type":"null"}],"title":"Enforcement"},"status":{"anyOf":[{"type":"string","enum":["broken","degraded","fixed"]},{"type":"null"}],"title":"Status"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"symptom":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symptom"},"root_cause":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Root Cause"},"also_affected":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Also Affected"},"resolved_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolved Version"},"github_issue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Github Issue"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"additionalProperties":false,"type":"object","title":"CompatUpdate","description":"Partial update — only supplied fields change. Cannot clear the last model\nmatcher (the DB CHECK would reject it; validated per-row in the handler).\n\nA matcher is REPLACED, not appended to: sending\n``{\"gguf_architecture\": [\"qwen35\", \"qwen35moe\"]}`` sets exactly that set, and\n``[]``/``null`` clears it to the wildcard."},"CompatWrite":{"properties":{"model_id":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Model Id"},"gguf_architecture":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Gguf Architecture"},"architecture":{"anyOf":[{"items":{"type":"string","enum":["dense","moe","hybrid","diffusion"]},"type":"array"},{"type":"null"}],"title":"Architecture"},"capability":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Capability"},"platform":{"anyOf":[{"type":"string","enum":["darwin","windows","linux"]},{"type":"null"}],"title":"Platform"},"cpu_arch":{"anyOf":[{"type":"string","enum":["arm64","amd64"]},{"type":"null"}],"title":"Cpu Arch"},"accelerator":{"anyOf":[{"type":"string","enum":["metal","cuda","vulkan","cpu"]},{"type":"null"}],"title":"Accelerator"},"compute_capability":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compute Capability"},"gpu_name_pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gpu Name Pattern"},"unified_memory":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Unified Memory"},"enforcement":{"type":"string","enum":["none","warn","block"],"title":"Enforcement","default":"warn"},"status":{"anyOf":[{"type":"string","enum":["broken","degraded","fixed"]},{"type":"null"}],"title":"Status"},"title":{"type":"string","title":"Title"},"symptom":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symptom"},"root_cause":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Root Cause"},"also_affected":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Also Affected"},"resolved_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolved Version"},"github_issue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Github Issue"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"additionalProperties":false,"type":"object","required":["title"],"title":"CompatWrite","description":"Create body. At least one MODEL matcher must be non-empty (mirrors the DB\nCHECK). Each accepts either a single value or a list of them."},"ComputeModelOut":{"properties":{"model_id":{"type":"string","title":"Model Id"},"name":{"type":"string","title":"Name"},"publisher":{"type":"string","title":"Publisher"},"parameter_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parameter Size"},"default_variant_id":{"type":"string","title":"Default Variant Id"},"variants":{"items":{"$ref":"#/components/schemas/ComputeModelVariantOut"},"type":"array","title":"Variants"}},"type":"object","required":["model_id","name","publisher","parameter_size","default_variant_id","variants"],"title":"ComputeModelOut","description":"A catalogue model the org can start a rental with.\n\nPowers the optional \"what will you run?\" picker on the rent page. Choosing\none filters the GPU cards to those that fit and pre-installs it on the box;\nthe precision picker chooses which variant, defaulting to ``default_variant_id``."},"ComputeModelVariantOut":{"properties":{"variant_id":{"type":"string","title":"Variant Id"},"label":{"type":"string","title":"Label"},"parameter_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parameter Size"},"quantization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quantization"},"min_vram_gb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Vram Gb"},"min_ram_gb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Ram Gb"}},"type":"object","required":["variant_id","label","parameter_size","quantization","min_vram_gb"],"title":"ComputeModelVariantOut","description":"One precision/size a model can be rented at — a picker option."},"ConfidentialOut":{"properties":{"status":{"type":"string","enum":["pending","verified","failed"],"title":"Status"},"checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Checked At"},"cpu":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cpu"},"gpu_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Gpu Count"}},"type":"object","required":["status"],"title":"ConfidentialOut","description":"What a confidential rental's machine proved (``gpu_attestation``)."},"ConfidentialTierOut":{"properties":{"available":{"type":"boolean","title":"Available"},"max_ram_gb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Ram Gb"}},"type":"object","required":["available"],"title":"ConfidentialTierOut"},"ConfirmPreview":{"properties":{"email":{"type":"string","title":"Email"},"org_name":{"type":"string","title":"Org Name"}},"type":"object","required":["email","org_name"],"title":"ConfirmPreview"},"ConfirmResult":{"properties":{"email":{"type":"string","title":"Email"},"org_name":{"type":"string","title":"Org Name"}},"type":"object","required":["email","org_name"],"title":"ConfirmResult"},"ContactRequest":{"properties":{"gpu":{"type":"string","maxLength":200,"title":"Gpu"},"quantity":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Quantity"},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"}},"type":"object","required":["gpu","quantity"],"title":"ContactRequest"},"ContentFilterPolicy":{"properties":{"models":{"items":{"type":"string"},"type":"array","maxItems":2,"minItems":1,"title":"Models"},"check_requests":{"type":"boolean","title":"Check Requests","default":true},"check_responses":{"type":"boolean","title":"Check Responses","default":true},"actions":{"additionalProperties":{"type":"string","enum":["off","flag","block"]},"type":"object","title":"Actions"},"response_actions":{"anyOf":[{"additionalProperties":{"type":"string","enum":["off","flag","block"]},"type":"object"},{"type":"null"}],"title":"Response Actions"},"on_unavailable":{"type":"string","enum":["block","allow"],"title":"On Unavailable","default":"block"}},"additionalProperties":false,"type":"object","required":["models"],"title":"ContentFilterPolicy","description":"One policy: which moderation models check what, and what each category does.\n\nSame shape on a key (``mode: \"on\"``) and as the organisation default."},"CreateAdminApiKeyRequest":{"properties":{"name":{"type":"string","title":"Name"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"}},"type":"object","required":["name"],"title":"CreateAdminApiKeyRequest"},"CreateAdminApiKeyResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"created_by":{"type":"string","format":"uuid","title":"Created By"},"created_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Email"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"is_active":{"type":"boolean","title":"Is Active"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"key":{"type":"string","title":"Key"}},"type":"object","required":["id","name","key_prefix","created_by","created_at","last_used_at","expires_at","is_active","key"],"title":"CreateAdminApiKeyResponse"},"CreateApiKeyRequest":{"properties":{"name":{"type":"string","title":"Name"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"}},"type":"object","required":["name"],"title":"CreateApiKeyRequest"},"CreateApiKeyResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"is_active":{"type":"boolean","title":"Is Active"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"owner_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Email"},"is_own":{"type":"boolean","title":"Is Own","default":false},"owner_is_member":{"type":"boolean","title":"Owner Is Member","default":true},"created_by_api_key_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By Api Key Id"},"rotated_by_api_key_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Rotated By Api Key Id"},"content_filter":{"anyOf":[{"$ref":"#/components/schemas/KeyContentFilter"},{"type":"null"}]},"key":{"type":"string","title":"Key"}},"type":"object","required":["id","name","key_prefix","created_at","last_used_at","expires_at","is_active","scopes","key"],"title":"CreateApiKeyResponse"},"CreateEnrolTokenRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","title":"CreateEnrolTokenRequest"},"CreateWorkerKeyRequest":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"CreateWorkerKeyRequest"},"CreatedWorkerKeyResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"key_fingerprint":{"type":"string","title":"Key Fingerprint"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"is_active":{"type":"boolean","title":"Is Active"},"active_worker_count":{"type":"integer","title":"Active Worker Count","default":0},"managed":{"type":"boolean","title":"Managed","default":false},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"private_key":{"type":"string","title":"Private Key"}},"type":"object","required":["id","name","key_fingerprint","created_at","revoked_at","is_active","private_key"],"title":"CreatedWorkerKeyResponse"},"CreditAllocation":{"properties":{"amount_pence":{"type":"integer","title":"Amount Pence"},"remaining_pence":{"type":"integer","title":"Remaining Pence"},"source":{"type":"string","title":"Source"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"expired":{"type":"boolean","title":"Expired"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["amount_pence","remaining_pence","source","expires_at","expired","created_at"],"title":"CreditAllocation","description":"One discrete credit allocation (voucher). An org can hold several at once,\neach with its own amount, remaining balance, and expiry — so they're listed\nindividually rather than collapsed into a single figure. The operator ``note``\nis deliberately NOT exposed to the customer."},"CreditTransaction":{"properties":{"kind":{"type":"string","title":"Kind"},"source":{"type":"string","title":"Source"},"amount_pence":{"type":"integer","title":"Amount Pence"},"rental_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rental Id"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["kind","source","amount_pence","rental_id","created_at"],"title":"CreditTransaction"},"CreditsResponse":{"properties":{"wallet_pence":{"type":"integer","title":"Wallet Pence"},"free_pence":{"type":"integer","title":"Free Pence"},"free_expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Free Expires At"},"available_pence":{"type":"integer","title":"Available Pence"},"spend_blocked":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Spend Blocked"},"allocations":{"items":{"$ref":"#/components/schemas/CreditAllocation"},"type":"array","title":"Allocations"},"transactions":{"items":{"$ref":"#/components/schemas/CreditTransaction"},"type":"array","title":"Transactions"}},"type":"object","required":["wallet_pence","free_pence","free_expires_at","available_pence","allocations","transactions"],"title":"CreditsResponse"},"DailyUsage":{"properties":{"date":{"type":"string","title":"Date"},"requests":{"type":"integer","title":"Requests"},"total_tokens":{"type":"integer","title":"Total Tokens"},"prompt_tokens":{"type":"integer","title":"Prompt Tokens"},"completion_tokens":{"type":"integer","title":"Completion Tokens"},"images_generated":{"type":"integer","title":"Images Generated","default":0}},"type":"object","required":["date","requests","total_tokens","prompt_tokens","completion_tokens"],"title":"DailyUsage"},"DauPoint":{"properties":{"date":{"type":"string","format":"date","title":"Date"},"active_users":{"type":"integer","title":"Active Users"}},"type":"object","required":["date","active_users"],"title":"DauPoint"},"EncoderFile":{"properties":{"repo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo"},"file":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sha256"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"}},"additionalProperties":false,"type":"object","title":"EncoderFile","description":"A separate text encoder shipped alongside a diffusion checkpoint.\n\nSome all-in-one diffusion GGUFs omit the text encoders the architecture\nneeds (e.g. FLUX's transformer-only GGUF has neither CLIP-L nor T5-XXL;\nSD3.5 ships CLIP but no T5-XXL). Without them the prompt conditioning is\nempty and the model returns a coherent-but-prompt-ignoring image. The\nworker downloads each encoder next to the main GGUF and passes it to\nstable-diffusion.cpp.\n\n``repo`` / ``file`` are authoring-only — they let ``backfill`` re-resolve\n``url`` / ``sha256`` / ``size_bytes`` on every rebuild and are stripped\nfrom the public ``/catalogue`` response (see ``_RESPONSE_EXCLUDE``).\n``url`` + ``sha256`` are the paired install contract, same rule as the\n``gguf_*`` / ``mmproj_*`` fields."},"EngagementMetrics":{"properties":{"mau":{"type":"integer","title":"Mau"},"wau":{"type":"integer","title":"Wau"},"dau":{"type":"integer","title":"Dau"},"stickiness_pct":{"type":"number","title":"Stickiness Pct"},"active_orgs_30d":{"type":"integer","title":"Active Orgs 30D"},"total_orgs":{"type":"integer","title":"Total Orgs"},"adoption_pct":{"type":"number","title":"Adoption Pct"},"dau_series":{"items":{"$ref":"#/components/schemas/DauPoint"},"type":"array","title":"Dau Series"}},"type":"object","required":["mau","wau","dau","stickiness_pct","active_orgs_30d","total_orgs","adoption_pct","dau_series"],"title":"EngagementMetrics"},"EnrolTokenResponse":{"properties":{"token":{"type":"string","title":"Token"},"name":{"type":"string","title":"Name"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["token","name","expires_at"],"title":"EnrolTokenResponse"},"FitDevice":{"properties":{"total_bytes":{"type":"integer","maximum":1.152921504606847e+18,"minimum":0.0,"title":"Total Bytes"},"memory_kind":{"type":"string","enum":["dedicated","unified","system"],"title":"Memory Kind","default":"dedicated"}},"additionalProperties":false,"type":"object","required":["total_bytes"],"title":"FitDevice"},"FitRequest":{"properties":{"devices":{"items":{"$ref":"#/components/schemas/FitDevice"},"type":"array","maxItems":64,"title":"Devices"},"system_memory_bytes":{"anyOf":[{"type":"integer","maximum":1.152921504606847e+18,"minimum":0.0},{"type":"null"}],"title":"System Memory Bytes"},"free_disk_bytes":{"anyOf":[{"type":"integer","maximum":1.152921504606847e+18,"minimum":0.0},{"type":"null"}],"title":"Free Disk Bytes"},"model_id":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Model Id"}},"additionalProperties":false,"type":"object","required":["devices"],"title":"FitRequest"},"FitResponse":{"properties":{"data":{"additionalProperties":{"type":"string"},"type":"object","title":"Data"}},"type":"object","required":["data"],"title":"FitResponse"},"FlagDetail":{"properties":{"key":{"type":"string","title":"Key"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner"},"status":{"type":"string","enum":["enabled","disabled","per_org"],"title":"Status"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"orphaned":{"type":"boolean","title":"Orphaned"},"orgs":{"items":{"$ref":"#/components/schemas/routers__feature_flags_admin__EnrolledOrg"},"type":"array","title":"Orgs"}},"type":"object","required":["key","description","owner","status","updated_at","orphaned","orgs"],"title":"FlagDetail"},"FlagForOrgItem":{"properties":{"key":{"type":"string","title":"Key"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner"},"status":{"type":"string","enum":["enabled","disabled","per_org"],"title":"Status"},"effective":{"type":"boolean","title":"Effective"},"enrolled":{"type":"boolean","title":"Enrolled"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["key","description","owner","status","effective","enrolled","updated_at"],"title":"FlagForOrgItem"},"FlagListItem":{"properties":{"key":{"type":"string","title":"Key"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"owner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner"},"status":{"type":"string","enum":["enabled","disabled","per_org"],"title":"Status"},"enrolled_count":{"type":"integer","title":"Enrolled Count"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"orphaned":{"type":"boolean","title":"Orphaned"}},"type":"object","required":["key","description","owner","status","enrolled_count","updated_at","orphaned"],"title":"FlagListItem"},"FlagStatusUpdate":{"properties":{"status":{"type":"string","enum":["enabled","disabled","per_org"],"title":"Status"}},"type":"object","required":["status"],"title":"FlagStatusUpdate"},"FlagsResponse":{"properties":{"flags":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Flags"}},"type":"object","required":["flags"],"title":"FlagsResponse"},"FxIn":{"properties":{"usd_gbp":{"type":"number","title":"Usd Gbp"},"as_of":{"type":"string","format":"date","title":"As Of"},"note":{"type":"string","title":"Note","default":""}},"type":"object","required":["usd_gbp","as_of"],"title":"FxIn"},"GgufPart":{"properties":{"url":{"type":"string","title":"Url"},"sha256":{"type":"string","title":"Sha256"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"}},"additionalProperties":false,"type":"object","required":["url","sha256"],"title":"GgufPart","description":"One shard of a multi-part (sharded) GGUF.\n\nLarge models ship as ``model-00001-of-00003.gguf`` … on HuggingFace —\nllama.cpp loads them by pointing at the first shard and auto-discovering\nthe siblings, so the worker downloads and SHA-verifies every part. The\nlist order IS the shard order (part *i* → ``-0000(i+1)-of-NNNNN.gguf``);\n``catalogue_resolve.pick_gguf_part_set`` returns them sorted by shard index."},"GpuModelIn":{"properties":{"id":{"type":"string","title":"Id"},"vendor":{"type":"string","title":"Vendor"},"model":{"type":"string","title":"Model"},"vram_gb":{"type":"integer","title":"Vram Gb"},"generation":{"type":"string","title":"Generation"}},"type":"object","required":["id","vendor","model","vram_gb","generation"],"title":"GpuModelIn"},"GpuModelPatch":{"properties":{"vendor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vendor"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"vram_gb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Vram Gb"},"generation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generation"}},"type":"object","title":"GpuModelPatch"},"GuardFamilyInfo":{"properties":{"family":{"type":"string","title":"Family"},"checks_images":{"type":"boolean","title":"Checks Images"},"coverage":{"additionalProperties":{"type":"string","enum":["full","partial","none"]},"type":"object","title":"Coverage"},"verdict_only":{"type":"boolean","title":"Verdict Only","default":false}},"type":"object","required":["family","checks_images","coverage"],"title":"GuardFamilyInfo"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HostWorkerRequest":{"properties":{"name":{"type":"string","title":"Name"},"managed":{"type":"boolean","title":"Managed","default":false}},"type":"object","required":["name"],"title":"HostWorkerRequest"},"HostWorkerResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"key_fingerprint":{"type":"string","title":"Key Fingerprint"},"private_key":{"type":"string","title":"Private Key"},"install_command":{"type":"string","title":"Install Command"}},"type":"object","required":["id","name","key_fingerprint","private_key","install_command"],"title":"HostWorkerResponse"},"HostedApiInterestEntry":{"properties":{"org_id":{"type":"string","format":"uuid","title":"Org Id"},"org_name":{"type":"string","title":"Org Name"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["org_id","org_name","user_id","created_at"],"title":"HostedApiInterestEntry"},"HostedApiInterestList":{"properties":{"count":{"type":"integer","title":"Count"},"entries":{"items":{"$ref":"#/components/schemas/HostedApiInterestEntry"},"type":"array","title":"Entries"}},"type":"object","required":["count","entries"],"title":"HostedApiInterestList"},"HostedApiInterestStatus":{"properties":{"registered":{"type":"boolean","title":"Registered"}},"type":"object","required":["registered"],"title":"HostedApiInterestStatus"},"IdleTimeoutUpdate":{"properties":{"idle_timeout_minutes":{"type":"integer","title":"Idle Timeout Minutes"}},"type":"object","required":["idle_timeout_minutes"],"title":"IdleTimeoutUpdate"},"InflightRequest":{"properties":{"task_id":{"type":"string","title":"Task Id"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"worker_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Worker Id"},"worker_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Worker Name"},"request_type":{"type":"string","title":"Request Type","default":"chat"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"elapsed_ms":{"type":"integer","title":"Elapsed Ms"},"tokens_generated":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tokens Generated"}},"type":"object","required":["task_id","started_at","elapsed_ms"],"title":"InflightRequest","description":"A request currently running on a worker (no usage_logs row yet)."},"InviteInfoResponse":{"properties":{"valid":{"type":"boolean","title":"Valid"},"expired":{"type":"boolean","title":"Expired","default":false},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"org_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Name"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"has_account":{"type":"boolean","title":"Has Account","default":false}},"type":"object","required":["valid"],"title":"InviteInfoResponse"},"InviteRequest":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"role":{"type":"string","title":"Role","default":"member"},"invitation_type":{"type":"string","title":"Invitation Type","default":"one_time"}},"type":"object","title":"InviteRequest"},"InvoiceResponse":{"properties":{"id":{"type":"string","title":"Id"},"number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"amount_paid":{"type":"integer","title":"Amount Paid"},"currency":{"type":"string","title":"Currency"},"period_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period Start"},"period_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period End"},"created":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created"},"hosted_invoice_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hosted Invoice Url"},"invoice_pdf":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invoice Pdf"}},"type":"object","required":["id","number","status","amount_paid","currency","period_start","period_end","created","hosted_invoice_url","invoice_pdf"],"title":"InvoiceResponse"},"JourneyAction":{"properties":{"type":{"type":"string","title":"Type"},"at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"At"},"path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"time_spent_s":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Time Spent S"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value"},"goal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Goal"},"keyword":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Keyword"}},"type":"object","required":["type"],"title":"JourneyAction"},"KVCachePrecisionUpdate":{"properties":{"precision":{"type":"string","enum":["auto","f16","q8_0"],"title":"Precision"}},"type":"object","required":["precision"],"title":"KVCachePrecisionUpdate"},"KVDiskCacheMaxGBUpdate":{"properties":{"max_gb":{"type":"integer","maximum":1000000.0,"minimum":0.0,"title":"Max Gb"}},"type":"object","required":["max_gb"],"title":"KVDiskCacheMaxGBUpdate"},"KVDiskCacheUpdate":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"KVDiskCacheUpdate"},"KVPrefixCacheUpdate":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"KVPrefixCacheUpdate"},"KVRAMCacheUpdate":{"properties":{"percent":{"anyOf":[{"type":"integer","maximum":90.0,"minimum":0.0},{"type":"null"}],"title":"Percent"}},"type":"object","required":["percent"],"title":"KVRAMCacheUpdate"},"KeyContentFilter":{"properties":{"mode":{"type":"string","enum":["off","on"],"title":"Mode"},"policy":{"anyOf":[{"$ref":"#/components/schemas/ContentFilterPolicy"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["mode"],"title":"KeyContentFilter","description":"A key's own setting. ``null`` instead of this object means \"follow the\norganisation default\"."},"LoginEvent":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"action":{"type":"string","title":"Action"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ip Address"},"user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Agent"}},"type":"object","required":["id","created_at","action"],"title":"LoginEvent"},"MaxConcurrentUpdate":{"properties":{"max_concurrent":{"type":"integer","title":"Max Concurrent"}},"type":"object","required":["max_concurrent"],"title":"MaxConcurrentUpdate"},"MemberResponse":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"role":{"type":"string","title":"Role"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["user_id","role"],"title":"MemberResponse"},"MirrorPurgeConfirmRequest":{"properties":{"confirm_token":{"type":"string","maxLength":4096,"minLength":1,"title":"Confirm Token"}},"additionalProperties":false,"type":"object","required":["confirm_token"],"title":"MirrorPurgeConfirmRequest"},"MirrorPurgePlanRequest":{"properties":{"variant_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Variant Id"},"model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Id"},"allow_installed":{"type":"boolean","title":"Allow Installed","default":false},"override_reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Override Reason"},"check_source":{"type":"boolean","title":"Check Source","default":true}},"additionalProperties":false,"type":"object","title":"MirrorPurgePlanRequest","description":"What to remove. Exactly one of ``variant_id`` and ``model_id``."},"MirrorSweepRequest":{"properties":{"dry_run":{"type":"boolean","title":"Dry Run","default":true},"min_age_hours":{"type":"integer","maximum":8760.0,"minimum":1.0,"title":"Min Age Hours","default":24},"max_delete":{"type":"integer","maximum":1000.0,"minimum":0.0,"title":"Max Delete","default":200}},"additionalProperties":false,"type":"object","title":"MirrorSweepRequest","description":"Options for :func:`sweep_mirror`. Defaults are the safe ones."},"MirrorTriggerRequest":{"properties":{"force":{"type":"boolean","title":"Force","default":false},"engine":{"anyOf":[{"type":"string","enum":["v1","v2"]},{"type":"null"}],"title":"Engine"}},"additionalProperties":false,"type":"object","title":"MirrorTriggerRequest","description":"Body for the mirror-trigger routes (``/{model_id}/mirror``,\n``/variants/{variant_id}/mirror``, ``/mirror-all``).\n\n``force`` re-transfers every file even when a same-size object already sits at\nits content-addressed R2 key. Off by default: a normal mirror stays idempotent.\n\n- **v1**: the size-only short-circuit can't repair a same-size *hash-wrong*\n  object (a read-back verification mismatch, #1506), so ``force=true`` is the\n  operator \"repair\" switch for exactly that case (#1620).\n- **v2** checks every object already at its key against its pin on a normal\n  re-mirror (a read-back, unless those exact bytes already passed one) and\n  replaces one that doesn't match, unless the variant is published, so it\n  rarely needs ``force``. Its uploads\n  delete the old object first, so ``force`` is refused (409) for a live or\n  published variant, and a file another live or published variant pins is\n  read back rather than replaced.\n\nIt also widens a model-grain trigger to the model's ``live`` variants, which\nit otherwise skips. A bulk ``mirror-all`` skips them either way."},"MirrorVerifySweepRequest":{"properties":{"dry_run":{"type":"boolean","title":"Dry Run","default":true},"limit":{"type":"integer","maximum":100000.0,"minimum":0.0,"title":"Limit","default":500},"force":{"type":"boolean","title":"Force","default":false}},"additionalProperties":false,"type":"object","title":"MirrorVerifySweepRequest","description":"Options for :func:`mirror_verify_sweep`. ``dry_run`` defaults on."},"ModelDownloadOut":{"properties":{"total":{"type":"integer","title":"Total"},"completed":{"type":"integer","title":"Completed"},"progress_pct":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Progress Pct"}},"type":"object","required":["total","completed","progress_pct"],"title":"ModelDownloadOut","description":"Progress of the model installs a freshly-connected rented worker is\nrunning. Present only while at least one install job is still in flight —\nonce every model is in, the field drops to null and the rental reads \"ready\".\n\nSurfaced so the console can show \"Downloading models · X%\" instead of a bare\n\"Running\" for the window between the worker connecting and it actually being\nable to serve. Drawn from the existing ``worker_model_jobs`` progress, not a\nnew signal."},"ModelInstallRequest":{"properties":{"model_id":{"type":"string","title":"Model Id"},"backend":{"anyOf":[{"type":"string","enum":["llamacpp","whispercpp"]},{"type":"null"}],"title":"Backend"}},"type":"object","required":["model_id"],"title":"ModelInstallRequest"},"ModelJob":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"worker_id":{"type":"string","title":"Worker Id"},"model_id":{"type":"string","title":"Model Id"},"action":{"type":"string","enum":["install","uninstall","load","unload"],"title":"Action"},"backend":{"type":"string","title":"Backend"},"status":{"type":"string","enum":["queued","running","success","error","interrupted"],"title":"Status"},"progress_pct":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Progress Pct"},"downloaded_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Downloaded Bytes"},"total_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Bytes"},"progress_part":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Progress Part"},"progress_parts":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Progress Parts"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"superseded":{"type":"boolean","title":"Superseded","default":false}},"type":"object","required":["id","worker_id","model_id","action","backend","status","created_at","updated_at"],"title":"ModelJob"},"ModerationResponse":{"properties":{"id":{"type":"string","title":"Id"},"model":{"type":"string","title":"Model"},"results":{"items":{"$ref":"#/components/schemas/ModerationResult"},"type":"array","title":"Results"},"pendra":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Pendra"}},"type":"object","required":["id","model","results"],"title":"ModerationResponse"},"ModerationResult":{"properties":{"flagged":{"type":"boolean","title":"Flagged"},"categories":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Categories"},"category_scores":{"additionalProperties":{"type":"number"},"type":"object","title":"Category Scores"},"category_applied_input_types":{"additionalProperties":{"items":{"type":"string","enum":["text","image"]},"type":"array"},"type":"object","title":"Category Applied Input Types"}},"type":"object","required":["flagged","categories","category_scores","category_applied_input_types"],"title":"ModerationResult"},"MtpToggleRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"MtpToggleRequest"},"NotificationSettings":{"properties":{"notify_new_worker":{"type":"boolean","title":"Notify New Worker"}},"type":"object","required":["notify_new_worker"],"title":"NotificationSettings"},"OfferingIn":{"properties":{"id":{"type":"string","title":"Id"},"provider_id":{"type":"string","title":"Provider Id"},"region_id":{"type":"string","title":"Region Id"},"gpu_model_id":{"type":"string","title":"Gpu Model Id"},"provider_instance_type":{"type":"string","title":"Provider Instance Type"},"image":{"type":"string","title":"Image"},"accelerator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accelerator"},"gpu_count":{"type":"integer","title":"Gpu Count","default":1},"ram_gb":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Ram Gb"},"cost_per_hour":{"type":"number","title":"Cost Per Hour"},"currency":{"type":"string","title":"Currency","default":"GBP"},"confidential":{"type":"boolean","title":"Confidential","default":false},"confidential_cpu":{"anyOf":[{"type":"string","enum":["amd_sev_snp","intel_tdx"]},{"type":"null"}],"title":"Confidential Cpu"}},"type":"object","required":["id","provider_id","region_id","gpu_model_id","provider_instance_type","image","cost_per_hour"],"title":"OfferingIn"},"OfferingPatch":{"properties":{"provider_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Id"},"region_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region Id"},"gpu_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gpu Model Id"},"provider_instance_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Instance Type"},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image"},"accelerator":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accelerator"},"gpu_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Gpu Count"},"ram_gb":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Ram Gb"},"cost_per_hour":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Per Hour"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"confidential":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Confidential"},"confidential_cpu":{"anyOf":[{"type":"string","enum":["amd_sev_snp","intel_tdx"]},{"type":"null"}],"title":"Confidential Cpu"}},"type":"object","title":"OfferingPatch"},"OrgContentFilter":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"policy":{"anyOf":[{"$ref":"#/components/schemas/ContentFilterPolicy"},{"type":"null"}]},"inheriting_keys":{"type":"integer","title":"Inheriting Keys"},"inheriting_key_names":{"items":{"type":"string"},"type":"array","title":"Inheriting Key Names"},"own_setting_keys":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Own Setting Keys"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"updated_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated By Email"},"categories":{"items":{"$ref":"#/components/schemas/CategoryInfo"},"type":"array","title":"Categories"},"guard_families":{"items":{"$ref":"#/components/schemas/GuardFamilyInfo"},"type":"array","title":"Guard Families"},"available":{"type":"boolean","title":"Available"}},"type":"object","required":["enabled","policy","inheriting_keys","inheriting_key_names","updated_at","updated_by_email","categories","guard_families","available"],"title":"OrgContentFilter","description":"``GET``/``PUT /content-filter`` response."},"OrgContentFilterUpdate":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"policy":{"anyOf":[{"$ref":"#/components/schemas/ContentFilterPolicy"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["enabled"],"title":"OrgContentFilterUpdate","description":"``PUT /content-filter``: the organisation default."},"OrgResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"is_primary_owner":{"type":"boolean","title":"Is Primary Owner","default":false}},"type":"object","required":["id","name","created_at"],"title":"OrgResponse"},"PaymentMethodResponse":{"properties":{"has_card":{"type":"boolean","title":"Has Card"}},"type":"object","required":["has_card"],"title":"PaymentMethodResponse"},"PendingChange":{"properties":{"email":{"type":"string","title":"Email"},"expires_at":{"type":"string","title":"Expires At"}},"type":"object","required":["email","expires_at"],"title":"PendingChange"},"PendingInviteResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"account_id":{"type":"string","format":"uuid","title":"Account Id"},"account_name":{"type":"string","title":"Account Name"},"role":{"type":"string","title":"Role"},"invitation_type":{"type":"string","title":"Invitation Type"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","account_id","account_name","role","invitation_type","created_at"],"title":"PendingInviteResponse"},"PlacementAuditOut":{"properties":{"rental_id":{"type":"string","format":"uuid","title":"Rental Id"},"gpu_model_id":{"type":"string","title":"Gpu Model Id"},"gpu_label":{"type":"string","title":"Gpu Label"},"requested_tier_id":{"type":"string","title":"Requested Tier Id"},"requested_tier_label":{"type":"string","title":"Requested Tier Label"},"delivered_tier_id":{"type":"string","title":"Delivered Tier Id"},"delivered_tier_label":{"type":"string","title":"Delivered Tier Label"},"tier_rule_version":{"type":"integer","title":"Tier Rule Version"},"catalogue_hash":{"type":"string","title":"Catalogue Hash"},"provider_name":{"type":"string","title":"Provider Name"},"provider_legal_entity":{"type":"string","title":"Provider Legal Entity"},"ownership_jurisdiction":{"type":"string","title":"Ownership Jurisdiction"},"region_label":{"type":"string","title":"Region Label"},"region_country":{"type":"string","title":"Region Country"},"placed_at":{"type":"string","format":"date-time","title":"Placed At"},"price_per_hour_gbp":{"type":"number","title":"Price Per Hour Gbp"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"stopped_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Stopped At"}},"type":"object","required":["rental_id","gpu_model_id","gpu_label","requested_tier_id","requested_tier_label","delivered_tier_id","delivered_tier_label","tier_rule_version","catalogue_hash","provider_name","provider_legal_entity","ownership_jurisdiction","region_label","region_country","placed_at","price_per_hour_gbp","started_at","stopped_at"],"title":"PlacementAuditOut","description":"Where a rental actually ran, and under which rule.\n\nThe only place a customer sees the provider. Every field is read from the\nfrozen placement row rather than the live catalogue, so a later deploy\ncannot rewrite what someone was told about a workload that has already run."},"PlanOverrideRequest":{"properties":{"plan_name":{"type":"string","title":"Plan Name"},"max_workers":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Workers"},"period_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period End"},"billing_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Email"}},"type":"object","required":["plan_name"],"title":"PlanOverrideRequest"},"PlatformStats":{"properties":{"total_users":{"type":"integer","title":"Total Users"},"total_orgs":{"type":"integer","title":"Total Orgs"},"total_active_workers":{"type":"integer","title":"Total Active Workers"},"total_api_keys":{"type":"integer","title":"Total Api Keys"},"total_admins":{"type":"integer","title":"Total Admins"},"total_requests_30d":{"type":"integer","title":"Total Requests 30D"},"user_logins_30d":{"type":"integer","title":"User Logins 30D"},"new_users_30d":{"type":"integer","title":"New Users 30D"},"new_orgs_30d":{"type":"integer","title":"New Orgs 30D"},"new_worker_keys_30d":{"type":"integer","title":"New Worker Keys 30D"}},"type":"object","required":["total_users","total_orgs","total_active_workers","total_api_keys","total_admins","total_requests_30d","user_logins_30d","new_users_30d","new_orgs_30d","new_worker_keys_30d"],"title":"PlatformStats"},"PortalResponse":{"properties":{"portal_url":{"type":"string","title":"Portal Url"}},"type":"object","required":["portal_url"],"title":"PortalResponse"},"PriceCardIn":{"properties":{"gpu_model_id":{"type":"string","title":"Gpu Model Id"},"tier_id":{"type":"string","title":"Tier Id"},"price_per_hour":{"type":"number","title":"Price Per Hour"},"currency":{"type":"string","title":"Currency","default":"GBP"},"effective_from":{"type":"string","format":"date","title":"Effective From"},"effective_to":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effective To"}},"type":"object","required":["gpu_model_id","tier_id","price_per_hour","effective_from"],"title":"PriceCardIn"},"PriceCardPatch":{"properties":{"price_per_hour":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Per Hour"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"effective_to":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effective To"}},"type":"object","title":"PriceCardPatch"},"PrimaryOwnerRequest":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"}},"type":"object","required":["user_id"],"title":"PrimaryOwnerRequest"},"ProviderBreakdown":{"properties":{"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"label":{"type":"string","title":"Label"},"rentals":{"type":"integer","title":"Rentals"},"price_per_hour_gbp":{"type":"number","title":"Price Per Hour Gbp"}},"type":"object","required":["provider","label","rentals","price_per_hour_gbp"],"title":"ProviderBreakdown"},"ProviderDetail":{"properties":{"provider":{"type":"string","title":"Provider"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"type":"string","enum":["enabled","disabled","restricted"],"title":"Status"},"configured":{"type":"boolean","title":"Configured"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"orphaned":{"type":"boolean","title":"Orphaned"},"orgs":{"items":{"$ref":"#/components/schemas/AllowlistedOrg"},"type":"array","title":"Orgs"}},"type":"object","required":["provider","display_name","description","status","configured","updated_at","orphaned","orgs"],"title":"ProviderDetail"},"ProviderFacet":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"}},"type":"object","required":["key","label"],"title":"ProviderFacet"},"ProviderIn":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"legal_entity":{"type":"string","title":"Legal Entity"},"ownership_jurisdiction":{"type":"string","title":"Ownership Jurisdiction"},"client":{"type":"string","title":"Client"},"billing_increment_seconds":{"type":"integer","title":"Billing Increment Seconds","default":1},"billing_minimum_seconds":{"type":"integer","title":"Billing Minimum Seconds","default":0}},"type":"object","required":["id","name","legal_entity","ownership_jurisdiction","client"],"title":"ProviderIn"},"ProviderListItem":{"properties":{"provider":{"type":"string","title":"Provider"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"type":"string","enum":["enabled","disabled","restricted"],"title":"Status"},"configured":{"type":"boolean","title":"Configured"},"allowlisted_count":{"type":"integer","title":"Allowlisted Count"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"orphaned":{"type":"boolean","title":"Orphaned"}},"type":"object","required":["provider","display_name","description","status","configured","allowlisted_count","updated_at","orphaned"],"title":"ProviderListItem"},"ProviderPatch":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"legal_entity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Entity"},"ownership_jurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ownership Jurisdiction"},"client":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client"},"billing_increment_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Billing Increment Seconds"},"billing_minimum_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Billing Minimum Seconds"}},"type":"object","title":"ProviderPatch"},"ProviderStatusUpdate":{"properties":{"status":{"type":"string","enum":["enabled","disabled","restricted"],"title":"Status"}},"type":"object","required":["status"],"title":"ProviderStatusUpdate"},"PublicContactRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"email":{"type":"string","maxLength":254,"title":"Email"},"organisation":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Organisation"},"message":{"type":"string","maxLength":5000,"minLength":1,"title":"Message"}},"type":"object","required":["name","email","message"],"title":"PublicContactRequest"},"PublisherCreate":{"properties":{"name":{"type":"string","title":"Name"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"homepage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Homepage"}},"additionalProperties":false,"type":"object","required":["name"],"title":"PublisherCreate"},"PublisherOut":{"properties":{"name":{"type":"string","title":"Name"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"homepage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Homepage"},"model_count":{"type":"integer","title":"Model Count","default":0}},"type":"object","required":["name"],"title":"PublisherOut"},"PublisherUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"homepage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Homepage"}},"additionalProperties":false,"type":"object","title":"PublisherUpdate"},"PurgeOrphansResponse":{"properties":{"deleted":{"items":{"type":"string"},"type":"array","title":"Deleted"}},"type":"object","required":["deleted"],"title":"PurgeOrphansResponse"},"ReasonBreakdown":{"properties":{"reason_code":{"type":"string","title":"Reason Code"},"label":{"type":"string","title":"Label"},"rentals":{"type":"integer","title":"Rentals"}},"type":"object","required":["reason_code","label","rentals"],"title":"ReasonBreakdown"},"ReasoningControls":{"properties":{"mandatory":{"type":"boolean","title":"Mandatory"},"toggle":{"type":"boolean","title":"Toggle"},"default_enabled":{"type":"boolean","title":"Default Enabled"},"supported_efforts":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Supported Efforts"},"default_effort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Effort"},"effort_aliases":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Effort Aliases"},"budget":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Budget"}},"additionalProperties":false,"type":"object","required":["mandatory","toggle","default_enabled"],"title":"ReasoningControls","description":"How a request controls one reasoning variant's thinking, for clients that\nbuild a model picker or a provider listing (models.dev) from the catalogue.\n\nDerived at load time from the variant's reasoning label, its\n``default_thinking`` and the chat template its last verify read\n(``template_thinking_control`` and the effort trio, migrations 079 and 091).\nNever stored or authored."},"RedeemEnrolTokenRequest":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"RedeemEnrolTokenRequest"},"RedeemedEnrolTokenResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"key_fingerprint":{"type":"string","title":"Key Fingerprint"},"private_key":{"type":"string","title":"Private Key"}},"type":"object","required":["id","name","key_fingerprint","private_key"],"title":"RedeemedEnrolTokenResponse"},"RegionIn":{"properties":{"id":{"type":"string","title":"Id"},"provider_id":{"type":"string","title":"Provider Id"},"provider_region_code":{"type":"string","title":"Provider Region Code"},"country":{"type":"string","title":"Country"},"label":{"type":"string","title":"Label"}},"type":"object","required":["id","provider_id","provider_region_code","country","label"],"title":"RegionIn"},"RegionPatch":{"properties":{"provider_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Id"},"provider_region_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Region Code"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"}},"type":"object","title":"RegionPatch"},"RentInstanceRequest":{"properties":{"gpu_model_id":{"type":"string","title":"Gpu Model Id"},"tier_id":{"type":"string","title":"Tier Id"},"models":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Models"},"name":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Name"},"confidential":{"type":"boolean","title":"Confidential","default":false}},"type":"object","required":["gpu_model_id","tier_id"],"title":"RentInstanceRequest"},"RentalLogEntry":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"kind":{"type":"string","enum":["rental","refusal"],"title":"Kind"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"org_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Name"},"org_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Slug"},"status":{"type":"string","title":"Status"},"rental_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rental Status"},"reason_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason Code"},"reason_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason Label"},"reason_detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason Detail"},"gpu_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gpu Model Id"},"gpu_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gpu Label"},"instance_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instance Type"},"gpu_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Gpu Count"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"requested_tier_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requested Tier Id"},"delivered_tier_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delivered Tier Id"},"price_per_hour_gbp":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Per Hour Gbp"},"cost_per_hour_gbp":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Per Hour Gbp"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"stopped_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Stopped At"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"},"cost_so_far_gbp":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost So Far Gbp"},"hours_billed":{"type":"integer","title":"Hours Billed"},"request_count":{"type":"integer","title":"Request Count"},"attempts":{"type":"integer","title":"Attempts"},"attempted_providers":{"items":{"type":"string"},"type":"array","title":"Attempted Providers"},"boot_phase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Boot Phase"},"worker_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Worker Id"}},"type":"object","required":["id","kind","org_id","org_name","org_slug","status","rental_status","reason_code","reason_label","reason_detail","gpu_model_id","gpu_label","instance_type","gpu_count","provider","region","requested_tier_id","delivered_tier_id","price_per_hour_gbp","cost_per_hour_gbp","created_at","started_at","stopped_at","duration_seconds","cost_so_far_gbp","hours_billed","request_count","attempts","attempted_providers","boot_phase","worker_id"],"title":"RentalLogEntry"},"RentalLogPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RentalLogEntry"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"providers":{"items":{"$ref":"#/components/schemas/ProviderFacet"},"type":"array","title":"Providers"},"instance_types":{"items":{"type":"string"},"type":"array","title":"Instance Types"}},"type":"object","required":["items","total","limit","offset","providers","instance_types"],"title":"RentalLogPage"},"RentalOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"gpu_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gpu Model Id"},"label":{"type":"string","title":"Label"},"requested_tier_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requested Tier Id"},"tier_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier Label"},"status":{"type":"string","title":"Status"},"worker_id":{"type":"string","title":"Worker Id"},"models":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Models"},"price_per_hour_gbp":{"type":"number","title":"Price Per Hour Gbp"},"accrued_cost_gbp":{"type":"number","title":"Accrued Cost Gbp"},"hours_billed":{"type":"integer","title":"Hours Billed"},"connected":{"type":"boolean","title":"Connected"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"stopped_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Stopped At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"error_code":{"anyOf":[{"type":"string","enum":["no_capacity","placement_failed"]},{"type":"null"}],"title":"Error Code"},"boot_phase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Boot Phase"},"model_download":{"anyOf":[{"$ref":"#/components/schemas/ModelDownloadOut"},{"type":"null"}]},"confidential":{"anyOf":[{"$ref":"#/components/schemas/ConfidentialOut"},{"type":"null"}]}},"type":"object","required":["id","gpu_model_id","label","requested_tier_id","tier_label","status","worker_id","models","price_per_hour_gbp","accrued_cost_gbp","hours_billed","connected","started_at","stopped_at","created_at","error"],"title":"RentalOut"},"RentalSettingsOut":{"properties":{"monthly_budget_gbp":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Budget Gbp"},"max_instance_runtime_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Instance Runtime Hours"},"min_tier_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Min Tier Id"}},"type":"object","title":"RentalSettingsOut"},"RentalSummary":{"properties":{"window_start":{"type":"string","format":"date-time","title":"Window Start"},"active_now":{"type":"integer","title":"Active Now"},"in_progress_now":{"type":"integer","title":"In Progress Now"},"price_per_hour_gbp":{"type":"number","title":"Price Per Hour Gbp"},"cost_per_hour_gbp":{"type":"number","title":"Cost Per Hour Gbp"},"requested_24h":{"type":"integer","title":"Requested 24H"},"started_24h":{"type":"integer","title":"Started 24H"},"stopped_24h":{"type":"integer","title":"Stopped 24H"},"unfulfilled_24h":{"type":"integer","title":"Unfulfilled 24H"},"failed_24h":{"type":"integer","title":"Failed 24H"},"refused_24h":{"type":"integer","title":"Refused 24H"},"live_by_provider":{"items":{"$ref":"#/components/schemas/ProviderBreakdown"},"type":"array","title":"Live By Provider"},"stops_by_reason_24h":{"items":{"$ref":"#/components/schemas/ReasonBreakdown"},"type":"array","title":"Stops By Reason 24H"},"unfulfilled_by_reason_24h":{"items":{"$ref":"#/components/schemas/ReasonBreakdown"},"type":"array","title":"Unfulfilled By Reason 24H"}},"type":"object","required":["window_start","active_now","in_progress_now","price_per_hour_gbp","cost_per_hour_gbp","requested_24h","started_24h","stopped_24h","unfulfilled_24h","failed_24h","refused_24h","live_by_provider","stops_by_reason_24h","unfulfilled_by_reason_24h"],"title":"RentalSummary"},"RepoTreeFile":{"properties":{"path":{"type":"string","title":"Path"},"size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size"},"sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sha256"}},"type":"object","required":["path"],"title":"RepoTreeFile","description":"One file in an HF repo listing. ``sha256`` is the LFS oid where present."},"RepoTreeResponse":{"properties":{"hf_repo":{"type":"string","title":"Hf Repo"},"count":{"type":"integer","title":"Count"},"files":{"items":{"$ref":"#/components/schemas/RepoTreeFile"},"type":"array","title":"Files"}},"type":"object","required":["hf_repo","count","files"],"title":"RepoTreeResponse"},"RequestsUpdate":{"properties":{"mode":{"type":"string","enum":["automatic","limit"],"title":"Mode"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},"type":"object","required":["mode"],"title":"RequestsUpdate"},"RequireE2eBody":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"RequireE2eBody"},"RequireWorkerApprovalBody":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"RequireWorkerApprovalBody"},"ResolveRequest":{"properties":{"hf_repo":{"type":"string","title":"Hf Repo"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"publisher":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publisher"},"parameter_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parameter Size"},"context_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Length"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"additionalProperties":false,"type":"object","required":["hf_repo"],"title":"ResolveRequest","description":"Body for POST /admin/catalogue/resolve — an HF repo id + optional hints\nthat override the auto-derived draft fields (admin can also edit post-hoc)."},"ResolvedVariant":{"properties":{"id":{"type":"string","title":"Id"},"uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uuid"},"model_id":{"type":"string","title":"Model Id"},"quantization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quantization"},"previous_ids":{"items":{"type":"string"},"type":"array","title":"Previous Ids"},"match":{"type":"string","enum":["id","uuid","stem","previous_id","composite"],"title":"Match"}},"type":"object","required":["id","uuid","model_id","quantization","previous_ids","match"],"title":"ResolvedVariant","description":"One catalogue build, as ``pendra models install <name>`` installs it."},"SearchResult":{"properties":{"type":{"type":"string","title":"Type"},"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"sublabel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sublabel"},"org_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Org Id"}},"type":"object","required":["type","id","label"],"title":"SearchResult"},"ServingToggleRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"ServingToggleRequest"},"SetAdminRequest":{"properties":{"is_admin":{"type":"boolean","title":"Is Admin"}},"type":"object","required":["is_admin"],"title":"SetAdminRequest"},"SetAttributionRequest":{"properties":{"attribution":{"additionalProperties":true,"type":"object","title":"Attribution"}},"type":"object","required":["attribution"],"title":"SetAttributionRequest"},"SignupSurveyCount":{"properties":{"key":{"type":"string","title":"Key"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["key","count"],"title":"SignupSurveyCount"},"SignupSurveyRequest":{"properties":{"skipped":{"type":"boolean","title":"Skipped","default":false},"reasons":{"items":{"type":"string","enum":["privacy","uk_sovereignty","cost","sustainability","exploring","other"]},"type":"array","maxItems":6,"title":"Reasons"},"reason_other":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Reason Other"},"intent":{"anyOf":[{"type":"string","enum":["own_hardware","dedicated_gpu","hosted_api"]},{"type":"null"}],"title":"Intent"},"role":{"anyOf":[{"type":"string","enum":["developer","it_infra","tech_leader","business_leader","security_compliance","other"]},{"type":"null"}],"title":"Role"},"role_other":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Role Other"}},"type":"object","title":"SignupSurveyRequest"},"SignupSurveyStatus":{"properties":{"pending":{"type":"boolean","title":"Pending"}},"type":"object","required":["pending"],"title":"SignupSurveyStatus"},"SignupSurveySummary":{"properties":{"days":{"type":"integer","title":"Days"},"new_orgs":{"type":"integer","title":"New Orgs"},"answered":{"type":"integer","title":"Answered"},"skipped":{"type":"integer","title":"Skipped"},"reasons":{"items":{"$ref":"#/components/schemas/SignupSurveyCount"},"type":"array","title":"Reasons"},"intents":{"items":{"$ref":"#/components/schemas/SignupSurveyCount"},"type":"array","title":"Intents"},"roles":{"items":{"$ref":"#/components/schemas/SignupSurveyCount"},"type":"array","title":"Roles"},"technical":{"type":"integer","title":"Technical"},"non_technical":{"type":"integer","title":"Non Technical"}},"type":"object","required":["days","new_orgs","answered","skipped","reasons","intents","roles","technical","non_technical"],"title":"SignupSurveySummary"},"SpecDecodeCapUpdate":{"properties":{"draft_n_max":{"type":"integer","title":"Draft N Max"}},"type":"object","required":["draft_n_max"],"title":"SpecDecodeCapUpdate"},"SpeculativeDecodingUpdate":{"properties":{"mode":{"type":"string","enum":["auto","off"],"title":"Mode"}},"type":"object","required":["mode"],"title":"SpeculativeDecodingUpdate"},"SpeculativeModeUpdate":{"properties":{"mode":{"type":"string","enum":["auto","off"],"title":"Mode"}},"type":"object","required":["mode"],"title":"SpeculativeModeUpdate"},"SpendLineOut":{"properties":{"rental_id":{"type":"string","format":"uuid","title":"Rental Id"},"gpu_model_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gpu Model Id"},"label":{"type":"string","title":"Label"},"tier_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier Label"},"status":{"type":"string","title":"Status"},"price_per_hour_gbp":{"type":"number","title":"Price Per Hour Gbp"},"hours":{"type":"integer","title":"Hours"},"cost_gbp":{"type":"number","title":"Cost Gbp"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"stopped_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Stopped At"}},"type":"object","required":["rental_id","gpu_model_id","label","tier_label","status","price_per_hour_gbp","hours","cost_gbp","started_at","stopped_at"],"title":"SpendLineOut","description":"One rented instance's contribution to this month's GPU bill."},"SpendOut":{"properties":{"period_start":{"type":"string","format":"date-time","title":"Period Start"},"month_to_date_gbp":{"type":"number","title":"Month To Date Gbp"},"monthly_budget_gbp":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Monthly Budget Gbp"},"active_count":{"type":"integer","title":"Active Count"},"committed_hour_gbp":{"type":"number","title":"Committed Hour Gbp"},"lines":{"items":{"$ref":"#/components/schemas/SpendLineOut"},"type":"array","title":"Lines"}},"type":"object","required":["period_start","month_to_date_gbp","monthly_budget_gbp","active_count","committed_hour_gbp","lines"],"title":"SpendOut"},"TaskTimeoutUpdate":{"properties":{"timeout_seconds":{"type":"integer","title":"Timeout Seconds"}},"type":"object","required":["timeout_seconds"],"title":"TaskTimeoutUpdate"},"TierIn":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"},"rank":{"type":"integer","title":"Rank"},"description":{"type":"string","title":"Description"},"initial_rule":{"$ref":"#/components/schemas/TierInitialRule"}},"type":"object","required":["id","label","rank","description","initial_rule"],"title":"TierIn"},"TierInitialRule":{"properties":{"rule_version":{"type":"integer","title":"Rule Version","default":1},"effective_from":{"type":"string","format":"date","title":"Effective From"},"definition":{"additionalProperties":true,"type":"object","title":"Definition"}},"type":"object","required":["effective_from","definition"],"title":"TierInitialRule"},"TierPatch":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rank"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"TierPatch"},"TierPriceOut":{"properties":{"tier_id":{"type":"string","title":"Tier Id"},"label":{"type":"string","title":"Label"},"rank":{"type":"integer","title":"Rank"},"description":{"type":"string","title":"Description"},"price_per_hour_gbp":{"type":"number","title":"Price Per Hour Gbp"},"allowed":{"type":"boolean","title":"Allowed"},"available":{"type":"boolean","title":"Available","default":true},"max_ram_gb":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Ram Gb"},"standard":{"type":"boolean","title":"Standard","default":true},"confidential":{"anyOf":[{"$ref":"#/components/schemas/ConfidentialTierOut"},{"type":"null"}]},"confidential_required":{"type":"boolean","title":"Confidential Required","default":false}},"type":"object","required":["tier_id","label","rank","description","price_per_hour_gbp","allowed"],"title":"TierPriceOut"},"TierRuleIn":{"properties":{"tier_id":{"type":"string","title":"Tier Id"},"rule_version":{"type":"integer","title":"Rule Version"},"effective_from":{"type":"string","format":"date","title":"Effective From"},"definition":{"additionalProperties":true,"type":"object","title":"Definition"}},"type":"object","required":["tier_id","rule_version","effective_from","definition"],"title":"TierRuleIn"},"TokenRequest":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"TokenRequest"},"ToolGrammarUpdate":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"ToolGrammarUpdate"},"TopupRequest":{"properties":{"amount_gbp":{"type":"integer","title":"Amount Gbp"},"return_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return To"}},"type":"object","required":["amount_gbp"],"title":"TopupRequest"},"TopupRequestNotice":{"properties":{"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","title":"TopupRequestNotice","description":"An operator/member asking an owner to top up (operators can't charge a card)."},"UpdateAdminApiKeyRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"UpdateAdminApiKeyRequest","description":"Partial update. Every field is optional and only the ones actually present\nin the request body are written — `model_fields_set` is what distinguishes\n`\"expires_at\": null` (clear the expiry) from omitting it (leave it alone)."},"UpdateApiKeyRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"content_filter":{"anyOf":[{"$ref":"#/components/schemas/KeyContentFilter"},{"type":"null"}]}},"additionalProperties":false,"type":"object","title":"UpdateApiKeyRequest","description":"``PATCH /api-keys/{id}``. A field left out is unchanged."},"UpdateMemberRequest":{"properties":{"role":{"type":"string","title":"Role"}},"type":"object","required":["role"],"title":"UpdateMemberRequest"},"UpdateSettingsRequest":{"properties":{"monthly_budget_gbp":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Monthly Budget Gbp"},"max_instance_runtime_hours":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Max Instance Runtime Hours"},"min_tier_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Min Tier Id"}},"type":"object","title":"UpdateSettingsRequest"},"UsageBreakdown":{"properties":{"by_model":{"items":{"$ref":"#/components/schemas/UsageByModel"},"type":"array","title":"By Model"},"by_worker":{"items":{"$ref":"#/components/schemas/UsageByWorker"},"type":"array","title":"By Worker"}},"type":"object","required":["by_model","by_worker"],"title":"UsageBreakdown"},"UsageByModel":{"properties":{"model":{"type":"string","title":"Model"},"model_variant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Variant Id"},"catalogue_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Catalogue Id"},"requests":{"type":"integer","title":"Requests"},"total_tokens":{"type":"integer","title":"Total Tokens"},"prompt_tokens":{"type":"integer","title":"Prompt Tokens"},"completion_tokens":{"type":"integer","title":"Completion Tokens"},"images_generated":{"type":"integer","title":"Images Generated","default":0}},"type":"object","required":["model","requests","total_tokens","prompt_tokens","completion_tokens"],"title":"UsageByModel"},"UsageByWorker":{"properties":{"worker_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Worker Id"},"worker_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Worker Name"},"requests":{"type":"integer","title":"Requests"},"total_tokens":{"type":"integer","title":"Total Tokens"},"prompt_tokens":{"type":"integer","title":"Prompt Tokens"},"completion_tokens":{"type":"integer","title":"Completion Tokens"}},"type":"object","required":["requests","total_tokens","prompt_tokens","completion_tokens"],"title":"UsageByWorker"},"UsageLog":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"model":{"type":"string","title":"Model"},"model_variant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Variant Id"},"catalogue_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Catalogue Id"},"prompt_tokens":{"type":"integer","title":"Prompt Tokens"},"completion_tokens":{"type":"integer","title":"Completion Tokens"},"total_tokens":{"type":"integer","title":"Total Tokens"},"reasoning_tokens":{"type":"integer","title":"Reasoning Tokens","default":0},"cached_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cached Tokens"},"request_duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Request Duration Ms"},"time_to_first_token_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Time To First Token Ms"},"tokens_per_second":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tokens Per Second"},"draft_acceptance_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Draft Acceptance Rate"},"speculative_decoding":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Speculative Decoding"},"speculative_gain":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Speculative Gain"},"queue_wait_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Queue Wait Ms"},"worker_queue_wait_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Worker Queue Wait Ms"},"model_load_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Model Load Ms"},"cold_start":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Cold Start"},"status_code":{"type":"integer","title":"Status Code"},"request_type":{"type":"string","title":"Request Type","default":"chat"},"images_generated":{"type":"integer","title":"Images Generated","default":0},"audio_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Audio Seconds","default":0},"audio_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audio Format"},"worker_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Worker Id"},"worker_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Worker Name"},"backend":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Backend"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"request_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Request Id"},"encryption_kid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Encryption Kid"},"moderation_outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Moderation Outcome"},"moderation_categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Moderation Categories"},"parent_request_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Request Id"},"moderation_stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Moderation Stage"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","model","prompt_tokens","completion_tokens","total_tokens","request_duration_ms","status_code","created_at"],"title":"UsageLog"},"UsageSummary":{"properties":{"total_requests":{"type":"integer","title":"Total Requests"},"total_tokens":{"type":"integer","title":"Total Tokens"},"prompt_tokens":{"type":"integer","title":"Prompt Tokens"},"completion_tokens":{"type":"integer","title":"Completion Tokens"},"images_generated":{"type":"integer","title":"Images Generated","default":0}},"type":"object","required":["total_requests","total_tokens","prompt_tokens","completion_tokens"],"title":"UsageSummary"},"UserJourney":{"properties":{"site":{"type":"string","title":"Site"},"days":{"type":"integer","title":"Days"},"segment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Segment"},"visits":{"items":{"$ref":"#/components/schemas/AnalyticsVisit"},"type":"array","title":"Visits"},"truncated":{"type":"boolean","title":"Truncated"},"user_id":{"type":"string","title":"User Id"}},"type":"object","required":["site","days","visits","truncated","user_id"],"title":"UserJourney"},"ValidateResponse":{"properties":{"findings":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Findings"},"blocked":{"type":"boolean","title":"Blocked"}},"type":"object","required":["findings","blocked"],"title":"ValidateResponse","description":"``findings`` is the plan's ``[{field, severity, message, fix?}]``.\n\n``blocked`` is derivable from it (any finding with ``severity == 'error'``)\nand is returned anyway so the wizard's \"can I publish?\" gate reads one field\ninstead of re-implementing the severity rule in TypeScript."},"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"},"VariantAdmin":{"properties":{"id":{"type":"string","title":"Id"},"uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uuid"},"is_default":{"type":"boolean","title":"Is Default","default":false},"label":{"type":"string","title":"Label"},"parameter_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parameter Size"},"previous_ids":{"items":{"type":"string"},"type":"array","title":"Previous Ids"},"architecture":{"anyOf":[{"type":"string","enum":["dense","moe","hybrid","diffusion"]},{"type":"null"}],"title":"Architecture"},"architectures":{"anyOf":[{"items":{"type":"string","enum":["dense","moe","hybrid","diffusion"]},"type":"array"},{"type":"null"}],"title":"Architectures"},"gguf_architecture":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gguf Architecture"},"gguf_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Gguf Metadata"},"kv_bytes_per_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kv Bytes Per Token"},"estimated_vram_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Estimated Vram Bytes"},"bits_per_weight":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bits Per Weight"},"capabilities":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Capabilities"},"reasoning_controls":{"anyOf":[{"$ref":"#/components/schemas/ReasoningControls"},{"type":"null"}]},"active_parameters":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Parameters"},"base_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Model"},"original_weights":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Weights"},"quantization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quantization"},"context_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Length"},"disk_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Disk Size"},"licence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Licence"},"gguf_repo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gguf Repo"},"gguf_file":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gguf File"},"gguf_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gguf Url"},"gguf_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gguf Sha256"},"gguf_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Gguf Size Bytes"},"gguf_parts":{"anyOf":[{"items":{"$ref":"#/components/schemas/GgufPart"},"type":"array"},{"type":"null"}],"title":"Gguf Parts"},"mmproj_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mmproj Url"},"mmproj_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mmproj Sha256"},"mmproj_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mmproj Size Bytes"},"draft_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Url"},"draft_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Sha256"},"draft_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draft Size Bytes"},"embedded_mtp":{"type":"boolean","title":"Embedded Mtp","default":false},"default_thinking":{"type":"boolean","title":"Default Thinking","default":true},"continuous_batching":{"type":"boolean","title":"Continuous Batching","default":true},"reasoning":{"anyOf":[{"type":"string","enum":["reasoning","hybrid","none"]},{"type":"null"}],"title":"Reasoning"},"text_encoders":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/EncoderFile"},"type":"object"},{"type":"null"}],"title":"Text Encoders"},"normalizer_ruleset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Normalizer Ruleset"},"task":{"anyOf":[{"type":"string","enum":["chat","embedding","rerank","transcription","image","speech"]},{"type":"null"}],"title":"Task"},"installable_via":{"items":{"type":"string"},"type":"array","title":"Installable Via"},"gguf_source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gguf Source Url"},"mmproj_source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mmproj Source Url"},"draft_source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Source Url"},"family_id":{"type":"string","title":"Family Id"},"model_id":{"type":"string","title":"Model Id"},"model_capabilities":{"items":{"type":"string"},"type":"array","title":"Model Capabilities"},"capabilities_override":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Capabilities Override"},"effective_capabilities":{"items":{"type":"string"},"type":"array","title":"Effective Capabilities"},"source":{"type":"string","title":"Source"},"mirror_status":{"type":"string","title":"Mirror Status"},"mirror_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mirror Error"},"is_published":{"type":"boolean","title":"Is Published"},"header_verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Header Verified At"},"host_resident_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Host Resident Bytes"},"mtp_head_layers":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mtp Head Layers"},"chat_template_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chat Template Sha256"},"template_thinking_control":{"anyOf":[{"type":"string","enum":["toggle","strength","prompt","none"]},{"type":"null"}],"title":"Template Thinking Control"},"template_effort_mode":{"anyOf":[{"type":"string","enum":["enum","freeform","none"]},{"type":"null"}],"title":"Template Effort Mode"},"template_effort_levels":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Template Effort Levels"},"template_effort_default":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Effort Default"},"template_reasoning_format":{"anyOf":[{"type":"string","enum":["think","harmony","channel","none"]},{"type":"null"}],"title":"Template Reasoning Format"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"staged_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Staged Job Id"}},"additionalProperties":false,"type":"object","required":["id","label","family_id","model_id","model_capabilities","effective_capabilities","source","mirror_status","is_published","created_at","updated_at"],"title":"VariantAdmin","description":"Full admin view of a single variant: the authored variant + its parent\n(model/family) context + per-variant distribution state."},"VariantUpdate":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uuid"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"parameter_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parameter Size"},"previous_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Previous Ids"},"architecture":{"anyOf":[{"type":"string","enum":["dense","moe","hybrid","diffusion"]},{"type":"null"}],"title":"Architecture"},"architectures":{"anyOf":[{"items":{"type":"string","enum":["dense","moe","hybrid","diffusion"]},"type":"array"},{"type":"null"}],"title":"Architectures"},"gguf_architecture":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gguf Architecture"},"gguf_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Gguf Metadata"},"kv_bytes_per_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kv Bytes Per Token"},"estimated_vram_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Estimated Vram Bytes"},"bits_per_weight":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bits Per Weight"},"capabilities":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Capabilities"},"reasoning_controls":{"anyOf":[{"$ref":"#/components/schemas/ReasoningControls"},{"type":"null"}]},"active_parameters":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Parameters"},"base_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Model"},"original_weights":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Weights"},"quantization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quantization"},"context_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Length"},"disk_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Disk Size"},"licence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Licence"},"gguf_repo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gguf Repo"},"gguf_file":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gguf File"},"gguf_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gguf Url"},"gguf_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gguf Sha256"},"gguf_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Gguf Size Bytes"},"gguf_parts":{"anyOf":[{"items":{"$ref":"#/components/schemas/GgufPart"},"type":"array"},{"type":"null"}],"title":"Gguf Parts"},"mmproj_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mmproj Url"},"mmproj_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mmproj Sha256"},"mmproj_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mmproj Size Bytes"},"draft_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Url"},"draft_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Sha256"},"draft_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draft Size Bytes"},"embedded_mtp":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Embedded Mtp"},"default_thinking":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Default Thinking"},"continuous_batching":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Continuous Batching"},"reasoning":{"anyOf":[{"type":"string","enum":["reasoning","hybrid","none"]},{"type":"null"}],"title":"Reasoning"},"text_encoders":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/EncoderFile"},"type":"object"},{"type":"null"}],"title":"Text Encoders"},"normalizer_ruleset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Normalizer Ruleset"},"task":{"anyOf":[{"type":"string","enum":["chat","embedding","rerank","transcription","image","speech"]},{"type":"null"}],"title":"Task"},"installable_via":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Installable Via"},"gguf_source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gguf Source Url"},"mmproj_source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mmproj Source Url"},"draft_source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Source Url"},"capabilities_override":{"anyOf":[{"items":{"type":"string","enum":["completion","vision","tools","thinking","embedding","rerank","ocr","transcription","image","speech","moderation"]},"type":"array"},{"type":"null"}],"title":"Capabilities Override"},"is_published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Published"}},"additionalProperties":false,"type":"object","title":"VariantUpdate","description":"Partial update for ONE variant — only the fields supplied are changed. An omitted field keeps its stored value; an explicit null clears it."},"VariantWrite":{"properties":{"id":{"type":"string","title":"Id"},"uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uuid"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"},"label":{"type":"string","title":"Label"},"parameter_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parameter Size"},"previous_ids":{"items":{"type":"string"},"type":"array","title":"Previous Ids"},"architecture":{"anyOf":[{"type":"string","enum":["dense","moe","hybrid","diffusion"]},{"type":"null"}],"title":"Architecture"},"architectures":{"anyOf":[{"items":{"type":"string","enum":["dense","moe","hybrid","diffusion"]},"type":"array"},{"type":"null"}],"title":"Architectures"},"gguf_architecture":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gguf Architecture"},"gguf_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Gguf Metadata"},"kv_bytes_per_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Kv Bytes Per Token"},"estimated_vram_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Estimated Vram Bytes"},"bits_per_weight":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Bits Per Weight"},"capabilities":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Capabilities"},"reasoning_controls":{"anyOf":[{"$ref":"#/components/schemas/ReasoningControls"},{"type":"null"}]},"active_parameters":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Parameters"},"base_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Model"},"original_weights":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Weights"},"quantization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quantization"},"context_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Context Length"},"disk_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Disk Size"},"licence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Licence"},"gguf_repo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gguf Repo"},"gguf_file":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gguf File"},"gguf_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gguf Url"},"gguf_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gguf Sha256"},"gguf_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Gguf Size Bytes"},"gguf_parts":{"anyOf":[{"items":{"$ref":"#/components/schemas/GgufPart"},"type":"array"},{"type":"null"}],"title":"Gguf Parts"},"mmproj_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mmproj Url"},"mmproj_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mmproj Sha256"},"mmproj_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mmproj Size Bytes"},"draft_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Url"},"draft_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Sha256"},"draft_size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Draft Size Bytes"},"embedded_mtp":{"type":"boolean","title":"Embedded Mtp","default":false},"default_thinking":{"type":"boolean","title":"Default Thinking","default":true},"continuous_batching":{"type":"boolean","title":"Continuous Batching","default":true},"reasoning":{"anyOf":[{"type":"string","enum":["reasoning","hybrid","none"]},{"type":"null"}],"title":"Reasoning"},"text_encoders":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/EncoderFile"},"type":"object"},{"type":"null"}],"title":"Text Encoders"},"normalizer_ruleset":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Normalizer Ruleset"},"task":{"anyOf":[{"type":"string","enum":["chat","embedding","rerank","transcription","image","speech"]},{"type":"null"}],"title":"Task"},"installable_via":{"items":{"type":"string"},"type":"array","title":"Installable Via"},"gguf_source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gguf Source Url"},"mmproj_source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mmproj Source Url"},"draft_source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Draft Source Url"},"capabilities_override":{"anyOf":[{"items":{"type":"string","enum":["completion","vision","tools","thinking","embedding","rerank","ocr","transcription","image","speech","moderation"]},"type":"array"},{"type":"null"}],"title":"Capabilities Override"},"is_published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Published"}},"additionalProperties":false,"type":"object","required":["id","label"],"title":"VariantWrite","description":"Create/replace body for ONE variant: the full authored variant (validated\nby every ``CatalogueVariant`` cross-field rule) + admin-only fields.\n\n``uuid`` (inherited) is ignored on write — the DB assigns it on create and the\npath carries it on update. ``is_default`` is a *request*; the endpoint enforces\nthe one-default-per-(family, stem) invariant (clearing the sibling)."},"VerifyDiff":{"properties":{"field":{"type":"string","title":"Field"},"claimed":{"title":"Claimed"},"actual":{"title":"Actual"},"severity":{"type":"string","enum":["error","warning"],"title":"Severity"},"message":{"type":"string","title":"Message"}},"type":"object","required":["field","severity","message"],"title":"VerifyDiff","description":"One claimed-vs-actual disagreement found by a header read."},"VerifyResponse":{"properties":{"variant_id":{"type":"string","title":"Variant Id"},"gguf_url":{"type":"string","title":"Gguf Url"},"verified_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Verified At"},"header_read":{"type":"boolean","title":"Header Read"},"gguf_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Gguf Metadata"},"derived":{"additionalProperties":true,"type":"object","title":"Derived"},"diffs":{"items":{"$ref":"#/components/schemas/VerifyDiff"},"type":"array","title":"Diffs"},"advisories":{"items":{"$ref":"#/components/schemas/VerifyDiff"},"type":"array","title":"Advisories","default":[]},"host_resident_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Host Resident Bytes"},"host_resident_measured":{"type":"boolean","title":"Host Resident Measured","default":false},"mtp_head_layers":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mtp Head Layers"},"mtp_head_measured":{"type":"boolean","title":"Mtp Head Measured","default":false},"embedded_mtp":{"type":"boolean","title":"Embedded Mtp","default":false},"chat_template_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chat Template Sha256"},"template_thinking_control":{"anyOf":[{"type":"string","enum":["toggle","strength","prompt","none"]},{"type":"null"}],"title":"Template Thinking Control"},"chat_template_read":{"type":"boolean","title":"Chat Template Read","default":false},"template_effort_mode":{"anyOf":[{"type":"string","enum":["enum","freeform","none"]},{"type":"null"}],"title":"Template Effort Mode"},"template_effort_levels":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Template Effort Levels"},"gguf_architecture":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gguf Architecture"},"gguf_architecture_filled":{"type":"boolean","title":"Gguf Architecture Filled","default":false},"continuous_batching":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Continuous Batching"},"batching_opted_out":{"type":"boolean","title":"Batching Opted Out","default":false},"template_effort_default":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Effort Default"},"template_reasoning_format":{"anyOf":[{"type":"string","enum":["think","harmony","channel","none"]},{"type":"null"}],"title":"Template Reasoning Format"}},"type":"object","required":["variant_id","gguf_url","header_read","derived","diffs"],"title":"VerifyResponse"},"VisionRemoteImagesUpdate":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"VisionRemoteImagesUpdate"},"VisitList":{"properties":{"site":{"type":"string","title":"Site"},"days":{"type":"integer","title":"Days"},"segment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Segment"},"visits":{"items":{"$ref":"#/components/schemas/AnalyticsVisit"},"type":"array","title":"Visits"},"truncated":{"type":"boolean","title":"Truncated"}},"type":"object","required":["site","days","visits","truncated"],"title":"VisitList"},"WebSearchRequest":{"properties":{"query":{"type":"string","maxLength":1000,"minLength":1,"title":"Query"}},"type":"object","required":["query"],"title":"WebSearchRequest"},"WebSearchResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/WebSearchResult"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"WebSearchResponse"},"WebSearchResult":{"properties":{"title":{"type":"string","title":"Title"},"url":{"type":"string","title":"Url"},"snippet":{"type":"string","title":"Snippet","default":""}},"type":"object","required":["title","url"],"title":"WebSearchResult"},"WebToolsUpdate":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"WebToolsUpdate"},"WorkerApprovalBody":{"properties":{"approved":{"type":"boolean","title":"Approved"}},"type":"object","required":["approved"],"title":"WorkerApprovalBody"},"WorkerConfigUpdate":{"properties":{"context_size":{"type":"integer","title":"Context Size"}},"type":"object","required":["context_size"],"title":"WorkerConfigUpdate"},"WorkerEvent":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"worker_id":{"type":"string","title":"Worker Id"},"worker_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Worker Name"},"event_type":{"type":"string","title":"Event Type"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"transient":{"type":"boolean","title":"Transient","default":false},"actor":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Actor"}},"type":"object","required":["id","worker_id","event_type","created_at"],"title":"WorkerEvent"},"WorkerIdleDefaultUpdate":{"properties":{"idle_timeout_minutes":{"type":"integer","title":"Idle Timeout Minutes"}},"type":"object","required":["idle_timeout_minutes"],"title":"WorkerIdleDefaultUpdate"},"WorkerKeyResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"key_fingerprint":{"type":"string","title":"Key Fingerprint"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"is_active":{"type":"boolean","title":"Is Active"},"active_worker_count":{"type":"integer","title":"Active Worker Count","default":0},"managed":{"type":"boolean","title":"Managed","default":false},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"}},"type":"object","required":["id","name","key_fingerprint","created_at","revoked_at","is_active"],"title":"WorkerKeyResponse"},"WorkerNameUpdate":{"properties":{"worker_name":{"type":"string","title":"Worker Name"}},"type":"object","required":["worker_name"],"title":"WorkerNameUpdate"},"WorkerThroughput":{"properties":{"tokens_per_second":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tokens Per Second"},"per_request_tokens_per_second":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Per Request Tokens Per Second"},"window_seconds":{"type":"integer","title":"Window Seconds"},"window_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Window Start"},"window_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Window End"},"live":{"type":"boolean","title":"Live","default":false},"peak_tokens_per_second":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Peak Tokens Per Second"},"peak_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Peak At"},"peak_window_seconds":{"type":"integer","title":"Peak Window Seconds"},"in_flight":{"type":"integer","title":"In Flight","default":0}},"type":"object","required":["window_seconds","peak_window_seconds"],"title":"WorkerThroughput","description":"A worker's combined output throughput: every request's output tokens over\nthe time the worker was working on them, rather than an average of each\nrequest's own rate (which falls as a batched worker runs more at once).\nHow it is counted: ``worker_throughput``."},"routers__admin__CreateOrgRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"slug":{"type":"string","maxLength":63,"minLength":3,"pattern":"^[a-z0-9][a-z0-9-]*[a-z0-9]$","title":"Slug"},"owner_email":{"type":"string","title":"Owner Email"}},"type":"object","required":["name","slug","owner_email"],"title":"CreateOrgRequest"},"routers__admin__InviteResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"role":{"type":"string","title":"Role"},"invitation_type":{"type":"string","title":"Invitation Type"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","role","invitation_type","created_at"],"title":"InviteResponse"},"routers__admin__UpdateOrgRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"slug":{"type":"string","maxLength":63,"minLength":3,"pattern":"^[a-z0-9][a-z0-9-]*[a-z0-9]$","title":"Slug"}},"type":"object","required":["name","slug"],"title":"UpdateOrgRequest"},"routers__catalogue_admin__EnrolOrgRequest":{"properties":{"org_id":{"type":"string","format":"uuid","title":"Org Id"}},"type":"object","required":["org_id"],"title":"EnrolOrgRequest","description":"Body for POST /admin/catalogue/{id}/orgs — add one org to the allowlist."},"routers__catalogue_admin__EnrolledOrg":{"properties":{"org_id":{"type":"string","title":"Org Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["org_id"],"title":"EnrolledOrg","description":"An organisation on a `per_org` model's allowlist."},"routers__feature_flags_admin__EnrolOrgRequest":{"properties":{"org_id":{"type":"string","format":"uuid","title":"Org Id"}},"type":"object","required":["org_id"],"title":"EnrolOrgRequest"},"routers__feature_flags_admin__EnrolledOrg":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"enrolled_at":{"type":"string","format":"date-time","title":"Enrolled At"}},"type":"object","required":["id","name","slug","enrolled_at"],"title":"EnrolledOrg"},"routers__organizations__CreateOrgRequest":{"properties":{"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"}},"type":"object","required":["name","slug"],"title":"CreateOrgRequest"},"routers__organizations__InviteResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"role":{"type":"string","title":"Role"},"invitation_type":{"type":"string","title":"Invitation Type"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"email_sent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Email Sent"}},"type":"object","required":["id","role","invitation_type","created_at"],"title":"InviteResponse"},"routers__organizations__UpdateOrgRequest":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"UpdateOrgRequest"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}