Compute resources (CPU / memory / disk / architecture) are inherited from the snapshot of the selected Template Build. They are fixed when the Template is built and cannot be overridden at creation time.
Idempotency: pass an explicit Idempotency-Key request header as the idempotency key (unrelated to the tracing header X-Request-ID, which is always generated server-side; a client-supplied value is ignored). Resubmitting the same key with identical parameters returns the sandbox created by the first request (with its current access data) plus an Idempotency-Replayed: true response header. The same key with different parameters returns 400 Sandbox.IdempotentParameterMismatch. If the creation under that key has deterministically failed, or the sandbox it created has been deleted, the request returns 409 Sandbox.IdempotentKeyConsumed (retryable failures are automatically re-attempted when the same key is retried). The deduplication window is 24 hours; after it expires the same key is treated as a new request. Without the header, no deduplication is performed.
Backends that create asynchronously return as soon as the request is accepted: the instance starts in provisioning and transitions to running once ready. The detail endpoint is queryable during this period (see GET /sandboxes/).
The sandbox_access_token stays valid for the entire lifetime of the sandbox.
Optional caller-generated idempotency key (a UUID is recommended).
Matched byte-for-byte: 1-64 printable ASCII characters, no whitespace.
Absent means no deduplication. The same key with a different request
body returns 400 Sandbox.IdempotentParameterMismatch. Echoed on
responses; replays add Idempotency-Replayed: true. Keys are remembered
for 24 hours.
Target data center name, e.g. us-central1-c. Optional: when omitted, the organization's configured default data center is used (maintained by the platform administrator); if the organization has no default configured, the request returns 400. Note that Templates are bound to a data center: the effective data center (whether explicit or default) must match the one that owns the Template referenced by template_id, otherwise the request is treated as template-not-found.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"GMI Cloud Documentation","description":"Inference Endpoints, GPU Compute, AI Workflows, and Agent Deployment","colors":{"primary":"#6e7a0e","light":"#DDEA4E","dark":"#DDEA4E"},"logo":{"light":"https://mintcdn.com/gmicloud/NMovxHyNviV7LUYd/logo/gmi-cloud-logo.svg?fit=max\u0026auto=format\u0026n=NMovxHyNviV7LUYd\u0026q=85\u0026s=17a2b497b7719739248dfca2ae9d6c4a","dark":"https://mintcdn.com/gmicloud/NMovxHyNviV7LUYd/logo/gmi-logo-white.svg?fit=max\u0026auto=format\u0026n=NMovxHyNviV7LUYd\u0026q=85\u0026s=aa77416cbe67a81b8e7029a8425d31e9"},"favicon":{"light":"https://mintcdn.com/gmicloud/np5vsfVwdGGHAKEu/favicon.ico?fit=max\u0026auto=format\u0026n=np5vsfVwdGGHAKEu\u0026q=85\u0026s=ceee7fb6e73ccace00b3b7cf8b040dc3","dark":"https://mintcdn.com/gmicloud/np5vsfVwdGGHAKEu/favicon.ico?fit=max\u0026auto=format\u0026n=np5vsfVwdGGHAKEu\u0026q=85\u0026s=ceee7fb6e73ccace00b3b7cf8b040dc3"},"navbar":{"links":[{"href":"https://discord.gg/TkBT7r2D97","label":"Discord"},{"href":"https://github.com/GMISWE","label":"GitHub"},{"href":"https://www.gmicloud.ai/contact#sales","label":"Support"}],"primary":{"type":"button","label":"Open Console","href":"https://console.gmicloud.ai/"}},"footer":{"socials":{"discord":"https://discord.gg/TkBT7r2D97","x":"https://x.com/gmi_cloud","github":"https://github.com/GMISWE","linkedin":"https://www.linkedin.com/company/gmi-cloud-ai","youtube":"https://www.youtube.com/@GMICloud"}},"fonts":{"family":"https://fonts.googleapis.com/css2?family=DM+Sans"},"integrations":{"gtm":{"tagId":"GTM-P5WZVMXP"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"gmicloud","hasAudioNarration":false,"actualSubdomain":"gmicloud","customDomains":["docs.gmicloud.ai"],"gitSource":{"type":"gitlab","owner":"product-center","repo":"mintlify-doc-site","deployBranch":"main","contentDirectory":"","isPrivate":true,"projectId":73773841,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae39866b150d6fc53036f23","collectionId":"cffa4653-0bca-48cc-bb56-a5cc0f6d43d3","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae39866b150d6fc53036f23"},"entitlements":{},"buildId":"6ae39a80805d62ff212cfdd9","clientVersion":"0.0.4021","searchFilterCounts":[{"language":"default","tag":"Guides","count":236},{"language":"default","tag":"Model Quickstarts","count":222},{"language":"default","tag":"Video","count":94},{"language":"default","tag":"API Reference","count":77},{"language":"default","tag":"Text","count":75},{"language":"default","tag":"GMI Agentbox","count":50},{"language":"default","tag":"GMI Studio","count":46},{"language":"default","tag":"Compute Service APIs","count":41},{"language":"default","tag":"Node Reference","count":38},{"language":"default","tag":"Image","count":34}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"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":"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":"per-site-search-delta","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":"editor-private-page-search","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":"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":"byok-sep-25","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":"billing-updated-9-15","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":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"a:has(>span.bg-primary-dark) .text-white,a:has(>span.bg-primary-dark) svg{color:#000!important}"}],"page":{"pagePath":"agentbox-api/sandbox/create-a-sandbox","slug":"/agentbox-api/sandbox/create-a-sandbox","pageMetadata":{"title":"Create a sandbox","description":"Creates a sandbox from a `template_id`.\n\nCompute resources (CPU / memory / disk / architecture) are inherited from the snapshot of the selected Template Build. They are fixed when the Template is built and cannot be overridden at creation time.\n\nIdempotency: pass an explicit `Idempotency-Key` request header as the idempotency key (unrelated to the tracing header `X-Request-ID`, which is always generated server-side; a client-supplied value is ignored). Resubmitting the same key with identical parameters returns the sandbox created by the first request (with its current access data) plus an `Idempotency-Replayed: true` response header. The same key with different parameters returns 400 `Sandbox.IdempotentParameterMismatch`. If the creation under that key has deterministically failed, or the sandbox it created has been deleted, the request returns 409 `Sandbox.IdempotentKeyConsumed` (retryable failures are automatically re-attempted when the same key is retried). The deduplication window is 24 hours; after it expires the same key is treated as a new request. Without the header, no deduplication is performed.\n\nBackends that create asynchronously return as soon as the request is accepted: the instance starts in `provisioning` and transitions to `running` once ready. The detail endpoint is queryable during this period (see GET /sandboxes/{id}).\n\n**The `sandbox_access_token` stays valid for the entire lifetime of the sandbox.**\n","deprecated":null,"version":null,"openapi":"/api-spec/sandbox_api.yaml post /sandboxes","href":"/agentbox-api/sandbox/create-a-sandbox","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 strong: \"strong\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Creates a sandbox from a \", _jsx(_components.code, {\n children: \"template_id\"\n }), \".\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Compute resources (CPU / memory / disk / architecture) are inherited from the snapshot of the selected Template Build. They are fixed when the Template is built and cannot be overridden at creation time.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Idempotency: pass an explicit \", _jsx(_components.code, {\n children: \"Idempotency-Key\"\n }), \" request header as the idempotency key (unrelated to the tracing header \", _jsx(_components.code, {\n children: \"X-Request-ID\"\n }), \", which is always generated server-side; a client-supplied value is ignored). Resubmitting the same key with identical parameters returns the sandbox created by the first request (with its current access data) plus an \", _jsx(_components.code, {\n children: \"Idempotency-Replayed: true\"\n }), \" response header. The same key with different parameters returns 400 \", _jsx(_components.code, {\n children: \"Sandbox.IdempotentParameterMismatch\"\n }), \". If the creation under that key has deterministically failed, or the sandbox it created has been deleted, the request returns 409 \", _jsx(_components.code, {\n children: \"Sandbox.IdempotentKeyConsumed\"\n }), \" (retryable failures are automatically re-attempted when the same key is retried). The deduplication window is 24 hours; after it expires the same key is treated as a new request. Without the header, no deduplication is performed.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Backends that create asynchronously return as soon as the request is accepted: the instance starts in \", _jsx(_components.code, {\n children: \"provisioning\"\n }), \" and transitions to \", _jsx(_components.code, {\n children: \"running\"\n }), \" once ready. The detail endpoint is queryable during this period (see GET /sandboxes/\", \").\"]\n }), \"\\n\", _jsx(_components.p, {\n children: _jsxs(_components.strong, {\n children: [\"The \", _jsx(_components.code, {\n children: \"sandbox_access_token\"\n }), \" stays valid for the entire lifetime of the sandbox.\"]\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":{"config":{},"pageMetadata":{"title":"Create a sandbox","description":"Creates a sandbox from a `template_id`.\n\nCompute resources (CPU / memory / disk / architecture) are inherited from the snapshot of the selected Template Build. They are fixed when the Template is built and cannot be overridden at creation time.\n\nIdempotency: pass an explicit `Idempotency-Key` request header as the idempotency key (unrelated to the tracing header `X-Request-ID`, which is always generated server-side; a client-supplied value is ignored). Resubmitting the same key with identical parameters returns the sandbox created by the first request (with its current access data) plus an `Idempotency-Replayed: true` response header. The same key with different parameters returns 400 `Sandbox.IdempotentParameterMismatch`. If the creation under that key has deterministically failed, or the sandbox it created has been deleted, the request returns 409 `Sandbox.IdempotentKeyConsumed` (retryable failures are automatically re-attempted when the same key is retried). The deduplication window is 24 hours; after it expires the same key is treated as a new request. Without the header, no deduplication is performed.\n\nBackends that create asynchronously return as soon as the request is accepted: the instance starts in `provisioning` and transitions to `running` once ready. The detail endpoint is queryable during this period (see GET /sandboxes/{id}).\n\n**The `sandbox_access_token` stays valid for the entire lifetime of the sandbox.**\n","deprecated":null,"version":null,"openapi":"/api-spec/sandbox_api.yaml post /sandboxes","href":"/agentbox-api/sandbox/create-a-sandbox","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/gmicloud/fa3784330bb16240/syft.js"],"openApiReferenceData":{"operation":{"tags":["Sandbox"],"summary":"Create a sandbox","description":"Creates a sandbox from a `template_id`.\n\nCompute resources (CPU / memory / disk / architecture) are inherited from the snapshot of the selected Template Build. They are fixed when the Template is built and cannot be overridden at creation time.\n\nIdempotency: pass an explicit `Idempotency-Key` request header as the idempotency key (unrelated to the tracing header `X-Request-ID`, which is always generated server-side; a client-supplied value is ignored). Resubmitting the same key with identical parameters returns the sandbox created by the first request (with its current access data) plus an `Idempotency-Replayed: true` response header. The same key with different parameters returns 400 `Sandbox.IdempotentParameterMismatch`. If the creation under that key has deterministically failed, or the sandbox it created has been deleted, the request returns 409 `Sandbox.IdempotentKeyConsumed` (retryable failures are automatically re-attempted when the same key is retried). The deduplication window is 24 hours; after it expires the same key is treated as a new request. Without the header, no deduplication is performed.\n\nBackends that create asynchronously return as soon as the request is accepted: the instance starts in `provisioning` and transitions to `running` once ready. The detail endpoint is queryable during this period (see GET /sandboxes/{id}).\n\n**The `sandbox_access_token` stays valid for the entire lifetime of the sandbox.**\n","operationId":"createSandbox","parameters":["2666eb54-5137-4e3d-8593-052c4c8fbd4d"],"requestBody":"2110c00b-e7cd-431d-afa7-56506ae33625","responses":{"201":"dbc49e2d-34d8-492a-8507-a4eef97231a0","400":"ce6d8d17-8d6c-4a7a-80a6-c879d3d66f57","401":"d01d2ce1-344c-4982-9751-492e2b02398c","403":"c7fcd4b9-bda4-444f-b788-236308c0b840","404":"efcb0bf8-1037-4b1a-97da-e7d0c0463675","409":"a0844405-fd42-42db-b853-d5f31824c480","422":"bb2066ea-74c2-4e73-8066-d06d654da32d","429":"13516a1f-b517-4511-8af8-4c3dddc802e7","500":"a572f73b-9db6-4add-abe9-9dd84e06a32d"},"method":"post","type":"path","servers":["72c48b8c-9e84-407e-94b9-ce05318da4ca"],"security":["a1245993-e05e-44d3-8867-bef586be20df"],"path":"/sandboxes","baseUrlOptions":["https://console.gmicloud.ai/api/v2"],"title":"Create a sandbox","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"2666eb54-5137-4e3d-8593-052c4c8fbd4d":{"name":"Idempotency-Key","in":"header","required":false,"description":"Optional caller-generated idempotency key (a UUID is recommended).\nMatched byte-for-byte: 1-64 printable ASCII characters, no whitespace.\nAbsent means no deduplication. The same key with a different request\nbody returns 400 Sandbox.IdempotentParameterMismatch. Echoed on\nresponses; replays add Idempotency-Replayed: true. Keys are remembered\nfor 24 hours.\n","schema":{"type":"string","minLength":1,"maxLength":64,"isRequired":false,"description":"Optional caller-generated idempotency key (a UUID is recommended).\nMatched byte-for-byte: 1-64 printable ASCII characters, no whitespace.\nAbsent means no deduplication. The same key with a different request\nbody returns 400 Sandbox.IdempotentParameterMismatch. Echoed on\nresponses; replays add Idempotency-Replayed: true. Keys are remembered\nfor 24 hours.\n","uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["template_id"],"properties":{"template_id":{"type":"string","description":"Template identifier or name. A snapshot-as-template `snapshotID` is also valid here.","isRequired":true,"uniqueKey":"template_id","typeLabel":"string"},"idc_name":{"type":"string","description":"Target data center name, e.g. us-central1-c. Optional: when omitted, the organization's configured default data center is used (maintained by the platform administrator); if the organization has no default configured, the request returns 400. Note that Templates are bound to a data center: the effective data center (whether explicit or default) must match the one that owns the Template referenced by `template_id`, otherwise the request is treated as template-not-found.\n","uniqueKey":"idc_name","typeLabel":"string"},"timeout":{"type":"integer","format":"int64","description":"Time-to-live in seconds. When omitted or 0 or less, 300 seconds is used.","uniqueKey":"timeout","typeLabel":"integer\u003cint64>"},"env_vars":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"env_vars.additionalProperties","typeLabel":"string"},"uniqueKey":"env_vars","typeLabel":"object"},"metadata":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"metadata.additionalProperties","typeLabel":"string"},"description":"Customer-defined key/value pairs; the platform does not interpret them. The list endpoint can filter by them.","uniqueKey":"metadata","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"template_id":"\u003cstring>","idc_name":"\u003cstring>","timeout":123,"env_vars":{},"metadata":{}}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"dbc49e2d-34d8-492a-8507-a4eef97231a0":{"description":"Sandbox created","content":{"application/json":{"schema":{"type":"object","required":["request_id","data"],"properties":{"request_id":{"type":"string","description":"Request tracing ID","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique sandbox resource ID (UUID), used both in control-plane path parameters and as the billing resource_id.","uniqueKey":"data.id","typeLabel":"string\u003cuuid>"},"sandbox_key":{"type":"string","description":"Data-plane addressing key (an `i` followed by a 20-character random string). Used solely to assemble data-plane URLs: `https://{sandbox_key}.{domain}` and `https://{port}-{sandbox_key}.{domain}`. Control-plane endpoints always use `id` and do not accept this field.\n","uniqueKey":"data.sandbox_key","typeLabel":"string"},"template_id":{"type":"string","description":"Template ID","uniqueKey":"data.template_id","typeLabel":"string"},"domain":{"type":"string","description":"Sandbox data-plane domain. It is the host suffix for data-plane endpoints such as `/files` (`https://{sandbox_key}.{domain}`) and for port services (`https://{port}-{sandbox_key}.{domain}`).\n","uniqueKey":"data.domain","typeLabel":"string"},"sandbox_access_token":{"type":"string","description":"Sandbox data-plane access token (always issued). Sent as the `X-Access-Token` header on `/files`, Sandbox-Exec, and other data-plane endpoints; the control plane (`/api/v2`) does not use it.\n\nThe token returned by create stays valid for the entire lifetime of the sandbox. If the lifetime is later extended via connect or `POST .../timeout`, call the connect endpoint to obtain a new token.\n","uniqueKey":"data.sandbox_access_token","typeLabel":"string"},"traffic_access_token":{"type":"string","description":"Traffic token for non-control ports (issued only when secure=true; sent as the traffic-access-token header). Empty when secure=false.\n","uniqueKey":"data.traffic_access_token","typeLabel":"string"}},"isRequired":true,"uniqueKey":"data","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"request_id":"\u003cstring>","data":{"id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","sandbox_key":"\u003cstring>","template_id":"\u003cstring>","domain":"\u003cstring>","sandbox_access_token":"\u003cstring>","traffic_access_token":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"ce6d8d17-8d6c-4a7a-80a6-c879d3d66f57":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string","description":"Machine-readable business error code","example":"Resource.QuotaExceeded","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error description","example":"The resource quota is not enough.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"request_id":{"type":"string","description":"Tracing ID","example":"req-xxxx","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"details":{"type":"object","description":"Field-level error details","additionalProperties":true,"uniqueKey":"details","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"code":"Parameter.Invalid","message":"Invalid request parameters","request_id":"req-xxxx"},"examples":{"Example":{"title":"Example","value":{"code":"Parameter.Invalid","message":"Invalid request parameters","request_id":"req-xxxx"}}},"exampleType":"examples"}},"exampleType":"examples"},"d01d2ce1-344c-4982-9751-492e2b02398c":{"description":"Unauthenticated","content":{"application/json":{"schema":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string","description":"Machine-readable business error code","example":"Resource.QuotaExceeded","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error description","example":"The resource quota is not enough.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"request_id":{"type":"string","description":"Tracing ID","example":"req-xxxx","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"details":{"type":"object","description":"Field-level error details","additionalProperties":true,"uniqueKey":"details","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"code":"Auth.Unauthorized","message":"Authentication required","request_id":"req-xxxx"},"examples":{"Example":{"title":"Example","value":{"code":"Auth.Unauthorized","message":"Authentication required","request_id":"req-xxxx"}}},"exampleType":"examples"}},"exampleType":"examples"},"c7fcd4b9-bda4-444f-b788-236308c0b840":{"description":"The caller cannot access the organization-scoped resource.","content":{"application/json":{"schema":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string","description":"Machine-readable business error code","example":"Resource.QuotaExceeded","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error description","example":"The resource quota is not enough.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"request_id":{"type":"string","description":"Tracing ID","example":"req-xxxx","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"details":{"type":"object","description":"Field-level error details","additionalProperties":true,"uniqueKey":"details","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"Resource.QuotaExceeded","message":"The resource quota is not enough.","request_id":"req-xxxx","details":{}}}},"exampleType":"generated"}},"exampleType":"generated"},"efcb0bf8-1037-4b1a-97da-e7d0c0463675":{"description":"Resource not found","content":{"application/json":{"schema":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string","description":"Machine-readable business error code","example":"Resource.QuotaExceeded","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error description","example":"The resource quota is not enough.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"request_id":{"type":"string","description":"Tracing ID","example":"req-xxxx","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"details":{"type":"object","description":"Field-level error details","additionalProperties":true,"uniqueKey":"details","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"code":"Resource.NotFound","message":"The requested resource was not found","request_id":"req-xxxx"},"examples":{"Example":{"title":"Example","value":{"code":"Resource.NotFound","message":"The requested resource was not found","request_id":"req-xxxx"}}},"exampleType":"examples"}},"exampleType":"examples"},"a0844405-fd42-42db-b853-d5f31824c480":{"description":"State conflict","content":{"application/json":{"schema":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string","description":"Machine-readable business error code","example":"Resource.QuotaExceeded","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error description","example":"The resource quota is not enough.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"request_id":{"type":"string","description":"Tracing ID","example":"req-xxxx","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"details":{"type":"object","description":"Field-level error details","additionalProperties":true,"uniqueKey":"details","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"code":"Resource.StateConflict","message":"Resource state conflict","request_id":"req-xxxx"},"examples":{"Example":{"title":"Example","value":{"code":"Resource.StateConflict","message":"Resource state conflict","request_id":"req-xxxx"}}},"exampleType":"examples"}},"exampleType":"examples"},"bb2066ea-74c2-4e73-8066-d06d654da32d":{"description":"The request is valid, but the requested capability is not supported in the selected environment.","content":{"application/json":{"schema":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string","description":"Machine-readable business error code","example":"Resource.QuotaExceeded","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error description","example":"The resource quota is not enough.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"request_id":{"type":"string","description":"Tracing ID","example":"req-xxxx","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"details":{"type":"object","description":"Field-level error details","additionalProperties":true,"uniqueKey":"details","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"code":"Template.ProviderNotSupported","message":"The selected IDC does not support this template operation","request_id":"req-xxxx"},"examples":{"Example":{"title":"Example","value":{"code":"Template.ProviderNotSupported","message":"The selected IDC does not support this template operation","request_id":"req-xxxx"}}},"exampleType":"examples"}},"exampleType":"examples"},"13516a1f-b517-4511-8af8-4c3dddc802e7":{"description":"The configured or temporary resource quota would be exceeded.","content":{"application/json":{"schema":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string","description":"Machine-readable business error code","example":"Resource.QuotaExceeded","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error description","example":"The resource quota is not enough.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"request_id":{"type":"string","description":"Tracing ID","example":"req-xxxx","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"details":{"type":"object","description":"Field-level error details","additionalProperties":true,"uniqueKey":"details","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"Resource.QuotaExceeded","message":"The resource quota is not enough.","request_id":"req-xxxx","details":{}}}},"exampleType":"generated"}},"exampleType":"generated"},"a572f73b-9db6-4add-abe9-9dd84e06a32d":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["code","message","request_id"],"properties":{"code":{"type":"string","description":"Machine-readable business error code","example":"Resource.QuotaExceeded","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable error description","example":"The resource quota is not enough.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"request_id":{"type":"string","description":"Tracing ID","example":"req-xxxx","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"details":{"type":"object","description":"Field-level error details","additionalProperties":true,"uniqueKey":"details","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"code":"Internal.ServerError","message":"An internal server error occurred","request_id":"req-xxxx"},"examples":{"Example":{"title":"Example","value":{"code":"Internal.ServerError","message":"An internal server error occurred","request_id":"req-xxxx"}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"a1245993-e05e-44d3-8867-bef586be20df":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API Key or Access Token, always sent as `Authorization: Bearer \u003ctoken>`. The gateway recognizes the token type automatically.\n","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"72c48b8c-9e84-407e-94b9-ce05318da4ca":{"url":"https://console.gmicloud.ai/api/v2","description":"Control plane"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"API Key or Access Token, always sent as `Authorization: Bearer \u003ctoken>`. The gateway recognizes the token type automatically.\n","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"API Key or Access Token, always sent as `Authorization: Bearer \u003ctoken>`. The gateway recognizes the token type automatically.\n","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"api-spec/sandbox_api.yaml"},"subdomain":"gmicloud","siteName":"GMI Cloud Documentation","title":"Create a sandbox - GMI Cloud Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-29T19:06:36.806Z","originalFileLocation":"agentbox-api/sandbox/create-a-sandbox.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;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=\"system\"}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 sandbox from a template_id. Compute resources (CPU / memory / disk / architecture) are inherited from the snapshot of the selected Template Build. They are fixed when the Template is built and cannot be overridden at creation time. Idempotency: pass an explicit Idempotency-Key request header as the idempotency key (unrelated to the tracing header X-Request-ID, which is always generated server-side; a client-supplied value is ignored). Resubmitting the same key with identical parameters returns the sandbox created by the first request (with its current access data) plus an Idempotency-Replayed: true response header. The same key with different parameters returns 400 Sandbox.IdempotentParameterMismatch. If the creation under that key has deterministically failed, or the sandbox it created has been deleted, the request returns 409 Sandbox.IdempotentKeyConsumed (retryable failures are automatically re-attempted when the same key is retried). The deduplication window is 24 hours; after it expires the same key is treated as a new request. Without the header, no deduplication is performed. Backends that create asynchronously return as soon as the request is accepted: the instance starts in provisioning and transitions to running once ready. The detail endpoint is queryable during this period (see GET /sandboxes/{id}). The sandbox_access_token stays valid for the entire lifetime of the sandbox.\">\u003cmeta data-mint-head name=\"application-name\" content=\"GMI Cloud Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/gmicloud/3Gg7T0A9Kt6Sj64N/_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/gmicloud/3Gg7T0A9Kt6Sj64N/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/gmicloud/3Gg7T0A9Kt6Sj64N/_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/gmicloud/3Gg7T0A9Kt6Sj64N/_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/gmicloud/3Gg7T0A9Kt6Sj64N/_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/gmicloud/3Gg7T0A9Kt6Sj64N/_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/gmicloud/3Gg7T0A9Kt6Sj64N/_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/gmicloud/3Gg7T0A9Kt6Sj64N/_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/gmicloud/3Gg7T0A9Kt6Sj64N/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create a sandbox - GMI Cloud Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Creates a sandbox from a template_id. Compute resources (CPU / memory / disk / architecture) are inherited from the snapshot of the selected Template Build. They are fixed when the Template is built and cannot be overridden at creation time. Idempotency: pass an explicit Idempotency-Key request header as the idempotency key (unrelated to the tracing header X-Request-ID, which is always generated server-side; a client-supplied value is ignored). Resubmitting the same key with identical parameters returns the sandbox created by the first request (with its current access data) plus an Idempotency-Replayed: true response header. The same key with different parameters returns 400 Sandbox.IdempotentParameterMismatch. If the creation under that key has deterministically failed, or the sandbox it created has been deleted, the request returns 409 Sandbox.IdempotentKeyConsumed (retryable failures are automatically re-attempted when the same key is retried). The deduplication window is 24 hours; after it expires the same key is treated as a new request. Without the header, no deduplication is performed. Backends that create asynchronously return as soon as the request is accepted: the instance starts in provisioning and transitions to running once ready. The detail endpoint is queryable during this period (see GET /sandboxes/{id}). The sandbox_access_token stays valid for the entire lifetime of the sandbox.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"GMI Cloud Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.gmicloud.ai/agentbox-api/sandbox/create-a-sandbox\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://gmicloud.mintlify.app/_mintlify/api/og/v2?division=Sandbox\u0026amp;title=Create+a+sandbox\u0026amp;description=Creates+a+sandbox+from+a+%60template_id%60.%0A%0ACompute+resources+%28CPU+%2F+memory+%2F+disk+%2F+architecture%29+are+inherited+from+the+snapshot+of+the+selected+Template+Build.+\u0026amp;theme=9f5734c91eff055e34aea819\u0026amp;signature=5a5d024d43836d11460905b466697e6c9142843527099f4ae32abf5507b6839c\">\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 sandbox - GMI Cloud Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Creates a sandbox from a template_id. Compute resources (CPU / memory / disk / architecture) are inherited from the snapshot of the selected Template Build. They are fixed when the Template is built and cannot be overridden at creation time. Idempotency: pass an explicit Idempotency-Key request header as the idempotency key (unrelated to the tracing header X-Request-ID, which is always generated server-side; a client-supplied value is ignored). Resubmitting the same key with identical parameters returns the sandbox created by the first request (with its current access data) plus an Idempotency-Replayed: true response header. The same key with different parameters returns 400 Sandbox.IdempotentParameterMismatch. If the creation under that key has deterministically failed, or the sandbox it created has been deleted, the request returns 409 Sandbox.IdempotentKeyConsumed (retryable failures are automatically re-attempted when the same key is retried). The deduplication window is 24 hours; after it expires the same key is treated as a new request. Without the header, no deduplication is performed. Backends that create asynchronously return as soon as the request is accepted: the instance starts in provisioning and transitions to running once ready. The detail endpoint is queryable during this period (see GET /sandboxes/{id}). The sandbox_access_token stays valid for the entire lifetime of the sandbox.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://gmicloud.mintlify.app/_mintlify/api/og/v2?division=Sandbox\u0026amp;title=Create+a+sandbox\u0026amp;description=Creates+a+sandbox+from+a+%60template_id%60.%0A%0ACompute+resources+%28CPU+%2F+memory+%2F+disk+%2F+architecture%29+are+inherited+from+the+snapshot+of+the+selected+Template+Build.+\u0026amp;theme=9f5734c91eff055e34aea819\u0026amp;signature=5a5d024d43836d11460905b466697e6c9142843527099f4ae32abf5507b6839c\">\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/gmicloud/3Gg7T0A9Kt6Sj64N/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"GMI Cloud Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6e7a0e\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.gmicloud.ai/agentbox-api/sandbox/create-a-sandbox\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/agentbox-api/sandbox/create-a-sandbox.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.gmicloud.ai/#organization\",\"name\":\"GMI Cloud Documentation\",\"url\":\"https://docs.gmicloud.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/gmicloud/NMovxHyNviV7LUYd/logo/gmi-cloud-logo.svg?fit=max\u0026auto=format\u0026n=NMovxHyNviV7LUYd\u0026q=85\u0026s=17a2b497b7719739248dfca2ae9d6c4a\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.gmicloud.ai#website\",\"name\":\"GMI Cloud Documentation\",\"url\":\"https://docs.gmicloud.ai\",\"publisher\":{\"@id\":\"https://docs.gmicloud.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.gmicloud.ai/agentbox-api/sandbox/create-a-sandbox#webpage\",\"url\":\"https://docs.gmicloud.ai/agentbox-api/sandbox/create-a-sandbox\",\"name\":\"Create a sandbox\",\"description\":\"Creates a sandbox from a template_id. Compute resources (CPU / memory / disk / architecture) are inherited from the snapshot of the selected Template Build. They are fixed when the Template is built and cannot be overridden at creation time. Idempotency: pass an explicit Idempotency-Key request header as the idempotency key (unrelated to the tracing header X-Request-ID, which is always generated server-side; a client-supplied value is ignored). Resubmitting the same key with identical parameters returns the sandbox created by the first request (with its current access data) plus an Idempotency-Replayed: true response header. The same key with different parameters returns 400 Sandbox.IdempotentParameterMismatch. If the creation under that key has deterministically failed, or the sandbox it created has been deleted, the request returns 409 Sandbox.IdempotentKeyConsumed (retryable failures are automatically re-attempted when the same key is retried). The deduplication window is 24 hours; after it expires the same key is treated as a new request. Without the header, no deduplication is performed. Backends that create asynchronously return as soon as the request is accepted: the instance starts in provisioning and transitions to running once ready. The detail endpoint is queryable during this period (see GET /sandboxes/{id}). The sandbox_access_token stays valid for the entire lifetime of the sandbox.\",\"dateModified\":\"2026-10-29T19:06:36.806Z\",\"isPartOf\":{\"@id\":\"https://docs.gmicloud.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.gmicloud.ai/agentbox-api/sandbox/create-a-sandbox#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.gmicloud.ai/agentbox-api/sandbox/create-a-sandbox#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Sandbox APIs\",\"item\":\"https://docs.gmicloud.ai/agentbox-api/sandbox/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Endpoints\",\"item\":\"https://docs.gmicloud.ai/agentbox-api/sandbox/list-active-sandboxes\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Sandbox\",\"item\":\"https://docs.gmicloud.ai/agentbox-api/sandbox/list-active-sandboxes\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Create a sandbox\",\"item\":\"https://docs.gmicloud.ai/agentbox-api/sandbox/create-a-sandbox\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.gmicloud.ai/agentbox-api/sandbox/create-a-sandbox#apireference\",\"headline\":\"Create a sandbox\",\"name\":\"Create a sandbox\",\"description\":\"Creates a sandbox from a template_id. Compute resources (CPU / memory / disk / architecture) are inherited from the snapshot of the selected Template Build. They are fixed when the Template is built and cannot be overridden at creation time. Idempotency: pass an explicit Idempotency-Key request header as the idempotency key (unrelated to the tracing header X-Request-ID, which is always generated server-side; a client-supplied value is ignored). Resubmitting the same key with identical parameters returns the sandbox created by the first request (with its current access data) plus an Idempotency-Replayed: true response header. The same key with different parameters returns 400 Sandbox.IdempotentParameterMismatch. If the creation under that key has deterministically failed, or the sandbox it created has been deleted, the request returns 409 Sandbox.IdempotentKeyConsumed (retryable failures are automatically re-attempted when the same key is retried). The deduplication window is 24 hours; after it expires the same key is treated as a new request. Without the header, no deduplication is performed. Backends that create asynchronously return as soon as the request is accepted: the instance starts in provisioning and transitions to running once ready. The detail endpoint is queryable during this period (see GET /sandboxes/{id}). The sandbox_access_token stays valid for the entire lifetime of the sandbox.\",\"url\":\"https://docs.gmicloud.ai/agentbox-api/sandbox/create-a-sandbox\",\"mainEntityOfPage\":{\"@id\":\"https://docs.gmicloud.ai/agentbox-api/sandbox/create-a-sandbox#webpage\"},\"dateModified\":\"2026-10-29T19:06:36.806Z\",\"publisher\":{\"@id\":\"https://docs.gmicloud.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.gmicloud.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"GMI Cloud Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"GMI Cloud Documentation","nav":{"global":null,"tabs":[{"tab":"Get Started","pages":[{"title":"Get Started","href":""}]},{"tab":"Inference","pages":[{"title":"Inference","href":"/inference-engine/ie-intro"}]},{"tab":"GPU Compute","pages":[{"title":"GPU Compute","href":"/cluster-engine"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]},{"tab":"GMI Studio","pages":[{"title":"GMI Studio","href":"/gmi-studio/gmi-studio-user-manual/introduction"}]},{"tab":"GMI Agentbox","groups":[{"group":"GMI Agentbox","pages":[{"title":"Overview","href":"/agentbox-marketplace/overview"},{"title":"Search and use an agent","href":"/agentbox-marketplace/search-and-use"},{"title":"Register an agent","href":"/agentbox-marketplace/register-an-agent"},{"title":"Managing your deployment","href":"/agentbox-marketplace/managing-your-deployment"},{"title":"List an agent","href":"/agentbox-marketplace/list-an-agent"},{"title":"Agents I use","href":"/agentbox-marketplace/agents-i-use"},{"title":"Verified agents","href":"/agentbox-marketplace/verified-agents"},{"title":"Handle long-running requests","href":"/agentbox-marketplace/handle-long-running-requests"}]},{"group":"Agentbox SDK","pages":[{"title":"Agentbox SDK","href":"/agentbox-sdk/overview"},{"title":"Quickstart","href":"/agentbox-sdk/quickstart"},{"title":"Agents and image builds","href":"/agentbox-sdk/agents"},{"title":"Sandboxes","href":"/agentbox-sdk/sandboxes"},{"title":"Commands and files","href":"/agentbox-sdk/commands-and-files"},{"title":"Interactive shell","href":"/agentbox-sdk/shell"},{"title":"Snapshots","href":"/agentbox-sdk/snapshots"},{"title":"Errors and limits","href":"/agentbox-sdk/errors-and-limits"},{"title":"Python SDK reference","href":"/agentbox-sdk/python-reference"},{"title":"Go SDK reference","href":"/agentbox-sdk/go-reference"}]},{"group":"Sandbox SDK","pages":[{"title":"GMI Sandbox SDK Usage","href":"/agentbox-api/sandbox-sdk/usage"},{"title":"GMI Sandbox SDK Reference","href":"/agentbox-api/sandbox-sdk/sdk-reference"}]},{"group":"Sandbox APIs","pages":[{"title":"Sandbox API Overview","href":"/agentbox-api/sandbox/overview"},{"group":"Endpoints","pages":[{"group":"Sandbox","pages":[{"title":"List active sandboxes","description":"Returns sandboxes that are still actionable or still worth watching: `provisioning`, `running`, `updating`, `checkpointing`, plus the terminal failure state `failed`. Instances in transitional states do not disappear from the list while an operation is in flight. Results are ordered by `started_at` descending; pagination is applied after filtering.\n\nThe `state` filter takes external states; the server maps them back to internal ones. `running` also matches instances in short-lived lease states (`updating` / `checkpointing`), because those mean \"running but briefly busy\" rather than a separately actionable state.\n","deprecated":null,"version":null,"openapi":"/api-spec/sandbox_api.yaml get /sandboxes","href":"/agentbox-api/sandbox/list-active-sandboxes"},{"title":"Create a sandbox","deprecated":null,"version":null,"openapi":"/api-spec/sandbox_api.yaml post /sandboxes","href":"/agentbox-api/sandbox/create-a-sandbox"},{"title":"Get sandbox details","description":"Returns sandbox details. Instances in the terminal failure state (`failed`) remain readable, with the failure reason in `failure`; deleted or expired instances return 404.\n","deprecated":null,"version":null,"openapi":"/api-spec/sandbox_api.yaml get /sandboxes/{id}","href":"/agentbox-api/sandbox/get-sandbox-details"},{"title":"Delete (kill) a sandbox","deprecated":null,"version":null,"openapi":"/api-spec/sandbox_api.yaml delete /sandboxes/{id}","href":"/agentbox-api/sandbox/delete-kill-a-sandbox"},{"title":"Update sandbox metadata","deprecated":null,"version":null,"openapi":"/api-spec/sandbox_api.yaml patch /sandboxes/{id}","href":"/agentbox-api/sandbox/update-sandbox-metadata"},{"title":"Connect to a sandbox","deprecated":null,"version":null,"openapi":"/api-spec/sandbox_api.yaml post /sandboxes/{id}/connect","href":"/agentbox-api/sandbox/connect-to-a-sandbox"},{"title":"Set sandbox timeout","deprecated":null,"version":null,"openapi":"/api-spec/sandbox_api.yaml post /sandboxes/{id}/timeout","href":"/agentbox-api/sandbox/set-sandbox-timeout"}]},{"group":"Sandbox-Exec","pages":[{"title":"Execute a command in a sandbox","deprecated":null,"version":null,"openapi":"/api-spec/sandbox_api.yaml post /executions","href":"/agentbox-api/sandbox-exec/execute-a-command-in-a-sandbox"},{"title":"Get a sandbox execution","deprecated":null,"version":null,"openapi":"/api-spec/sandbox_api.yaml get /executions/{execution_id}","href":"/agentbox-api/sandbox-exec/get-a-sandbox-execution"},{"title":"Cancel a sandbox execution","deprecated":null,"version":null,"openapi":"/api-spec/sandbox_api.yaml post /executions/{execution_id}/cancel","href":"/agentbox-api/sandbox-exec/cancel-a-sandbox-execution"}]},{"group":"Sandbox-Files","pages":[{"title":"Download a sandbox file","deprecated":null,"version":null,"openapi":"/api-spec/sandbox_api.yaml get /files","href":"/agentbox-api/sandbox-files/download-a-sandbox-file"},{"title":"Upload a sandbox file","deprecated":null,"version":null,"openapi":"/api-spec/sandbox_api.yaml post /files","href":"/agentbox-api/sandbox-files/upload-a-sandbox-file"}]},{"group":"SandboxTemplate","pages":[{"title":"List the product catalog (unified, tenant-facing)","deprecated":null,"version":null,"openapi":"/api-spec/sandbox_api.yaml get /products","href":"/agentbox-api/sandboxtemplate/list-the-product-catalog-unified-tenant-facing"},{"title":"List Templates","deprecated":null,"version":null,"openapi":"/api-spec/sandbox_api.yaml get /templates","href":"/agentbox-api/sandboxtemplate/list-templates"},{"title":"Create a Template and start its initial Build","deprecated":null,"version":null,"openapi":"/api-spec/sandbox_api.yaml post /templates","href":"/agentbox-api/sandboxtemplate/create-a-template-and-start-its-initial-build"},{"title":"Get a Template","deprecated":null,"version":null,"openapi":"/api-spec/sandbox_api.yaml get /templates/{id}","href":"/agentbox-api/sandboxtemplate/get-a-template"},{"title":"Delete a Template","deprecated":null,"version":null,"openapi":"/api-spec/sandbox_api.yaml delete /templates/{id}","href":"/agentbox-api/sandboxtemplate/delete-a-template"},{"title":"Update mutable Template metadata","deprecated":null,"version":null,"openapi":"/api-spec/sandbox_api.yaml patch /templates/{id}","href":"/agentbox-api/sandboxtemplate/update-mutable-template-metadata"},{"title":"List Template Builds","deprecated":null,"version":null,"openapi":"/api-spec/sandbox_api.yaml get /templates/{template_id}/builds","href":"/agentbox-api/sandboxtemplate/list-template-builds"},{"title":"Get a Template Build","deprecated":null,"version":null,"openapi":"/api-spec/sandbox_api.yaml get /templates/{template_id}/builds/{id}","href":"/agentbox-api/sandboxtemplate/get-a-template-build"},{"title":"Get live Template Build logs","deprecated":null,"version":null,"openapi":"/api-spec/sandbox_api.yaml get /templates/{template_id}/builds/{id}/logs","href":"/agentbox-api/sandboxtemplate/get-live-template-build-logs"}]}]}]}]},{"tab":"MCP","pages":[{"title":"MCP","href":"/mcp/gmi-mcp-server"}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/guides-overview"}]}]},"title":"Create a sandbox - GMI Cloud Documentation","buildId":"dpl_EnxDqhjaNc9a8MVa833TGULPd9uJ","deploymentId":"dpl_EnxDqhjaNc9a8MVa833TGULPd9uJ","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-26-lDe7V.js","utils-CWQmgYtH.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-4-Aw3rSD.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-C2zjXYA5.js","snippetPresets-DFmpFA7C.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-FJpQavWq.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-D_GvPF7k.js","shallow-Bs2ZB0NO.js","getApiPlaygroundDisplay-DCcqJJk-.js","CodeSnippet-DzDxawVe.js","CodeSnippets-aUr7fU-7.js","Page-CT9uE8Ip.js","getPastedJson-Y1fKsj_I.js","icon-DI4zTsDr.js","MethodPill-C0nDlmSQ.js","DuplicateIcon-NUXbx2nQ.js","createIcon-BdTHrPAi.js","DynamicMarkdown-CtpgKJwj.js","SectionHeading-B3x35tOt.js","axios-vUo_bRtp.js","Markdown-3OmurJMP.js","clsx-DMKzROTp.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-1ms6tsT-.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-Ke9xIMFx.js"]}