> For the complete documentation index, see [llms.txt](https://docs.kinesis.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kinesis.network/api/templates.md).

# Templates

Find ready-to-deploy configurations from the App Gallery.

GPU templates need a grid: add config.grids.ids before creating the app. Read notes for model placeholders and sizing. The vLLM multi-GPU category is currently hidden from results, although its category enum remains for compatibility.

## List the app gallery's templates as ready-made apps.create configurations (image, ports, env, hardware); pass a template's config to apps.create with a name, edited as needed. notes says what a template needs filled in first.

> Any API key can call this.

```json
{"openapi":"3.1.0","info":{"title":"Kinesis API","version":"1.5.0"},"tags":[{"name":"Templates"}],"servers":[{"url":"https://api.kinesis.network/v1"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"An API key from Account settings, e.g. kn_..."}},"headers":{"RequestId":{"description":"Id of this request; quote it when contacting support","schema":{"type":"string"}},"RateLimitLimit":{"description":"Requests per minute allowed for this key, or for the user across all keys, whichever is lower","schema":{"type":"integer"}},"RateLimitRemaining":{"description":"Requests left in the current window","schema":{"type":"integer"}},"RateLimitReset":{"description":"Unix time in seconds when the window resets","schema":{"type":"integer"}},"RetryAfter":{"description":"Seconds to wait before retrying","schema":{"type":"integer"}}},"schemas":{"AppTemplate":{"type":"object","properties":{"id":{"type":"string","description":"Template id"},"name":{"type":"string","description":"Suggested app name"},"category":{"type":"string","enum":["llm_general","llm_performance","general"]},"image":{"description":"Container image the template deploys","type":["string","null"]},"paidTierOnly":{"type":"boolean","description":"Meant for organizations with a payment on record"},"notes":{"description":"What to fill in before deploying, when the template is not complete as is","type":["string","null"]},"config":{"type":"object","properties":{"image":{"description":"Container image reference, e.g. nginx:1.27 or ghcr.io/org/app:tag","type":"string","minLength":1,"maxLength":512},"registryAuth":{"description":"Credentials for a private image","type":"object","properties":{"username":{"type":"string","minLength":1,"description":"Registry login"},"password":{"type":"string","minLength":1,"description":"Registry password or token (write-only)"}},"required":["username","password"],"additionalProperties":false},"ports":{"description":"Ports to expose","maxItems":32,"type":"array","items":{"type":"object","properties":{"port":{"type":"integer","minimum":1,"maximum":65535,"description":"Container port"},"protocol":{"type":"string","enum":["tcp","udp","tcp_load_balancer","tcps_load_balancer","http_load_balancer","https_load_balancer","http80_load_balancer","https443_load_balancer","grpcs_load_balancer"],"description":"How the port is exposed"}},"required":["port","protocol"],"additionalProperties":false}},"env":{"description":"Environment variables","maxItems":200,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*$","description":"Variable name"},"value":{"description":"Value; null keeps the stored value of an existing variable","type":["string","null"]},"secret":{"description":"Store as a secret: never returned by reads","type":"boolean"}},"required":["key","value"],"additionalProperties":false}},"command":{"description":"Container command (CMD) override","maxItems":256,"type":"array","items":{"type":"string"}},"entrypoint":{"description":"Container entrypoint override","maxItems":256,"type":"array","items":{"type":"string"}},"startupCommand":{"description":"Command run inside the container once it starts; null clears it","anyOf":[{"type":"object","properties":{"args":{"minItems":1,"type":"array","items":{"type":"string"},"description":"Command and arguments"},"user":{"description":"User to run as","type":"string"},"timeoutSec":{"description":"Seconds before the command is considered failed","type":"integer","minimum":0},"startPeriodSec":{"description":"Seconds to wait after the container starts","type":"integer","minimum":0}},"required":["args"],"additionalProperties":false},{"type":"null"}]},"healthcheck":{"description":"Container health check; null clears it","anyOf":[{"type":"object","properties":{"test":{"minItems":1,"type":"array","items":{"type":"string"},"description":"Command that must exit 0 for the app to count as healthy"},"intervalSec":{"type":"integer","minimum":1,"description":"Seconds between checks"}},"required":["test","intervalSec"],"additionalProperties":false},{"type":"null"}]},"restartPolicy":{"description":"Restart behaviour","type":"object","properties":{"mode":{"type":"string","enum":["disabled","always","on_failure","task_completion"],"description":"When to restart a container that exits"},"startTimeoutSec":{"description":"Seconds a start may take before it counts as failed","type":"integer","minimum":0},"maxRetriesPerNode":{"description":"Restarts allowed on one server before moving on","type":"integer","minimum":0},"maxErrorTolerance":{"description":"Failures tolerated before the app is stopped","type":"integer","minimum":0},"numTasks":{"description":"For task_completion: runs to complete before stopping","type":"integer","minimum":0}},"required":["mode"],"additionalProperties":false},"instances":{"description":"Instance count range","type":"object","properties":{"min":{"type":"integer","minimum":0,"description":"Instances to keep running"},"max":{"type":"integer","minimum":0,"description":"Upper bound for scaling"}},"required":["min","max"],"additionalProperties":false},"stateful":{"description":"Keep each instance pinned to its server and disk","type":"boolean"},"hardware":{"description":"Hardware requirements per instance","type":"object","properties":{"gpuCount":{"description":"GPUs per instance; 0 for CPU-only. Above 0 needs grids.ids: serverless placement is CPU-only","type":"integer","minimum":0,"maximum":16},"gpuModels":{"description":"Acceptable GPU models, e.g. H100; empty means any","maxItems":16,"type":"array","items":{"type":"string","minLength":1}},"gpuManufacturer":{"description":"GPU vendor; null means any","anyOf":[{"type":"string","enum":["amd","apple","intel","nvidia","xilinx"]},{"type":"null"}]},"gpuVramBytes":{"description":"Minimum VRAM per GPU, in bytes","type":"integer","minimum":0},"ramBytes":{"description":"RAM per instance, in bytes","type":"integer","exclusiveMinimum":0},"storageBytes":{"description":"Disk per instance, in bytes","type":"integer","exclusiveMinimum":0},"shmemBytes":{"description":"Shared memory (/dev/shm) size, in bytes","type":"integer","minimum":0}},"additionalProperties":false},"placement":{"description":"Where the app may run and who may reach it","type":"object","properties":{"regions":{"description":"Kinesis regions to run in; empty means any","type":"array","items":{"type":"string","enum":["us-west","us-east","us-central","ca-west","ca-east","ca-central","eu-west","eu-north","eu-east","eu-south","eu-central","eu-south-east","ap-east","ap-south-east","ap-north-east","ap-south"]}},"providers":{"description":"Restrict placement to specific providers and regions","type":"array","items":{"type":"object","properties":{"csp":{"type":"string","enum":["aws","azure","gcp","kinesis"],"description":"Cloud provider"},"regions":{"type":"array","items":{"type":"object","properties":{"region":{"type":"string","minLength":1,"description":"Provider region"},"zones":{"type":"array","items":{"type":"string"},"description":"Zones within the region; empty means any"}},"required":["region","zones"],"additionalProperties":false},"description":"Regions of the provider to allow"}},"required":["csp","regions"],"additionalProperties":false}},"allowedIps":{"description":"Source IPs or CIDR ranges allowed to reach the app; empty means everyone","maxItems":100,"type":"array","items":{"type":"string"}}},"additionalProperties":false},"grids":{"description":"Run on grids instead of serverless capacity (members only, on grids they may deploy to)","type":"object","properties":{"ids":{"description":"Grids to run on; empty means serverless (CPU-only), so a GPU app names at least one","maxItems":20,"type":"array","items":{"type":"string","minLength":1}},"priorities":{"description":"Priority per grid id, -100 to 100","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":-100,"maximum":100}}},"additionalProperties":false},"volumes":{"description":"Persistent volumes","maxItems":4,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_.-]{1,63}$","description":"Volume name, unique within the app"},"target":{"type":"string","pattern":"^\\/.+","description":"Absolute mount path inside the container"},"declaredSizeBytes":{"description":"Expected size, used for placement; 0 or omitted means unspecified","type":"integer","minimum":0,"maximum":17592186044416}},"required":["name","target"],"additionalProperties":false}}},"additionalProperties":false,"description":"Pass as config to apps.create, edited as needed"}},"required":["id","name","category","image","paidTierOnly","notes","config"],"additionalProperties":false},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable, machine-readable error code"},"message":{"type":"string","description":"Human-readable explanation"},"requestId":{"type":"string","description":"Quote this when contacting support"},"issues":{"type":"array","description":"Present on invalid_request: one entry per invalid field","items":{"type":"object","required":["path","message"],"properties":{"path":{"type":"string"},"message":{"type":"string"}}}},"requiredScopes":{"type":"array","items":{"type":"string"},"description":"insufficient_scope: the permissions the key lacks"},"billingUrl":{"type":"string","description":"Dashboard page where the user can resolve a billing problem (insufficient_balance, no_payment_method, ...)"},"topUpNeededCents":{"type":"integer","description":"insufficient_balance: credits to add, in US cents"},"appIds":{"type":"array","items":{"type":"string"},"description":"project_has_running_apps: the apps that are still live"},"resetAt":{"type":"string","format":"date-time","description":"rate_limited, topup_limit: when the window resets"},"retryAfterSec":{"type":"integer","description":"request_in_progress: seconds to wait before retrying"},"limit":{"type":"integer","description":"payload_too_large: bytes allowed; rate_limited: requests per window"},"maxCents":{"type":"integer","description":"amount_too_large: the per-transaction maximum"},"declineCode":{"type":"string","description":"card_declined: the issuer's decline code"},"paymentIntentId":{"type":"string","description":"card outcomes: the Stripe payment intent involved"},"allowed":{"type":"array","items":{"type":"string"},"description":"method_not_allowed: the methods the path accepts"}},"additionalProperties":true}}}},"responses":{"BadRequest":{"description":"The request body, query or headers are invalid (invalid_request, invalid_idempotency_key, ...)","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"The API key is missing, malformed, unknown, revoked or expired","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The key lacks a required permission (insufficient_scope), is limited to other projects or to projects while the call acts on the organization (key_project_restricted), the caller's role on the resource is too low (forbidden), or the account is frozen","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such resource, or the caller cannot see it","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Too many requests; see the X-RateLimit-* headers and Retry-After","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ServerError":{"description":"Something failed on our side; the request id is in the body","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UpstreamError":{"description":"A service we depend on (the runtime, GitHub) did not answer; retry shortly","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"The feature is not enabled on this server (github_not_configured), or a service we depend on is down; retry later","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"GatewayTimeout":{"description":"A service we depend on did not answer in time; retry shortly","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/templates":{"get":{"operationId":"templates.list","summary":"List the app gallery's templates as ready-made apps.create configurations (image, ports, env, hardware); pass a template's config to apps.create with a name, edited as needed. notes says what a template needs filled in first.","description":"Any API key can call this.","tags":["Templates"],"parameters":[{"name":"search","in":"query","required":false,"description":"Case-insensitive substring of the name or image","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"category","in":"query","required":false,"description":"Only templates of this category","schema":{"type":"string","enum":["llm_general","llm_performance","general"]}}],"responses":{"200":{"description":"OK","headers":{"X-Request-Id":{"$ref":"#/components/headers/RequestId"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"}},"content":{"application/json":{"schema":{"type":"object","properties":{"templates":{"type":"array","items":{"$ref":"#/components/schemas/AppTemplate"}},"galleryUrl":{"type":"string","description":"The dashboard gallery, where the same templates are deployed by hand"}},"required":["templates","galleryUrl"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"500":{"$ref":"#/components/responses/ServerError"},"502":{"$ref":"#/components/responses/UpstreamError"},"503":{"$ref":"#/components/responses/Unavailable"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.kinesis.network/api/templates.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
