Creates a template and queues the first build. The response includes
both the template id and the build id, so clients can immediately
poll GET /templates/{id} for overall status or subscribe to
GET /templates/{id}/builds/{build_id}/logs for live output.
Template starts in status building. Poll until it reaches ready
before creating sandboxes from it. On failure the status becomes
failed and error_message is populated.
To rebuild an existing template (e.g. after a failure or when the
base image updates), use POST /templates/{id}/builds.
Human-readable name, unique per team. Used as the from_template value when creating sandboxes. Lowercase letters, digits, and ._/- only; must start and end with a letter or digit. Names starting with superserve/ are reserved for curated system templates and rejected for team-owned templates.
Returned by POST /templates — includes both the new template id
and the id of the first build that was queued for it. Clients can
immediately open the build-log SSE stream or poll the template for
status transitions.
{"docsConfig":{"theme":"luma","$schema":"https://mintlify.com/docs.json","name":"Superserve","colors":{"primary":"#B2FAB4","light":"#B2FAB4","dark":"#B2FAB4"},"logo":"https://mintcdn.com/superserve-ai-superserve-33/G055TX3BjwXpQedU/logo.svg?fit=max\u0026auto=format\u0026n=G055TX3BjwXpQedU\u0026q=85\u0026s=69233fb550a17b81d7d7fa083ca7f3de","favicon":"https://mintcdn.com/superserve-ai-superserve-33/G055TX3BjwXpQedU/favicon.svg?fit=max\u0026auto=format\u0026n=G055TX3BjwXpQedU\u0026q=85\u0026s=5c49ee9ed883d587b192cd419a4747d8","appearance":{"default":"dark","strict":true},"background":{"decoration":"gradient","color":{"dark":"#141414"}},"navbar":{"links":[{"href":"https://github.com/superserve-ai/superserve","label":"GitHub","type":"github"}],"primary":{"type":"button","label":"Get Started","href":"https://console.superserve.ai/auth/signup/?utm_source=docs\u0026utm_medium=navbar"}},"footer":{"socials":{"x":"https://x.com/superserve_ai","github":"https://github.com/superserve-ai","linkedin":"https://www.linkedin.com/company/super-serve-ai"}},"fonts":{"heading":{"family":"Instrument Sans"},"body":{"family":"Instrument Sans"}},"styling":{"codeblocks":{"theme":{"light":"github-light","dark":"vitesse-dark"}},"latex":false},"integrations":{"posthog":{"apiKey":"phc_gjpDKKKQJAnkxkqLrPGrAhoariKsaHNuTpI5rVhkYre","apiHost":"https://p.superserve.ai"}},"contextual":{"options":["copy","view","claude","mcp","add-mcp","cursor","vscode"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"superserve-ai-superserve-33","hasAudioNarration":false,"actualSubdomain":"superserve-ai-superserve-33","customDomains":["docs.superserve.ai"],"gitSource":{"type":"github","owner":"superserve-ai","repo":"superserve","deployBranch":"main","contentDirectory":"docs","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aec322c25c041b786077789","collectionId":"79e56834-76ad-435e-a8ed-f6ef6b1592de","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aec322c25c041b786077789"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aeda48bcc98a9ae37e09fac","clientVersion":"0.0.4074","searchFilterCounts":[{"language":"default","tag":"REST API","count":51},{"language":"default","tag":"Documentation","count":31},{"language":"default","tag":"Integrations","count":17},{"language":"default","tag":"Sandboxes","count":14},{"language":"default","tag":"Templates","count":13},{"language":"default","tag":"Sandbox","count":10},{"language":"default","tag":"Secrets","count":10},{"language":"default","tag":"SDK Reference","count":6},{"language":"default","tag":"Reference","count":6},{"language":"default","tag":"Team Management","count":6}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[],"page":{"pagePath":"api-reference/templates/create-a-template-and-kick-off-the-first-build","slug":"/api-reference/templates/create-a-template-and-kick-off-the-first-build","pageMetadata":{"title":"Create a template and kick off the first build","description":"Creates a template and queues the first build. The response includes\nboth the template id and the build id, so clients can immediately\npoll `GET /templates/{id}` for overall status or subscribe to\n`GET /templates/{id}/builds/{build_id}/logs` for live output.\n\nTemplate starts in status `building`. Poll until it reaches `ready`\nbefore creating sandboxes from it. On failure the status becomes\n`failed` and `error_message` is populated.\n\nTo rebuild an existing template (e.g. after a failure or when the\nbase image updates), use `POST /templates/{id}/builds`.\n","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml post /templates","href":"/api-reference/templates/create-a-template-and-kick-off-the-first-build","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Creates a template and queues the first build. The response includes\\nboth the template id and the build id, so clients can immediately\\npoll \", _jsx(_components.code, {\n children: \"GET /templates/{id}\"\n }), \" for overall status or subscribe to\\n\", _jsx(_components.code, {\n children: \"GET /templates/{id}/builds/{build_id}/logs\"\n }), \" for live output.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Template starts in status \", _jsx(_components.code, {\n children: \"building\"\n }), \". Poll until it reaches \", _jsx(_components.code, {\n children: \"ready\"\n }), \"\\nbefore creating sandboxes from it. On failure the status becomes\\n\", _jsx(_components.code, {\n children: \"failed\"\n }), \" and \", _jsx(_components.code, {\n children: \"error_message\"\n }), \" is populated.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"To rebuild an existing template (e.g. after a failure or when the\\nbase image updates), use \", _jsx(_components.code, {\n children: \"POST /templates/{id}/builds\"\n }), \".\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"codeStyling":{"theme":{"light":"github-light","dark":"vitesse-dark"}},"config":{},"pageMetadata":{"title":"Create a template and kick off the first build","description":"Creates a template and queues the first build. The response includes\nboth the template id and the build id, so clients can immediately\npoll `GET /templates/{id}` for overall status or subscribe to\n`GET /templates/{id}/builds/{build_id}/logs` for live output.\n\nTemplate starts in status `building`. Poll until it reaches `ready`\nbefore creating sandboxes from it. On failure the status becomes\n`failed` and `error_message` is populated.\n\nTo rebuild an existing template (e.g. after a failure or when the\nbase image updates), use `POST /templates/{id}/builds`.\n","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml post /templates","href":"/api-reference/templates/create-a-template-and-kick-off-the-first-build","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"createTemplate","tags":["Templates"],"summary":"Create a template and kick off the first build","description":"Creates a template and queues the first build. The response includes\nboth the template id and the build id, so clients can immediately\npoll `GET /templates/{id}` for overall status or subscribe to\n`GET /templates/{id}/builds/{build_id}/logs` for live output.\n\nTemplate starts in status `building`. Poll until it reaches `ready`\nbefore creating sandboxes from it. On failure the status becomes\n`failed` and `error_message` is populated.\n\nTo rebuild an existing template (e.g. after a failure or when the\nbase image updates), use `POST /templates/{id}/builds`.\n","security":["81bac367-f771-4ab6-b29f-acdf9b0743a2"],"requestBody":"a1a3fd86-9795-42ac-8c6b-469ffe9ad54e","responses":{"202":"a158bc28-b9c9-4d6d-83a8-b13e347e71ae","400":"318ea8b0-f35a-4079-bf84-3f05eccf0852","401":"3b7e538d-c5fd-4685-b662-2829a6c4d2a2","409":"0914e6db-28f5-476b-b5ed-b2b166043c2d","429":"16918b94-a1ed-4e7c-b96e-541223405cc4","500":"cae450ab-9608-4ed7-94b0-09e431191758"},"method":"post","type":"path","servers":["16a19078-42ad-4395-bd26-6567cf3c7c2c"],"path":"/templates","baseUrlOptions":["https://api.superserve.ai"],"title":"Create a template and kick off the first build","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","build_spec"],"properties":{"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-z0-9]([a-z0-9._/-]*[a-z0-9])?$","description":"Human-readable name, unique per team. Used as the `from_template` value when creating sandboxes. Lowercase letters, digits, and `.` `_` `/` `-` only; must start and end with a letter or digit. Names starting with `superserve/` are reserved for curated system templates and rejected for team-owned templates.\n","example":"my-python-env","isRequired":true,"uniqueKey":"name","typeLabel":"string"},"build_spec":{"type":"object","required":["from"],"description":"Declaration of how to build a template.","properties":{"from":{"type":"string","description":"OCI image reference for the base. Examples: `python:3.11`, `node:22-slim`, `ghcr.io/myorg/foo:v1`. Resolved to a digest at build time and recorded for reproducibility. Must be a Linux/amd64 image with a shell at `/bin/sh` and the `mkdir`, `mount`, `chmod`, and `sync` commands.\n","example":"python:3.11","isRequired":true,"uniqueKey":"build_spec.from","typeLabel":"string"},"steps":{"type":"array","items":{"type":"object","description":"A single build step. Exactly one of `run`, `env`, `workdir`, or `user` must be set.\n","properties":{"run":{"type":"string","description":"Shell command. Wrapped in `/bin/sh -c` inside the build VM.","example":"pip install -r requirements.txt","uniqueKey":"build_spec.steps.items.[INDEX].run","typeLabel":"string"},"env":{"type":"object","required":["key","value"],"description":"Sets an environment variable for subsequent build steps AND the template's runtime default. Sandboxes created from this template inherit it; caller-supplied `env_vars` on sandbox create override on conflict.\n","properties":{"key":{"type":"string","isRequired":true,"uniqueKey":"build_spec.steps.items.[INDEX].env.key","typeLabel":"string"},"value":{"type":"string","isRequired":true,"uniqueKey":"build_spec.steps.items.[INDEX].env.value","typeLabel":"string"}},"uniqueKey":"build_spec.steps.items.[INDEX].env","typeLabel":"object"},"workdir":{"type":"string","description":"Working directory for subsequent build steps AND the template's runtime default cwd. Absolute paths are used as-is; relative paths resolve against the current workdir (base `/` when none has been set). Auto-created and chowned to the current build user. Per-exec `working_dir` overrides at runtime.\n","example":"/srv/app","uniqueKey":"build_spec.steps.items.[INDEX].workdir","typeLabel":"string"},"user":{"type":"object","required":["name"],"description":"Switches the user subsequent build steps execute as, and sets the template's runtime default exec user. The user is created if it doesn't exist. Per-exec `user` overrides at runtime.\n","properties":{"name":{"type":"string","description":"Linux username. Must start with a lowercase letter or underscore; allowed characters are [a-z0-9_-], max 31 chars.\n","example":"appuser","isRequired":true,"uniqueKey":"build_spec.steps.items.[INDEX].user.name","typeLabel":"string"},"sudo":{"type":"boolean","default":false,"description":"When true, grants passwordless sudo to the user.","uniqueKey":"build_spec.steps.items.[INDEX].user.sudo","typeLabel":"boolean"}},"uniqueKey":"build_spec.steps.items.[INDEX].user","typeLabel":"object"}},"uniqueKey":"build_spec.steps.items.[INDEX]","typeLabel":"object"},"description":"Ordered list of build steps executed inside the build VM.","uniqueKey":"build_spec.steps","typeLabel":"object[]"},"start_cmd":{"type":"string","description":"Optional command started after build steps complete. The snapshot captures the running process, so sandboxes restored from this template come up with the process already live.\n","uniqueKey":"build_spec.start_cmd","typeLabel":"string"},"ready_cmd":{"type":"string","description":"Optional readiness probe. Polled every 2s after `start_cmd`, until it exits 0 or 10 minutes elapse. Use to wait for a server to bind its port before snapshotting.\n","uniqueKey":"build_spec.ready_cmd","typeLabel":"string"}},"isRequired":true,"uniqueKey":"build_spec","typeLabel":"object"},"vcpu":{"type":"integer","minimum":1,"maximum":32,"default":1,"uniqueKey":"vcpu","typeLabel":"integer"},"memory_mib":{"type":"integer","minimum":256,"maximum":131072,"default":1024,"uniqueKey":"memory_mib","typeLabel":"integer"},"disk_mib":{"type":"integer","minimum":1024,"maximum":131072,"default":4096,"uniqueKey":"disk_mib","typeLabel":"integer"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"name":"my-python-env","build_spec":{"from":"python:3.11","steps":[{"run":"pip install -r requirements.txt","workdir":"/srv/app"}],"start_cmd":"\u003cstring>","ready_cmd":"\u003cstring>"},"vcpu":1,"memory_mib":1024,"disk_mib":4096}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"a158bc28-b9c9-4d6d-83a8-b13e347e71ae":{"description":"Template created; first build queued","content":{"application/json":{"schema":{"type":"object","description":"Returned by `POST /templates` — includes both the new template id\nand the id of the first build that was queued for it. Clients can\nimmediately open the build-log SSE stream or poll the template for\nstatus transitions.\n","properties":{"id":{"type":"string","format":"uuid","uniqueKey":"id","typeLabel":"string\u003cuuid>"},"team_id":{"type":"string","format":"uuid","uniqueKey":"team_id","typeLabel":"string\u003cuuid>"},"name":{"type":"string","uniqueKey":"name","typeLabel":"string"},"status":{"type":"string","enum":["building","ready","failed"],"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"vcpu":{"type":"integer","uniqueKey":"vcpu","typeLabel":"integer"},"memory_mib":{"type":"integer","uniqueKey":"memory_mib","typeLabel":"integer"},"disk_mib":{"type":"integer","uniqueKey":"disk_mib","typeLabel":"integer"},"created_at":{"type":"string","format":"date-time","uniqueKey":"created_at","typeLabel":"string\u003cdate-time>"},"build_id":{"type":"string","format":"uuid","description":"ID of the first build. Use it to stream logs or poll status.","uniqueKey":"build_id","typeLabel":"string\u003cuuid>"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","team_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","name":"\u003cstring>","status":"building","vcpu":123,"memory_mib":123,"disk_mib":123,"created_at":"2023-11-07T05:31:56Z","build_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a"}}},"exampleType":"generated"}},"exampleType":"generated"},"318ea8b0-f35a-4079-bf84-3f05eccf0852":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","description":"Error envelope. `error.code` is a stable, machine-readable identifier\n(e.g. `bad_request`, `not_found`, `conflict`, `sandbox_pausing`,\n`rate_limited`, `too_many_builds`, `too_many_templates`, `too_many_sandboxes`,\n`image_pull_failed`, `step_failed`, `snapshot_failed`,\n`start_cmd_failed`, `ready_cmd_failed`, `capacity_unavailable`,\n`build_timed_out`, `infrastructure_failed`, `build_failed`).\n`error.message` is human-readable and may change between releases;\nclients should branch on `code`, not `message`.\n","properties":{"error":{"type":"object","properties":{"code":{"type":"string","uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.message","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"3b7e538d-c5fd-4685-b662-2829a6c4d2a2":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"type":"object","description":"Error envelope. `error.code` is a stable, machine-readable identifier\n(e.g. `bad_request`, `not_found`, `conflict`, `sandbox_pausing`,\n`rate_limited`, `too_many_builds`, `too_many_templates`, `too_many_sandboxes`,\n`image_pull_failed`, `step_failed`, `snapshot_failed`,\n`start_cmd_failed`, `ready_cmd_failed`, `capacity_unavailable`,\n`build_timed_out`, `infrastructure_failed`, `build_failed`).\n`error.message` is human-readable and may change between releases;\nclients should branch on `code`, not `message`.\n","properties":{"error":{"type":"object","properties":{"code":{"type":"string","uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.message","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"0914e6db-28f5-476b-b5ed-b2b166043c2d":{"description":"Operation conflicts with the resource's current state","content":{"application/json":{"schema":{"type":"object","description":"Error envelope. `error.code` is a stable, machine-readable identifier\n(e.g. `bad_request`, `not_found`, `conflict`, `sandbox_pausing`,\n`rate_limited`, `too_many_builds`, `too_many_templates`, `too_many_sandboxes`,\n`image_pull_failed`, `step_failed`, `snapshot_failed`,\n`start_cmd_failed`, `ready_cmd_failed`, `capacity_unavailable`,\n`build_timed_out`, `infrastructure_failed`, `build_failed`).\n`error.message` is human-readable and may change between releases;\nclients should branch on `code`, not `message`.\n","properties":{"error":{"type":"object","properties":{"code":{"type":"string","uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.message","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"16918b94-a1ed-4e7c-b96e-541223405cc4":{"description":"Quota reached. The `error.code` distinguishes:\n- `too_many_builds` — team has reached its concurrent build\n limit; wait for an active build to finish.\n- `too_many_templates` — team has reached its total template\n count limit; delete templates or contact support to raise the cap.\n","content":{"application/json":{"schema":{"type":"object","description":"Error envelope. `error.code` is a stable, machine-readable identifier\n(e.g. `bad_request`, `not_found`, `conflict`, `sandbox_pausing`,\n`rate_limited`, `too_many_builds`, `too_many_templates`, `too_many_sandboxes`,\n`image_pull_failed`, `step_failed`, `snapshot_failed`,\n`start_cmd_failed`, `ready_cmd_failed`, `capacity_unavailable`,\n`build_timed_out`, `infrastructure_failed`, `build_failed`).\n`error.message` is human-readable and may change between releases;\nclients should branch on `code`, not `message`.\n","properties":{"error":{"type":"object","properties":{"code":{"type":"string","uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.message","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"cae450ab-9608-4ed7-94b0-09e431191758":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","description":"Error envelope. `error.code` is a stable, machine-readable identifier\n(e.g. `bad_request`, `not_found`, `conflict`, `sandbox_pausing`,\n`rate_limited`, `too_many_builds`, `too_many_templates`, `too_many_sandboxes`,\n`image_pull_failed`, `step_failed`, `snapshot_failed`,\n`start_cmd_failed`, `ready_cmd_failed`, `capacity_unavailable`,\n`build_timed_out`, `infrastructure_failed`, `build_failed`).\n`error.message` is human-readable and may change between releases;\nclients should branch on `code`, not `message`.\n","properties":{"error":{"type":"object","properties":{"code":{"type":"string","uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.message","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"81bac367-f771-4ab6-b29f-acdf9b0743a2":{"apiKey":{"type":"apiKey","in":"header","name":"X-API-Key","scopes":[],"schemeName":"apiKey"}}},"servers":{"16a19078-42ad-4395-bd26-6567cf3c7c2c":{"url":"https://api.superserve.ai","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"X-API-Key","scopes":[],"schemeName":"apiKey"},"schema":{"title":"X-API-Key","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"apiKey","name":"X-API-Key"}],"title":"apiKey"}]},"originalFileLocation":"https://api.superserve.ai/openapi.yaml"},"subdomain":"superserve-ai-superserve-33","siteName":"Superserve","title":"Create a template and kick off the first build - Superserve","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-05T01:48:05.650Z","originalFileLocation":"api-reference/templates/create-a-template-and-kick-off-the-first-build.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"dark\";if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Creates a template and queues the first build. The response includes both the template id and the build id, so clients can immediately poll GET /templates/{id} for overall status or subscribe to GET /templates/{id}/builds/{build_id}/logs for live output. Template starts in status building. Poll until it reaches ready before creating sandboxes from it. On failure the status becomes failed and error_message is populated. To rebuild an existing template (e.g. after a failure or when the base image updates), use POST /templates/{id}/builds.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Superserve\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/superserve-ai-superserve-33/Ce0V87RVeZcleFb4/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/superserve-ai-superserve-33/Ce0V87RVeZcleFb4/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/superserve-ai-superserve-33/Ce0V87RVeZcleFb4/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/superserve-ai-superserve-33/Ce0V87RVeZcleFb4/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/superserve-ai-superserve-33/Ce0V87RVeZcleFb4/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/superserve-ai-superserve-33/Ce0V87RVeZcleFb4/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/superserve-ai-superserve-33/Ce0V87RVeZcleFb4/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/superserve-ai-superserve-33/Ce0V87RVeZcleFb4/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/superserve-ai-superserve-33/Ce0V87RVeZcleFb4/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create a template and kick off the first build - Superserve\">\u003cmeta data-mint-head property=\"og:description\" content=\"Creates a template and queues the first build. The response includes both the template id and the build id, so clients can immediately poll GET /templates/{id} for overall status or subscribe to GET /templates/{id}/builds/{build_id}/logs for live output. Template starts in status building. Poll until it reaches ready before creating sandboxes from it. On failure the status becomes failed and error_message is populated. To rebuild an existing template (e.g. after a failure or when the base image updates), use POST /templates/{id}/builds.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Superserve\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.superserve.ai/api-reference/templates/create-a-template-and-kick-off-the-first-build\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://superserve-ai-superserve-33.mintlify.site/_mintlify/api/og/v2?division=Templates\u0026amp;title=Create+a+template+and+kick+off+the+first+build\u0026amp;description=Creates+a+template+and+queues+the+first+build.+The+response+includes%0Aboth+the+template+id+and+the+build+id%2C+so+clients+can+immediately%0Apoll+%60GET+%2Ftemplates%2F%7Bid%7D\u0026amp;theme=812d3aa274a9b09d054f08f6\u0026amp;signature=f08252e917c75d5b8098520525e66e7c8a04a7ac111452aa4f10509b9090d861\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create a template and kick off the first build - Superserve\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Creates a template and queues the first build. The response includes both the template id and the build id, so clients can immediately poll GET /templates/{id} for overall status or subscribe to GET /templates/{id}/builds/{build_id}/logs for live output. Template starts in status building. Poll until it reaches ready before creating sandboxes from it. On failure the status becomes failed and error_message is populated. To rebuild an existing template (e.g. after a failure or when the base image updates), use POST /templates/{id}/builds.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://superserve-ai-superserve-33.mintlify.site/_mintlify/api/og/v2?division=Templates\u0026amp;title=Create+a+template+and+kick+off+the+first+build\u0026amp;description=Creates+a+template+and+queues+the+first+build.+The+response+includes%0Aboth+the+template+id+and+the+build+id%2C+so+clients+can+immediately%0Apoll+%60GET+%2Ftemplates%2F%7Bid%7D\u0026amp;theme=812d3aa274a9b09d054f08f6\u0026amp;signature=f08252e917c75d5b8098520525e66e7c8a04a7ac111452aa4f10509b9090d861\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/superserve-ai-superserve-33/Ce0V87RVeZcleFb4/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Superserve\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#B2FAB4\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.superserve.ai/api-reference/templates/create-a-template-and-kick-off-the-first-build\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/templates/create-a-template-and-kick-off-the-first-build.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.superserve.ai/#organization\",\"name\":\"Superserve\",\"url\":\"https://docs.superserve.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/superserve-ai-superserve-33/G055TX3BjwXpQedU/logo.svg?fit=max\u0026auto=format\u0026n=G055TX3BjwXpQedU\u0026q=85\u0026s=69233fb550a17b81d7d7fa083ca7f3de\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.superserve.ai#website\",\"name\":\"Superserve\",\"url\":\"https://docs.superserve.ai\",\"publisher\":{\"@id\":\"https://docs.superserve.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.superserve.ai/api-reference/templates/create-a-template-and-kick-off-the-first-build#webpage\",\"url\":\"https://docs.superserve.ai/api-reference/templates/create-a-template-and-kick-off-the-first-build\",\"name\":\"Create a template and kick off the first build\",\"description\":\"Creates a template and queues the first build. The response includes both the template id and the build id, so clients can immediately poll GET /templates/{id} for overall status or subscribe to GET /templates/{id}/builds/{build_id}/logs for live output. Template starts in status building. Poll until it reaches ready before creating sandboxes from it. On failure the status becomes failed and error_message is populated. To rebuild an existing template (e.g. after a failure or when the base image updates), use POST /templates/{id}/builds.\",\"dateModified\":\"2026-11-05T01:48:05.650Z\",\"isPartOf\":{\"@id\":\"https://docs.superserve.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.superserve.ai/api-reference/templates/create-a-template-and-kick-off-the-first-build#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.superserve.ai/api-reference/templates/create-a-template-and-kick-off-the-first-build#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Templates\",\"item\":\"https://docs.superserve.ai/api-reference/templates/list-templates-visible-to-the-caller\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a template and kick off the first build\",\"item\":\"https://docs.superserve.ai/api-reference/templates/create-a-template-and-kick-off-the-first-build\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.superserve.ai/api-reference/templates/create-a-template-and-kick-off-the-first-build#apireference\",\"headline\":\"Create a template and kick off the first build\",\"name\":\"Create a template and kick off the first build\",\"description\":\"Creates a template and queues the first build. The response includes both the template id and the build id, so clients can immediately poll GET /templates/{id} for overall status or subscribe to GET /templates/{id}/builds/{build_id}/logs for live output. Template starts in status building. Poll until it reaches ready before creating sandboxes from it. On failure the status becomes failed and error_message is populated. To rebuild an existing template (e.g. after a failure or when the base image updates), use POST /templates/{id}/builds.\",\"url\":\"https://docs.superserve.ai/api-reference/templates/create-a-template-and-kick-off-the-first-build\",\"mainEntityOfPage\":{\"@id\":\"https://docs.superserve.ai/api-reference/templates/create-a-template-and-kick-off-the-first-build#webpage\"},\"dateModified\":\"2026-11-05T01:48:05.650Z\",\"publisher\":{\"@id\":\"https://docs.superserve.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.superserve.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Superserve\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Superserve","nav":{"global":null,"anchors":[{"anchor":"Documentation","icon":"book-open","pages":[{"title":"Documentation","href":"/introduction"}]},{"anchor":"SDK Reference","icon":"code","pages":[{"title":"SDK Reference","href":"/sdk-reference/sandbox"}]},{"anchor":"REST API","icon":"server","groups":[{"group":"Sandboxes","pages":[{"title":"List all sandboxes","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml get /sandboxes","href":"/api-reference/sandboxes/list-all-sandboxes"},{"title":"Create a new sandbox","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml post /sandboxes","href":"/api-reference/sandboxes/create-a-new-sandbox"},{"title":"Get a sandbox by ID","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml get /sandboxes/{sandbox_id}","href":"/api-reference/sandboxes/get-a-sandbox-by-id"},{"title":"Partially update a running sandbox","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml patch /sandboxes/{sandbox_id}","href":"/api-reference/sandboxes/partially-update-a-running-sandbox"},{"title":"Delete a sandbox","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml delete /sandboxes/{sandbox_id}","href":"/api-reference/sandboxes/delete-a-sandbox"},{"title":"Pause a running sandbox","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml post /sandboxes/{sandbox_id}/pause","href":"/api-reference/sandboxes/pause-a-running-sandbox"},{"title":"Resume a paused sandbox","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml post /sandboxes/{sandbox_id}/resume","href":"/api-reference/sandboxes/resume-a-paused-sandbox"},{"title":"Activate a sandbox","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml post /sandboxes/{sandbox_id}/activate","href":"/api-reference/sandboxes/activate-a-sandbox"},{"title":"List a sandbox's egress activity","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml get /sandboxes/{sandbox_id}/network","href":"/api-reference/sandboxes/list-a-sandboxs-egress-activity"},{"title":"List published preview ports","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml get /sandboxes/{sandbox_id}/preview-ports","href":"/api-reference/sandboxes/list-published-preview-ports"},{"title":"Publish or update a preview port","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml post /sandboxes/{sandbox_id}/preview-ports","href":"/api-reference/sandboxes/publish-or-update-a-preview-port"},{"title":"Unpublish a preview port","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml delete /sandboxes/{sandbox_id}/preview-ports/{port}","href":"/api-reference/sandboxes/unpublish-a-preview-port"},{"title":"Mint a token for a private preview port","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml post /sandboxes/{sandbox_id}/preview-ports/{port}/token","href":"/api-reference/sandboxes/mint-a-token-for-a-private-preview-port"},{"title":"Rotate a private preview port's token generation","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml post /sandboxes/{sandbox_id}/preview-ports/{port}/token/rotate","href":"/api-reference/sandboxes/rotate-a-private-preview-ports-token-generation"}]},{"group":"Snapshots","pages":[{"title":"Snapshot a sandbox","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml post /sandboxes/{sandbox_id}/snapshot","href":"/api-reference/snapshots/snapshot-a-sandbox"},{"title":"List a sandbox's snapshots","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml get /sandboxes/{sandbox_id}/snapshots","href":"/api-reference/snapshots/list-a-sandboxs-snapshots"},{"title":"Get a snapshot","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml get /snapshots/{snapshot_id}","href":"/api-reference/snapshots/get-a-snapshot"},{"title":"Rename a snapshot","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml patch /snapshots/{snapshot_id}","href":"/api-reference/snapshots/rename-a-snapshot"},{"title":"Delete a snapshot","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml delete /snapshots/{snapshot_id}","href":"/api-reference/snapshots/delete-a-snapshot"}]},{"group":"Exec","pages":[{"title":"Run a command and wait for it to finish","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml post /exec","href":"/api-reference/exec/run-a-command-and-wait-for-it-to-finish"},{"title":"Run a command and stream output over SSE","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml post /exec/stream","href":"/api-reference/exec/run-a-command-and-stream-output-over-sse"},{"title":"Run a command over a WebSocket","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml get /exec/connect","href":"/api-reference/exec/run-a-command-over-a-websocket"}]},{"group":"Files","pages":[{"title":"List a directory inside a sandbox","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml get /sandboxes/{sandbox_id}/files","href":"/api-reference/files/list-a-directory-inside-a-sandbox"},{"title":"Read a file from a sandbox","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml get /files","href":"/api-reference/files/read-a-file-from-a-sandbox"},{"title":"Write a file to a sandbox","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml post /files","href":"/api-reference/files/write-a-file-to-a-sandbox"}]},{"group":"Templates","pages":[{"title":"List templates visible to the caller","description":"Returns the caller's team's templates plus the curated system\ntemplates (available to everyone, identified by the `superserve/` name\nprefix — e.g. `superserve/base`, `superserve/python-3.11`, `superserve/node-22`),\nordered by creation time (newest first) by default.\n\n## Pagination, sorting, and search\n\nPass `limit` (and `offset`) to page; `X-Total-Count` reports the total\nacross all pages. Omitting `limit` returns the full list. Narrow the\nshelves with `owner`, sort with `sort` + `order`, and search names with\n`q` (case-insensitive substring). The legacy `name_prefix` prefix\nfilter is still honored for backward compatibility.\n","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml get /templates","href":"/api-reference/templates/list-templates-visible-to-the-caller"},{"title":"Create a template and kick off the first build","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml post /templates","href":"/api-reference/templates/create-a-template-and-kick-off-the-first-build"},{"title":"Get a template by ID","description":null,"deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml get /templates/{template_id}","href":"/api-reference/templates/get-a-template-by-id"},{"title":"Delete a template","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml delete /templates/{template_id}","href":"/api-reference/templates/delete-a-template"},{"title":"List recent builds for a template","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml get /templates/{template_id}/builds","href":"/api-reference/templates/list-recent-builds-for-a-template"},{"title":"Rebuild an existing template","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml post /templates/{template_id}/builds","href":"/api-reference/templates/rebuild-an-existing-template"},{"title":"Get a build by ID","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml get /templates/{template_id}/builds/{build_id}","href":"/api-reference/templates/get-a-build-by-id"},{"title":"Cancel an in-flight build","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml delete /templates/{template_id}/builds/{build_id}","href":"/api-reference/templates/cancel-an-in-flight-build"},{"title":"Stream build logs via SSE","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml get /templates/{template_id}/builds/{build_id}/logs","href":"/api-reference/templates/stream-build-logs-via-sse"}]},{"group":"Secrets","pages":[{"title":"Create a secret","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml post /secrets","href":"/api-reference/secrets/create-a-secret"},{"title":"List secrets for the calling team","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml get /secrets","href":"/api-reference/secrets/list-secrets-for-the-calling-team"},{"title":"Get a secret's metadata","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml get /secrets/{name}","href":"/api-reference/secrets/get-a-secrets-metadata"},{"title":"Rotate a secret's value","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml patch /secrets/{name}","href":"/api-reference/secrets/rotate-a-secrets-value"},{"title":"Revoke a secret","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml delete /secrets/{name}","href":"/api-reference/secrets/revoke-a-secret"},{"title":"Attach a secret to a sandbox","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml post /sandboxes/{sandbox_id}/secrets","href":"/api-reference/sandboxes/attach-a-secret-to-a-sandbox"},{"title":"Detach a secret from a sandbox","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml delete /sandboxes/{sandbox_id}/secrets/{env_key}","href":"/api-reference/sandboxes/detach-a-secret-from-a-sandbox"},{"title":"List proxy egress events that used this credential","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml get /secrets/{name}/audit","href":"/api-reference/secrets/list-proxy-egress-events-that-used-this-credential"},{"title":"List sandboxes currently bound to this credential","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml get /secrets/{name}/sandboxes","href":"/api-reference/secrets/list-sandboxes-currently-bound-to-this-credential"},{"title":"List the built-in provider shortcut catalog","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml get /providers","href":"/api-reference/secrets/list-the-built-in-provider-shortcut-catalog"}]},{"group":"Team Management","pages":[{"title":"List team members","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml get /teams/{team_id}/members","href":"/api-reference/rbac/list-team-members"},{"title":"Add or invite a team member","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml post /teams/{team_id}/members","href":"/api-reference/rbac/add-or-invite-a-team-member"},{"title":"Deactivate a team member","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml delete /teams/{team_id}/members/{user_id}","href":"/api-reference/rbac/deactivate-a-team-member"},{"title":"List team role assignments","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml get /teams/{team_id}/roles","href":"/api-reference/rbac/list-team-role-assignments"},{"title":"Assign a team role","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml post /teams/{team_id}/roles","href":"/api-reference/rbac/assign-a-team-role"},{"title":"Revoke a team role","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml delete /teams/{team_id}/roles/{assignment_id}","href":"/api-reference/rbac/revoke-a-team-role"}]},{"group":"Activity","pages":[{"title":"List team audit-log activity","deprecated":null,"version":null,"openapi":"https://api.superserve.ai/openapi.yaml get /activity","href":"/api-reference/activity/list-team-audit-log-activity"}]}]},{"anchor":"Integrations","icon":"puzzle-piece","pages":[{"title":"Integrations","href":"/integrations/overview"}]}]},"basePath":"","title":"Create a template and kick off the first build - Superserve","buildId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","deploymentId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","dynamics":["c2aa737661","b0f84f53ff","a9bb46feb3","2b790eda92"],"chunks":["OpenApiReferenceProvider-Myd8dsju.js","utils-C2HkQgW0.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-8rSppmTv.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-B6MjiCFm.js","snippetPresets-DwrSAONL.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","Page-CxAy5y67.js","ApiExamples-1-a5UQKQ.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C541m7wZ.js","shallow-CWELCZ77.js","getApiPlaygroundDisplay-CTo5Zn03.js","CodeSnippet-D--dzvnl.js","CodeSnippets-DM3cXEDh.js","getPastedJson-C-VECgcL.js","icon-BPq2-Mg3.js","MethodPill-D9J5cUHd.js","DuplicateIcon-BqHaxUnD.js","createIcon-CIbcZHp9.js","DynamicMarkdown-BKiHAm_d.js","SectionHeading-DstQXt3H.js","axios-vUo_bRtp.js","Markdown-CpxgzsKA.js","clsx-C5EfhVm0.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CJ9Oly2E.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-Mk6P3qvh.js"]}