Management API: automate your cluster
What it is
Section titled “What it is”Every page of the GPU Kitchen app talks to the controller over HTTP. The part of that API
under /api/v1/ is stable: it is documented, and it does not change under a script that
uses it. Everything else under /api/ belongs to the app’s own pages and can change in any
release. Do not script it.
The reference lists each operation with its inputs, its response and its errors. It is built from an OpenAPI 3.1 document: load it in any OpenAPI tool to generate a client.
1. Create a key
Section titled “1. Create a key”Open My account → Access, expand Automation keys, then click New automation key. Choose:
- a Label, to recognise the key later;
- an Access level: the key acts as you, but never above this level;
- Read only, for a key that may only read;
- when it Expires after.
The key is shown once. Copy it then. It starts with gpuk_mgmt_. It is not an inference
key (sk-gpuk-…): the inference proxy refuses it, and an inference key opens nothing here.
2. Call the API
Section titled “2. Call the API”Send the key as a Bearer token. The controller’s address is the one you open the app with. Set Url to your local instance in the sidebar to update these examples, then use their copy button. Replace the key placeholder with your automation key. The first request lists your nodes.
export GPUK=http://localhost:1337export GPUK_KEY=gpuk_mgmt_…
curl -s "$GPUK/api/v1/nodes" -H "Authorization: Bearer $GPUK_KEY"Revoking the key stops it at the next request. So does disabling its owner.
3. What a key may do
Section titled “3. What a key may do”- A key acts as you, capped by its access level. If your own access goes down, the key’s does too.
- A read-only key may only call operations whose effect is
read. The reference marks each operation withx-gpuk-effect:read,writeordestructive. - Some operations need a signed-in session and always refuse a key: signing in, changing a
password, and creating, listing or revoking keys. The reference lists only
sessionas their security. A leaked key can never create its successor. - Each operation states the minimum role it needs in
x-gpuk-access. - An operation behind a feature flag carries
x-gpuk-flagwith the flag’s key. It is served only where that flag is on and answers404elsewhere; today,planning.reservations.
4. Responses
Section titled “4. Responses”- Bodies are JSON, with
snake_casefields. Times are ISO 8601 in UTC. - A list comes under its resource name, for example
{ "keys": [...] }. - A long list comes in pages. Pass
limit(1 to 500, 50 by default). The response carriesnext_cursor: pass it back ascursorto get the next page. It isnullon the last page. There is no total count. - Creating something answers
201. Deleting answers204with no body.
5. Errors
Section titled “5. Errors”Every error has the same shape:
{ "error": { "code": "validation_error", "message": "body.read_only: Invalid input" } }- Branch on
code. It never changes.messageis a sentence to show a person. 400 validation_errormeans the input was refused.details.issuesnames each field.- Any other
400code names a request that is well formed but refused, such aslast_super_admin. Each operation lists its codes in the reference. - A refusal keeps its own
codeand sentence whatever its status, such as409 member_signed_in. - What a refusal says beyond its sentence, such as the checks that failed, is in
error.details. 401 auth_requiredmeans the key is missing, wrong, revoked or expired.403 forbiddenmeans the key, or you, may not do this.404also answers for something that belongs to someone else. The API never confirms that it exists.- Each operation lists its own codes in the reference.
6. Send a request again safely
Section titled “6. Send a request again safely”Some operations create or start something. They take an Idempotency-Key header. If you
lose the answer, send the same request again with the same key: for 24 hours you get the
first answer back, and nothing is done twice. The reference marks these operations.
7. Connect an AI agent (MCP)
Section titled “7. Connect an AI agent (MCP)”Your cluster is also an MCP server, at /api/mcp on the address you open the app with.
Each operation of this API is one tool. The agent sees only the tools its key may call, and a
read-only key sees only the tools that read.
For Claude Code:
claude mcp add --transport http gpu-kitchen http://localhost:1337/api/mcp \ --header "Authorization: Bearer gpuk_mgmt_…"Give the agent a key with the smallest role it needs, and make it read-only when it only reports.
8. Common tasks
Section titled “8. Common tasks”Each call below works with a key whose role allows it. The reference gives every field.
See your hardware
Section titled “See your hardware”The nodes, then every GPU with what holds it:
GET /api/v1/nodesGET /api/v1/gpusA GPU’s state is free, busy (a GPU Kitchen container holds it, named in holder),
foreign (another program uses its memory) or booked. Read it as text: a later version may
add a state.
List your models
Section titled “List your models”Each model says what it serves (task_type) and what it can do within that task
(capabilities). Filter by task:
GET /api/v1/models?task_type=text-generationFind a recipe and follow its container
Section titled “Find a recipe and follow its container”List the recipes that would start now on your GPUs, and the GPU configurations your cards can form. A recipe is run from the app, through a line of My cookbook: a model setup, served for an objective on one GPU configuration. The API follows and stops the container that results.
GET /api/v1/recipes?runnable=true&limit=20GET /api/v1/gpu-configsA recipe that came from the hub carries its share_code (GPU_KITCHEN_RECIPE_…), the code the
app shows and copies, to share it with someone else.
Follow a container until its status is running, then stop it when you are done. A key that
is not an administrator’s reads what a container serves and its state only: its node, cards,
image, command and port are left out.
GET /api/v1/containers/17POST /api/v1/containers/17/stop
{ "mode": "soft" }Vary a recipe with a template
Section titled “Vary a recipe with a template”A template is a recipe with values to try: the Recipe Builder measures each variation. Create one with the model, the engine, the task and the exact GPU configuration; its setup is fixed once created.
POST /api/v1/templatesIdempotency-Key: 7c1e-sweep-qwen
{ "name": "Qwen 8B sweep", "model_id": 12, "engine_id": 3, "task_type": "text-generation", "gpu_config": "rtx 3090*1" }To delete a template that still has benchmarks queued or running, read what it would stop, then pass those benchmarks back. The deletion is refused if that work changed in between.
GET /api/v1/templates/5/deletion-impact{ "queued": 2, "in_progress": 1, "live_benchmark_ids": [41, 42, 43] }DELETE /api/v1/templates/5?armed_benchmark_ids=41,42,43Benchmark recipes
Section titled “Benchmark recipes”Put one or more recipes in the benchmark queue. Each recipe gets its own outcome: queued, or skipped with its reason.
POST /api/v1/benchmarksIdempotency-Key: 5d2f-nightly-bench
{ "recipe_ids": [42], "gpu_config": "rtx 3090*1" }{ "outcomes": [ { "recipe_id": 42, "queued": false, "benchmark": null, "skipped_reason": "already_tested", "detail": null, "existing_benchmark_id": null, "existing_result_id": 318 } ]}See what waits and runs, then read the results, newest first:
GET /api/v1/benchmarks?status=queuedGET /api/v1/benchmarks/queuesGET /api/v1/benchmarks/results?recipe_id=42Read the usage
Section titled “Read the usage”Admins can read what was used over whole UTC days, by key, model or member (a member
comes with their name in the enterprise edition). Without
from and to, you get the current month up to today.
GET /api/v1/usage?group_by=model&from=2026-10-01&to=2026-10-07{ "from": "2026-10-01", "to": "2026-10-07", "group_by": "model", "rows": [ { "group": "Qwen/Qwen3-8B", "label": null, "requests": 1240, "tokens": 3120000, "gpu_seconds": 5400 } ]}Example: your keys
Section titled “Example: your keys”From a signed-in browser session only, because a key may not manage keys:
GET /api/v1/me/management-keys{ "keys": [ { "id": "3f9a…", "label": "nightly report", "role_ceiling": "admin", "read_only": true, "prefix": "gpuk_mgmt_3f9a…", "created_at": "2026-10-07T08:00:00.000Z", "expires_at": "2027-10-07T08:00:00.000Z", "last_used_at": null, "last_used_ip": null } ]}