Create a template
const url = 'https://gpu-kitchen.example.lan/api/v1/templates';const options = { method: 'POST', headers: {cookie: 'gpuk_session=<gpuk_session>', 'Content-Type': 'application/json'}, body: '{"name":"example","name_is_customized":true,"model_id":1,"engine_id":1,"own_image":{"image":"example","port":1,"health_path":"/","generation_route":"completions","env":[],"max_concurrent_requests":1},"gpu_config":"example","objective":"chat","params":{"additionalProperty":"example"},"request_params":{"additionalProperty":"example"},"notes":"example","task_type":"text-generation","description":"example","fixed_args":"example","quant_model_ids":[1],"own_gpu_count":1,"own_vram_per_gpu_gb":1,"vram_per_gpu_gb":1,"nvlink_condition":"with","own_compute_capability":"example","declared_plat":{"kv":"example","options":"example","context":1},"ram_tier_gb":1,"ram_cache_max_gb":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://gpu-kitchen.example.lan/api/v1/templates \ --header 'Content-Type: application/json' \ --cookie gpuk_session=<gpuk_session> \ --data '{ "name": "example", "name_is_customized": true, "model_id": 1, "engine_id": 1, "own_image": { "image": "example", "port": 1, "health_path": "/", "generation_route": "completions", "env": [], "max_concurrent_requests": 1 }, "gpu_config": "example", "objective": "chat", "params": { "additionalProperty": "example" }, "request_params": { "additionalProperty": "example" }, "notes": "example", "task_type": "text-generation", "description": "example", "fixed_args": "example", "quant_model_ids": [ 1 ], "own_gpu_count": 1, "own_vram_per_gpu_gb": 1, "vram_per_gpu_gb": 1, "nvlink_condition": "with", "own_compute_capability": "example", "declared_plat": { "kv": "example", "options": "example", "context": 1 }, "ram_tier_gb": 1, "ram_cache_max_gb": 1 }'Send an Idempotency-Key: a creation retried after a lost answer returns the template created the first time.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Send the request again with the same value: for 24 hours, you get the first successful answer back, and nothing is done twice.
Request Bodyrequired
Section titled “Request Bodyrequired”object
object
Responses
Section titled “Responses”Success.
object
object
[BLD-15] The exact GPU configuration its benchmarks run on: card model × count, e.g. “rtx 3090*2”. It is no requirement: each variation forecasts its own.
The parameters each benchmark request is sent with, and their axes.
object
What the model does: text-generation, embeddings, image…
[BLD-370] The usable VRAM per card an own image needs, in GB; null otherwise.
[BLD-390] The VRAM per GPU a catalog engine’s template allows its recipes, in GB; null for an own image.
[BLD-370] The lowest compute capability an own image needs, when its author set one.
[VIS-31] The largest size its options give a RAM cache that grows with traffic, in GB; null when it declares none.
[REG-330] The best speed per user: 1000 / the lowest ITL p50, in tokens/s.
The recipes it has materialized.
Example
{ "template": { "objective": "chat", "task_type": "text-generation", "nvlink_condition": "with" }}Error codes: validation_error.
object
object
Stable snake_case code to branch on.
A sentence to show a person.
Optional structured context.
Optional place where the problem is fixed.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example", "fix": "example" }}Error codes: auth_required.
object
object
Stable snake_case code to branch on.
A sentence to show a person.
Optional structured context.
Optional place where the problem is fixed.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example", "fix": "example" }}Error codes: forbidden, management_key_read_only, own_image_admins_only.
object
object
Stable snake_case code to branch on.
A sentence to show a person.
Optional structured context.
Optional place where the problem is fixed.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example", "fix": "example" }}Error codes: idempotency_in_progress.
object
object
Stable snake_case code to branch on.
A sentence to show a person.
Optional structured context.
Optional place where the problem is fixed.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example", "fix": "example" }}Error codes: payload_too_large.
object
object
Stable snake_case code to branch on.
A sentence to show a person.
Optional structured context.
Optional place where the problem is fixed.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example", "fix": "example" }}Error codes: custom_name_invalid, custom_name_taken, engine_source_invalid, engine_task_unsupported, engine_unavailable, gpu_config_invalid, idempotency_key_reused, model_required, nvlink_condition_unavailable, objective_required, objective_task_mismatch, own_image_access_denied, own_image_architecture, own_image_catalog_engine, own_image_conflict, own_image_declared_plat, own_image_gpu_requirement, own_image_invalid, own_image_max_concurrent, own_image_no_digest, own_image_no_node, own_image_not_found, own_image_params, own_image_route, own_image_task_conflict, own_image_unreachable, own_requirement_not_own_image, ram_cache_without_tier, request_params_invalid, vram_budget_not_offered, vram_per_gpu_over_usable, vram_per_gpu_own_image, vram_per_gpu_required, workload_task_mismatch.
object
object
Stable snake_case code to branch on.
A sentence to show a person.
Optional structured context.
Optional place where the problem is fixed.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example", "fix": "example" }}Error codes: rate_limited.
object
object
Stable snake_case code to branch on.
A sentence to show a person.
Optional structured context.
Optional place where the problem is fixed.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example", "fix": "example" }}