{
"success": false,
"error": "invalid_args",
"msg": "error 403/3586: Offer 1234567 is not your own. Hosts can only rent their own machines.",
"ask_id": 1234567
}
{
"success": false,
"error": "invalid_args",
"msg": "error 404/3603: no_such_ask Instance type by id 1234567 is not available.",
"ask_id": 1234567
}
{
"success": false,
"error": "no_such_ask",
"msg": "error 410/3907: no_such_ask Instance type 1234567 is no longer available.",
"ask_id": 1234567
}
{
"detail": "API requests too frequent endpoint threshold=4.5"
}
Instances
create instance
Creates a new instance by accepting an “ask” contract from a provider.
Use the search offers endpoint to discover available machines.
If template_id is provided, those template defaults are either merged or overridden by parameters specified in the request body.
Template Precedence Rules:
Scalar fields (image, disk, runtype, etc.): Request value overrides template value
env: Merged by key. Request values win on key conflicts
extra_filters: Merged by key. Request values win on key conflicts
{
"success": false,
"error": "invalid_args",
"msg": "error 403/3586: Offer 1234567 is not your own. Hosts can only rent their own machines.",
"ask_id": 1234567
}
{
"success": false,
"error": "invalid_args",
"msg": "error 404/3603: no_such_ask Instance type by id 1234567 is not available.",
"ask_id": 1234567
}
{
"success": false,
"error": "no_such_ask",
"msg": "error 410/3907: no_such_ask Instance type 1234567 is no longer available.",
"ask_id": 1234567
}
{
"detail": "API requests too frequent endpoint threshold=4.5"
}
Content-based hash ID of a template to use as base configuration. Template values are merged with or overridden by request parameters (see precedence rules in endpoint description). When using a template, the image field is optional as the template provides it.
Environment variables and port mappings in Docker flag format. When using a template, request env is merged with template env - existing keys are retained, new keys are appended, conflicting keys use the request value.
Whether to cancel if instance cannot start immediately. Defaults to false for interruptibles. Defaults to true for on-demand with target_state='running'
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Vast.ai Documentation: Affordable GPU Cloud Marketplace","colors":{"primary":"#315FFF","light":"#315FFF","dark":"#315FFF"},"logo":{"light":"https://mintcdn.com/vastai-80aa3a82/lDYZh_6OFg5OOaSN/logo/light.svg?fit=max\u0026auto=format\u0026n=lDYZh_6OFg5OOaSN\u0026q=85\u0026s=7f79454b79a0cfc463ec063cd29faea0","dark":"https://mintcdn.com/vastai-80aa3a82/lDYZh_6OFg5OOaSN/logo/dark.svg?fit=max\u0026auto=format\u0026n=lDYZh_6OFg5OOaSN\u0026q=85\u0026s=a0ab9c5200d0f126bb744a83bc1b1ee2"},"favicon":"https://mintcdn.com/vastai-80aa3a82/1e4lY_zkN1CU9p24/favicon.svg?fit=max\u0026auto=format\u0026n=1e4lY_zkN1CU9p24\u0026q=85\u0026s=0d6a4623043c830bd4703fe39c7c8dc3","navbar":{"links":[{"href":"/guides/reference/faq","label":"FAQ"},{"href":"https://discord.gg/vast","label":"Discord"}],"primary":{"type":"button","label":"Console","href":"https://cloud.vast.ai/"}},"footer":{"socials":{"x":"https://x.com/vast_ai","github":"https://github.com/vast-ai","youtube":"https://www.youtube.com/@vast_ai/videos"}},"seo":{"metatags":{"indexing":"all","author":"Vast.ai Team","robots":"index, follow","googlebot":"index, follow","google":"notranslate","google-site-verification":"WHKqvZxf1snX5HX4y0luN_AnAvAPGoSjUcMv03b_NsI","generator":"Mintlify","theme-color":"#000000","color-scheme":"light dark","format-detection":"telephone=no","referrer":"origin","rating":"general","revisit-after":"7 days","language":"en","copyright":"Copyright 2025","reply-to":"contact@vast.ai","distribution":"global","coverage":"Worldwide","category":"Developer Documentation","target":"all","HandheldFriendly":"True","MobileOptimized":"320","apple-mobile-web-app-capable":"yes","apple-mobile-web-app-status-bar-style":"black","og:locale":"en_US","twitter:card":"summary_large_image","twitter:site":"@vast_ai","twitter:creator":"@vast_ai"}},"integrations":{"ga4":{"measurementId":"G-DG15WC8WXG"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"vastai-80aa3a82","hasAudioNarration":false,"actualSubdomain":"vastai-80aa3a82","customDomains":["docs.vast.ai"],"gitSource":{"type":"github","owner":"vast-ai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6adfbe11db56f9a377f1e85d","collectionId":"19df4429-5845-44de-b641-dfaf4afb19cb","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adfbe11db56f9a377f1e85d"},"feedback":{"edits":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6adfc284cade0989ea623e30","clientVersion":"0.0.3990","searchFilterCounts":[{"language":"default","tag":"CLI \u0026 SDK","count":258},{"language":"default","tag":"CLI","count":148},{"language":"default","tag":"SDK","count":143},{"language":"default","tag":"API","count":108},{"language":"default","tag":"Guides","count":101},{"language":"default","tag":"Endpoints","count":100},{"language":"default","tag":"Instances","count":94},{"language":"default","tag":"Host","count":87},{"language":"default","tag":"Serverless","count":80},{"language":"default","tag":"Accounts","count":58}]},"assistantConfig":{"enableStarterQuestions":false},"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":"editor-v7-file-tree","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":"pause-universal-search-reconcile","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":"editor-nav-generations","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":"editor-agent-model-picker","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}],"isAtlas":false,"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"@media (min-width:1024px){div:has(>nav#sidebar){max-width:none!important}#navbar>div{max-width:none!important}#content-area>#content,#content-area>#header{max-width:900px;margin-left:auto;margin-right:auto}}.table-column-dividers td+td,.table-column-dividers th+th{border-left:1px solid color-mix(in srgb,currentColor 20%,transparent)}"}],"page":{"pagePath":"api-reference/instances/create-instance","slug":"/api-reference/instances/create-instance","pageMetadata":{"title":"create instance","description":"Creates a new instance by accepting an \"ask\" contract from a provider.\n\n- Use the search offers endpoint to discover available machines.\n- If `template_id` is provided, those template defaults are either merged or overridden by parameters specified in the request body.\n\n**Template Precedence Rules:**\n- **Scalar fields** (image, disk, runtype, etc.): Request value overrides template value\n- **`env`**: Merged by key. Request values win on key conflicts\n- **`extra_filters`**: Merged by key. Request values win on key conflicts\n\nFor detailed template usage, see [Creating and Using Templates with API](/api-reference/creating-and-using-templates-with-api).\n\nCLI Usage: `vastai create instance \u003coffer_id> \u003cimage> [options]`","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v0/asks/{id}","href":"/api-reference/instances/create-instance","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 a: \"a\",\n code: \"code\",\n li: \"li\",\n p: \"p\",\n strong: \"strong\",\n ul: \"ul\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Creates a new instance by accepting an “ask” contract from a provider.\"\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsx(_components.li, {\n children: \"Use the search offers endpoint to discover available machines.\"\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"If \", _jsx(_components.code, {\n children: \"template_id\"\n }), \" is provided, those template defaults are either merged or overridden by parameters specified in the request body.\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"Template Precedence Rules:\"\n })\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: \"Scalar fields\"\n }), \" (image, disk, runtype, etc.): Request value overrides template value\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: _jsx(_components.code, {\n children: \"env\"\n })\n }), \": Merged by key. Request values win on key conflicts\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.strong, {\n children: _jsx(_components.code, {\n children: \"extra_filters\"\n })\n }), \": Merged by key. Request values win on key conflicts\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"For detailed template usage, see \", _jsx(_components.a, {\n href: \"/api-reference/creating-and-using-templates-with-api\",\n children: \"Creating and Using Templates with API\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"CLI Usage: \", _jsx(_components.code, {\n children: \"vastai create instance \u003coffer_id> \u003cimage> [options]\"\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 instance","description":"Creates a new instance by accepting an \"ask\" contract from a provider.\n\n- Use the search offers endpoint to discover available machines.\n- If `template_id` is provided, those template defaults are either merged or overridden by parameters specified in the request body.\n\n**Template Precedence Rules:**\n- **Scalar fields** (image, disk, runtype, etc.): Request value overrides template value\n- **`env`**: Merged by key. Request values win on key conflicts\n- **`extra_filters`**: Merged by key. Request values win on key conflicts\n\nFor detailed template usage, see [Creating and Using Templates with API](/api-reference/creating-and-using-templates-with-api).\n\nCLI Usage: `vastai create instance \u003coffer_id> \u003cimage> [options]`","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v0/asks/{id}","href":"/api-reference/instances/create-instance","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/vastai-80aa3a82/54e4ee435ab02cb8/structured-data.js"],"openApiReferenceData":{"operation":{"summary":"create instance","description":"Creates a new instance by accepting an \"ask\" contract from a provider.\n\n- Use the search offers endpoint to discover available machines.\n- If `template_id` is provided, those template defaults are either merged or overridden by parameters specified in the request body.\n\n**Template Precedence Rules:**\n- **Scalar fields** (image, disk, runtype, etc.): Request value overrides template value\n- **`env`**: Merged by key. Request values win on key conflicts\n- **`extra_filters`**: Merged by key. Request values win on key conflicts\n\nFor detailed template usage, see [Creating and Using Templates with API](/api-reference/creating-and-using-templates-with-api).\n\nCLI Usage: `vastai create instance \u003coffer_id> \u003cimage> [options]`","security":["60f69ea7-6115-4764-81b2-8f6e0be66b42"],"tags":["Instances"],"parameters":["0c066d09-425f-464a-a6bd-adb8f239be71"],"requestBody":"45b8f955-bed6-4d82-bbfb-3054e5f4f25d","responses":{"200":"2f51189f-d326-40c8-bb6e-15baf10ca6e4","400":"587e8815-ef25-40b8-957d-f2364b4950c2","401":"aebd8af4-13d6-4c42-bbd9-2906bf128447","403":"b96108ff-356a-4de0-983d-d6362e569d49","404":"07044bb4-4afa-4596-881a-c2c28ce8fce3","410":"f7149abc-48d4-4dd4-bfc1-3d672b069699","429":"69cefc63-7f80-4b5f-a488-86a61230cb12"},"operationId":"createInstance","method":"put","type":"path","servers":["c7cdb9c9-02bd-454f-9a80-79254001583e"],"path":"/api/v0/asks/{id}","baseUrlOptions":["https://console.vast.ai"],"title":"create instance","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"0c066d09-425f-464a-a6bd-adb8f239be71":{"name":"id","in":"path","required":true,"schema":{"type":"integer","isRequired":true,"description":"ID of the offer to accept (ask_id)","uniqueKey":"","typeLabel":"integer"},"description":"ID of the offer to accept (ask_id)"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["image"],"properties":{"image":{"type":"string","default":"vastai/base-image:@vastai-automatic-tag","description":"Docker image to use for the instance.\n","isRequired":true,"uniqueKey":"image","typeLabel":"string"},"template_hash_id":{"type":"string","description":"Content-based hash ID of a template to use as base configuration. Template values are merged with or overridden by request parameters (see precedence rules in endpoint description). When using a template, the `image` field is optional as the template provides it.\n\nExample: `4e17788f74f075dd9aab7d0d4427968f`\n","uniqueKey":"template_hash_id","typeLabel":"string"},"label":{"type":"string","description":"Custom name for the instance","uniqueKey":"label","typeLabel":"string"},"disk":{"type":"number","format":"float","description":"Size of local disk partition (in GB)\n","uniqueKey":"disk","typeLabel":"number\u003cfloat>"},"runtype":{"type":"string","description":"Launch mode for the instance. If omitted, defaults to 'ssh' unless `args/args_str` is provided.\n","enum":["ssh","jupyter","args","ssh_proxy","ssh_direct","jupyter_proxy","jupyter_direct"],"uniqueKey":"runtype","typeLabel":"enum\u003cstring>"},"target_state":{"type":"string","description":"Desired initial state of the instance\n","enum":["running","stopped"],"uniqueKey":"target_state","typeLabel":"enum\u003cstring>"},"price":{"type":"number","description":"Bid price per machine (in $/hour). Only for interruptible instances","minimum":0.001,"maximum":128,"uniqueKey":"price","typeLabel":"number"},"env":{"type":"string","description":"Environment variables and port mappings in Docker flag format. When using a template, request `env` is merged with template `env` - existing keys are retained, new keys are appended, conflicting keys use the request value.\n\nExample: `\"-e HF_TOKEN=hf_xxx123456789 -e MODEL_ID=TheBloke/Llama-2-7B-Chat-GPTQ -p 8000:8000\"`\n","uniqueKey":"env","typeLabel":"string"},"cancel_unavail":{"type":"boolean","description":"Whether to cancel if instance cannot start immediately. Defaults to false for interruptibles. Defaults to true for on-demand with target_state='running'","uniqueKey":"cancel_unavail","typeLabel":"boolean"},"vm":{"type":"boolean","description":"Whether this is a VM instance","uniqueKey":"vm","typeLabel":"boolean"},"onstart":{"type":"string","description":"Commands to run when instance starts\n\nExample : `env | grep _ >> /etc/environment; echo 'starting up'` \n","uniqueKey":"onstart","typeLabel":"string"},"args":{"type":"array","items":{"type":"string","uniqueKey":"args.items.[INDEX]","typeLabel":"string"},"description":"Arguments array to passed to the image entrypoint\n\nExample : `[\"bash\", \"-c\", \"env | grep _ >> /etc/environment; echo 'starting up'\"]`\n","uniqueKey":"args","typeLabel":"string[]"},"args_str":{"type":"string","description":"Arguments string to pass to the entrypoint (alternative to args)\n\nExample : `args_str: bash -c \"env | grep _ >> /etc/environment; echo 'starting up'\"`\n","uniqueKey":"args_str","typeLabel":"string"},"use_jupyter_lab":{"type":"boolean","description":"Launch instance with jupyter lab instead of notebook","uniqueKey":"use_jupyter_lab","typeLabel":"boolean"},"jupyter_dir":{"type":"string","description":"Directory to launch Jupyter from\n\nExample : `/home/notebooks`\n","uniqueKey":"jupyter_dir","typeLabel":"string"},"python_utf8":{"type":"boolean","description":"Set python's locale to C.UTF-8","uniqueKey":"python_utf8","typeLabel":"boolean"},"lang_utf8":{"type":"boolean","description":"Set locale to C.UTF-8","uniqueKey":"lang_utf8","typeLabel":"boolean"},"force":{"type":"boolean","description":"Skip sanity checks when creating from an existing instance","uniqueKey":"force","typeLabel":"boolean"},"user":{"type":"string","description":"User to use with docker create (breaks some images, use with caution)","uniqueKey":"user","typeLabel":"string"},"image_login":{"type":"string","description":"Docker registry credentials if needed","uniqueKey":"image_login","typeLabel":"string"},"volume_info":{"type":"object","description":"Volume creation/linking information","properties":{"create_new":{"type":"boolean","description":"Set to `true` to create a new volume, `false` to link an existing volume","uniqueKey":"volume_info.create_new","typeLabel":"boolean"},"volume_id":{"type":"integer","description":"If `create_new` is false: existing volume ID (from `show volumes`). If `create_new` is true: volume offer ID (from `search volumes`)\n","uniqueKey":"volume_info.volume_id","typeLabel":"integer"},"size":{"type":"integer","description":"Size of the volume in GB. Only used when `create_new` is true","uniqueKey":"volume_info.size","typeLabel":"integer"},"mount_path":{"type":"string","description":"Mount path for the volume inside the container (e.g., `/workspace`)","uniqueKey":"volume_info.mount_path","typeLabel":"string"}},"uniqueKey":"volume_info","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"image":"vastai/base-image:@vastai-automatic-tag"},"examples":{"Example":{"title":"Example","value":{"image":"vastai/base-image:@vastai-automatic-tag"}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"2f51189f-d326-40c8-bb6e-15baf10ca6e4":{"description":"Instance created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"If the instance was created successfully","example":true,"uniqueKey":"success","typeLabel":"boolean"},"new_contract":{"type":"integer","description":"ID of the newly created instance contract","example":1234568,"uniqueKey":"new_contract","typeLabel":"integer"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":true,"new_contract":1234568}}},"exampleType":"generated"}},"exampleType":"generated"},"587e8815-ef25-40b8-957d-f2364b4950c2":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false,"uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"string","enum":["invalid_args","invalid_price","no_ssh_key_for_vm"],"uniqueKey":"error","typeLabel":"enum\u003cstring>"},"msg":{"type":"string","example":"error 400/3467: Invalid args: 'id' is required and must be a valid offer ID","uniqueKey":"msg","typeLabel":"string"},"ask_id":{"type":"integer","example":1234567,"uniqueKey":"ask_id","typeLabel":"integer"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"error":"invalid_args","msg":"error 400/3467: Invalid args: 'id' is required and must be a valid offer ID","ask_id":1234567}}},"exampleType":"generated"}},"exampleType":"generated"},"aebd8af4-13d6-4c42-bbd9-2906bf128447":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false,"uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"string","uniqueKey":"error","typeLabel":"string"},"msg":{"type":"string","uniqueKey":"msg","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"error":"\u003cstring>","msg":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"b96108ff-356a-4de0-983d-d6362e569d49":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false,"uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"string","example":"invalid_args","uniqueKey":"error","typeLabel":"string"},"msg":{"type":"string","example":"error 403/3586: Offer 1234567 is not your own. Hosts can only rent their own machines.","uniqueKey":"msg","typeLabel":"string"},"ask_id":{"type":"integer","example":1234567,"uniqueKey":"ask_id","typeLabel":"integer"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"error":"invalid_args","msg":"error 403/3586: Offer 1234567 is not your own. Hosts can only rent their own machines.","ask_id":1234567}}},"exampleType":"generated"}},"exampleType":"generated"},"07044bb4-4afa-4596-881a-c2c28ce8fce3":{"description":"Offer not found or not available","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false,"uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"string","example":"invalid_args","uniqueKey":"error","typeLabel":"string"},"msg":{"type":"string","example":"error 404/3603: no_such_ask Instance type by id 1234567 is not available.","uniqueKey":"msg","typeLabel":"string"},"ask_id":{"type":"integer","example":1234567,"uniqueKey":"ask_id","typeLabel":"integer"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"error":"invalid_args","msg":"error 404/3603: no_such_ask Instance type by id 1234567 is not available.","ask_id":1234567}}},"exampleType":"generated"}},"exampleType":"generated"},"f7149abc-48d4-4dd4-bfc1-3d672b069699":{"description":"Offer no longer available (when cancel_unavail is true and instance cannot start)","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false,"uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"string","example":"no_such_ask","uniqueKey":"error","typeLabel":"string"},"msg":{"type":"string","example":"error 410/3907: no_such_ask Instance type 1234567 is no longer available.","uniqueKey":"msg","typeLabel":"string"},"ask_id":{"type":"integer","example":1234567,"uniqueKey":"ask_id","typeLabel":"integer"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"error":"no_such_ask","msg":"error 410/3907: no_such_ask Instance type 1234567 is no longer available.","ask_id":1234567}}},"exampleType":"generated"}},"exampleType":"generated"},"69cefc63-7f80-4b5f-a488-86a61230cb12":{"description":"Too Many Requests","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string","example":"API requests too frequent endpoint threshold=4.5","uniqueKey":"detail","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"detail":"API requests too frequent endpoint threshold=4.5"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"60f69ea7-6115-4764-81b2-8f6e0be66b42":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key must be provided in the Authorization header","scopes":[],"schemeName":"BearerAuth"}}},"servers":{"c7cdb9c9-02bd-454f-9a80-79254001583e":{"url":"https://console.vast.ai","description":"Production server"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"API key must be provided in the Authorization header","scopes":[],"schemeName":"BearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"API key must be provided in the Authorization header","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"BearerAuth","name":"Authorization"}],"title":"BearerAuth"}]},"originalFileLocation":"api-reference/openapi.yaml"},"subdomain":"vastai-80aa3a82","siteName":"Vast.ai Documentation: Affordable GPU Cloud Marketplace","title":"create instance - Vast.ai Documentation: Affordable GPU Cloud Marketplace","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-21T00:56:44.980Z","originalFileLocation":"api-reference/instances/create-instance.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 new instance by accepting an \u0026quot;ask\u0026quot; contract from a provider. - Use the search offers endpoint to discover available machines. - If template_id is provided, those template defaults are either merged or overridden by parameters specified in the request body. Template Precedence Rules: - Scalar fields (image, disk, runtype, etc.): Request value overrides template value - env: Merged by key. Request values win on key conflicts - extra_filters: Merged by key. Request values win on key conflicts For detailed template usage, see Creating and Using Templates with API. CLI Usage: vastai create instance [options]\">\u003cmeta data-mint-head name=\"application-name\" content=\"Vast.ai Documentation: Affordable GPU Cloud Marketplace\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"robots\" content=\"index, follow\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/vastai-80aa3a82/Xpia3h5CJX2PzgYG/_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/vastai-80aa3a82/Xpia3h5CJX2PzgYG/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/vastai-80aa3a82/Xpia3h5CJX2PzgYG/_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/vastai-80aa3a82/Xpia3h5CJX2PzgYG/_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/vastai-80aa3a82/Xpia3h5CJX2PzgYG/_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/vastai-80aa3a82/Xpia3h5CJX2PzgYG/_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/vastai-80aa3a82/Xpia3h5CJX2PzgYG/_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/vastai-80aa3a82/Xpia3h5CJX2PzgYG/_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/vastai-80aa3a82/Xpia3h5CJX2PzgYG/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"create instance - Vast.ai Documentation: Affordable GPU Cloud Marketplace\">\u003cmeta data-mint-head property=\"og:description\" content=\"Creates a new instance by accepting an \u0026quot;ask\u0026quot; contract from a provider. - Use the search offers endpoint to discover available machines. - If template_id is provided, those template defaults are either merged or overridden by parameters specified in the request body. Template Precedence Rules: - Scalar fields (image, disk, runtype, etc.): Request value overrides template value - env: Merged by key. Request values win on key conflicts - extra_filters: Merged by key. Request values win on key conflicts For detailed template usage, see Creating and Using Templates with API. CLI Usage: vastai create instance [options]\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Vast.ai Documentation: Affordable GPU Cloud Marketplace\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.vast.ai/api-reference/instances/create-instance\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://vastai-80aa3a82.mintlify.app/_mintlify/api/og/v2?division=Instances\u0026amp;title=create+instance\u0026amp;description=Creates+a+new+instance+by+accepting+an+%22ask%22+contract+from+a+provider.%0A%0A-+Use+the+search+offers+endpoint+to+discover+available+machines.%0A-+If+%60template_id%60+is+p\u0026amp;theme=bf5e39208aeafab2e44b0496\u0026amp;signature=11edab2a7ad0d325157aa77fbcdd87a86814bbd394dad28c01e0e402c1d08dad\">\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 instance - Vast.ai Documentation: Affordable GPU Cloud Marketplace\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Creates a new instance by accepting an \u0026quot;ask\u0026quot; contract from a provider. - Use the search offers endpoint to discover available machines. - If template_id is provided, those template defaults are either merged or overridden by parameters specified in the request body. Template Precedence Rules: - Scalar fields (image, disk, runtype, etc.): Request value overrides template value - env: Merged by key. Request values win on key conflicts - extra_filters: Merged by key. Request values win on key conflicts For detailed template usage, see Creating and Using Templates with API. CLI Usage: vastai create instance [options]\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://vastai-80aa3a82.mintlify.app/_mintlify/api/og/v2?division=Instances\u0026amp;title=create+instance\u0026amp;description=Creates+a+new+instance+by+accepting+an+%22ask%22+contract+from+a+provider.%0A%0A-+Use+the+search+offers+endpoint+to+discover+available+machines.%0A-+If+%60template_id%60+is+p\u0026amp;theme=bf5e39208aeafab2e44b0496\u0026amp;signature=11edab2a7ad0d325157aa77fbcdd87a86814bbd394dad28c01e0e402c1d08dad\">\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/vastai-80aa3a82/Xpia3h5CJX2PzgYG/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Vast.ai Documentation: Affordable GPU Cloud Marketplace\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#315FFF\">\u003cmeta data-mint-head name=\"og:locale\" content=\"en_US\">\u003cmeta data-mint-head name=\"indexing\" content=\"all\">\u003cmeta data-mint-head name=\"author\" content=\"Vast.ai Team\">\u003cmeta data-mint-head name=\"googlebot\" content=\"index, follow\">\u003cmeta data-mint-head name=\"google\" content=\"notranslate\">\u003cmeta data-mint-head name=\"google-site-verification\" content=\"WHKqvZxf1snX5HX4y0luN_AnAvAPGoSjUcMv03b_NsI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"theme-color\" content=\"#000000\">\u003cmeta data-mint-head name=\"color-scheme\" content=\"light dark\">\u003cmeta data-mint-head name=\"format-detection\" content=\"telephone=no\">\u003cmeta data-mint-head name=\"referrer\" content=\"origin\">\u003cmeta data-mint-head name=\"rating\" content=\"general\">\u003cmeta data-mint-head name=\"revisit-after\" content=\"7 days\">\u003cmeta data-mint-head name=\"language\" content=\"en\">\u003cmeta data-mint-head name=\"copyright\" content=\"Copyright 2025\">\u003cmeta data-mint-head name=\"reply-to\" content=\"contact@vast.ai\">\u003cmeta data-mint-head name=\"distribution\" content=\"global\">\u003cmeta data-mint-head name=\"coverage\" content=\"Worldwide\">\u003cmeta data-mint-head name=\"category\" content=\"Developer Documentation\">\u003cmeta data-mint-head name=\"target\" content=\"all\">\u003cmeta data-mint-head name=\"HandheldFriendly\" content=\"True\">\u003cmeta data-mint-head name=\"MobileOptimized\" content=\"320\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-capable\" content=\"yes\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-status-bar-style\" content=\"black\">\u003cmeta data-mint-head name=\"twitter:creator\" content=\"@vast_ai\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.vast.ai/api-reference/instances/create-instance\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/instances/create-instance.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.vast.ai/#organization\",\"name\":\"Vast.ai Documentation: Affordable GPU Cloud Marketplace\",\"url\":\"https://docs.vast.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/vastai-80aa3a82/lDYZh_6OFg5OOaSN/logo/light.svg?fit=max\u0026auto=format\u0026n=lDYZh_6OFg5OOaSN\u0026q=85\u0026s=7f79454b79a0cfc463ec063cd29faea0\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.vast.ai#website\",\"name\":\"Vast.ai Documentation: Affordable GPU Cloud Marketplace\",\"url\":\"https://docs.vast.ai\",\"publisher\":{\"@id\":\"https://docs.vast.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.vast.ai/api-reference/instances/create-instance#webpage\",\"url\":\"https://docs.vast.ai/api-reference/instances/create-instance\",\"name\":\"create instance\",\"description\":\"Creates a new instance by accepting an \\\"ask\\\" contract from a provider. - Use the search offers endpoint to discover available machines. - If template_id is provided, those template defaults are either merged or overridden by parameters specified in the request body. Template Precedence Rules: - Scalar fields (image, disk, runtype, etc.): Request value overrides template value - env: Merged by key. Request values win on key conflicts - extra_filters: Merged by key. Request values win on key conflicts For detailed template usage, see Creating and Using Templates with API. CLI Usage: vastai create instance [options]\",\"dateModified\":\"2026-10-21T00:56:44.980Z\",\"isPartOf\":{\"@id\":\"https://docs.vast.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.vast.ai/api-reference/instances/create-instance#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.vast.ai/api-reference/instances/create-instance#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Endpoints\",\"item\":\"https://docs.vast.ai/api-reference/instances/show-ssh-keys\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Instances\",\"item\":\"https://docs.vast.ai/api-reference/instances/show-ssh-keys\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"create instance\",\"item\":\"https://docs.vast.ai/api-reference/instances/create-instance\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.vast.ai/api-reference/instances/create-instance#apireference\",\"headline\":\"create instance\",\"name\":\"create instance\",\"description\":\"Creates a new instance by accepting an \\\"ask\\\" contract from a provider. - Use the search offers endpoint to discover available machines. - If template_id is provided, those template defaults are either merged or overridden by parameters specified in the request body. Template Precedence Rules: - Scalar fields (image, disk, runtype, etc.): Request value overrides template value - env: Merged by key. Request values win on key conflicts - extra_filters: Merged by key. Request values win on key conflicts For detailed template usage, see Creating and Using Templates with API. CLI Usage: vastai create instance [options]\",\"url\":\"https://docs.vast.ai/api-reference/instances/create-instance\",\"mainEntityOfPage\":{\"@id\":\"https://docs.vast.ai/api-reference/instances/create-instance#webpage\"},\"dateModified\":\"2026-10-21T00:56:44.980Z\",\"publisher\":{\"@id\":\"https://docs.vast.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.vast.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Vast.ai Documentation: Affordable GPU Cloud Marketplace\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Vast.ai Documentation: Affordable GPU Cloud Marketplace","nav":{"global":null,"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":"/guides/get-started"}]},{"tab":"CLI \u0026 SDK","pages":[{"title":"CLI \u0026 SDK","href":"/cli/hello-world"}]},{"tab":"API","groups":[{"group":"Overview","icon":"book","pages":[{"title":"API Hello World","sidebarTitle":"API","href":"/api-reference/hello-world"},{"title":"API Reference","sidebarTitle":"Introduction","href":"/api-reference/introduction"},{"title":"Authentication","sidebarTitle":"Authentication","href":"/api-reference/authentication"},{"title":"Permissions","sidebarTitle":"Permissions","href":"/api-reference/permissions"},{"title":"Two-Factor Authentication Endpoints","href":"/api-reference/two-factor-authentication-endpoints"},{"title":"Rate Limits and Errors","href":"/api-reference/rate-limits-and-errors"}]},{"group":"Common workflows","icon":"list-check","pages":[{"title":"Creating Instances with the API","sidebarTitle":"Instances","href":"/api-reference/creating-instances-with-api"},{"title":"Creating and Using Templates with API","sidebarTitle":"Templates","href":"/api-reference/creating-and-using-templates-with-api"}]},{"group":"Endpoints","icon":"webhook","pages":[{"group":"Instances","pages":[{"title":"show ssh-keys","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v0/instances/{id}/ssh","href":"/api-reference/instances/show-ssh-keys"},{"title":"attach ssh-key","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v0/instances/{id}/ssh","href":"/api-reference/instances/attach-ssh-key"},{"title":"copy","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v0/commands/copy_direct","href":"/api-reference/instances/copy"},{"title":"cancel copy","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /api/v0/commands/copy_direct","href":"/api-reference/instances/cancel-copy"},{"title":"cloud copy","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v0/commands/rclone","href":"/api-reference/instances/cloud-copy"},{"title":"cancel sync","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /api/v0/commands/rclone","href":"/api-reference/instances/cancel-sync"},{"title":"change bid","description":"Change the current bid price of an instance to a specified price.\n\nCLI Usage: `vastai change bid \u003cid> --price \u003cprice>`","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v0/instances/bid_price/{id}","href":"/api-reference/instances/change-bid"},{"title":"create instance","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v0/asks/{id}","href":"/api-reference/instances/create-instance"},{"title":"show instance","description":"Retrieves the details of a specific instance for the authenticated user.\n\nCLI Usage: `vastai show instance [--api-key \u003capi_key>] [--raw]`","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v0/instances/{id}","href":"/api-reference/instances/show-instance"},{"title":"manage instance","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v0/instances/{id}","href":"/api-reference/instances/manage-instance"},{"title":"destroy instance","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /api/v0/instances/{id}","href":"/api-reference/instances/destroy-instance"},{"title":"detach ssh-key","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /api/v0/instances/{id}/ssh/{ssh_key_id}","href":"/api-reference/instances/detach-ssh-key"},{"title":"execute","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v0/instances/command/{id}","href":"/api-reference/instances/execute"},{"title":"show logs","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v0/instances/request_logs/{id}","href":"/api-reference/instances/show-logs"},{"title":"prepay instance","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v0/instances/prepay/{id}","href":"/api-reference/instances/prepay-instance"},{"title":"reboot instance","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v0/instances/reboot/{id}","href":"/api-reference/instances/reboot-instance"},{"title":"recycle instance","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v0/instances/recycle/{id}","href":"/api-reference/instances/recycle-instance"},{"title":"show instances","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v1/instances","href":"/api-reference/instances/show-instances"}]},{"group":"Machines","pages":[{"title":"cancel maint","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v0/machines/{machine_id}/cancel_maint","href":"/api-reference/machines/cancel-maint"},{"title":"cleanup machine","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v0/machines/{machine_id}/cleanup","href":"/api-reference/machines/cleanup-machine"},{"title":"list machine","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v0/machines/create_asks","href":"/api-reference/machines/list-machine"},{"title":"show gpu metrics","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v0/metrics/gpu/current","href":"/api-reference/machines/show-gpu-metrics"},{"title":"show gpu locations","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v0/metrics/gpu/locations","href":"/api-reference/machines/show-gpu-locations"},{"title":"show gpu trends","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v0/metrics/gpu/history","href":"/api-reference/machines/show-gpu-trends"},{"title":"remove defjob","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /api/v0/machines/{machine_id}/defjob","href":"/api-reference/machines/remove-defjob"},{"title":"show reports","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v0/machines/{machine_id}/reports","href":"/api-reference/machines/show-reports"},{"title":"schedule maint","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v0/machines/{machine_id}/dnotify","href":"/api-reference/machines/schedule-maint"},{"title":"set defjob","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v0/machines/create_bids","href":"/api-reference/machines/set-defjob"},{"title":"set min-bid","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v0/machines/{machine_id}/minbid","href":"/api-reference/machines/set-min-bid"},{"title":"show machines","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v0/machines","href":"/api-reference/machines/show-machines"},{"title":"unlist machine","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /api/v0/machines/{machine_id}/asks","href":"/api-reference/machines/unlist-machine"}]},{"group":"Accounts","pages":[{"title":"show api keys","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v0/auth/apikeys","href":"/api-reference/accounts/show-api-keys"},{"title":"create api-key","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v0/auth/apikeys","href":"/api-reference/accounts/create-api-key"},{"title":"show env vars","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v0/secrets","href":"/api-reference/accounts/show-env-vars"},{"title":"update env var","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v0/secrets","href":"/api-reference/accounts/update-env-var"},{"title":"create env-var","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v0/secrets","href":"/api-reference/accounts/create-env-var"},{"title":"delete env var","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /api/v0/secrets","href":"/api-reference/accounts/delete-env-var"},{"title":"show ssh keys","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v0/ssh","href":"/api-reference/accounts/show-ssh-keys"},{"title":"create ssh-key","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v0/ssh","href":"/api-reference/accounts/create-ssh-key"},{"title":"set user","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v0/users","href":"/api-reference/accounts/set-user"},{"title":"create subaccount","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v0/users","href":"/api-reference/accounts/create-subaccount"},{"title":"delete api key","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /api/v0/auth/apikeys/{id}","href":"/api-reference/accounts/delete-api-key"},{"title":"update ssh key","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v0/ssh/{id}","href":"/api-reference/accounts/update-ssh-key"},{"title":"delete ssh key","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /api/v0/ssh/{id}","href":"/api-reference/accounts/delete-ssh-key"},{"title":"show connections","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v0/users/cloud_integrations","href":"/api-reference/accounts/show-connections"},{"title":"show ipaddrs","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v0/users/{user_id}/ipaddrs","href":"/api-reference/accounts/show-ipaddrs"},{"title":"show subaccounts","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v0/subaccounts","href":"/api-reference/accounts/show-subaccounts"},{"title":"show user","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v0/users/current","href":"/api-reference/accounts/show-user"},{"title":"transfer credit","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v0/commands/transfer_credit","href":"/api-reference/accounts/transfer-credit"}]},{"group":"Serverless","pages":[{"title":"show workergroup","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v0/workergroups","href":"/api-reference/serverless/show-workergroup"},{"title":"create workergroup","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v0/workergroups","href":"/api-reference/serverless/create-workergroup"},{"title":"show endpoints","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v0/endptjobs","href":"/api-reference/serverless/show-endpoints"},{"title":"create endpoint","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v0/endptjobs","href":"/api-reference/serverless/create-endpoint"},{"title":"update workergroup","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v0/workergroups/{id}","href":"/api-reference/serverless/update-workergroup"},{"title":"delete workergroup","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /api/v0/workergroups/{id}","href":"/api-reference/serverless/delete-workergroup"},{"title":"update endpoint","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v0/endptjobs/{id}","href":"/api-reference/serverless/update-endpoint"},{"title":"delete endpoint","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /api/v0/endptjobs/{id}","href":"/api-reference/serverless/delete-endpoint"},{"title":"get workergroup logs","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /get_workergroup_logs","href":"/api-reference/serverless/get-workergroup-logs"},{"title":"get workergroup workers","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /get_workergroup_workers","href":"/api-reference/serverless/get-workergroup-workers"},{"title":"get endpoint logs","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /get_endpoint_logs","href":"/api-reference/serverless/get-endpoint-logs"},{"title":"get endpoint workers","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /get_endpoint_workers","href":"/api-reference/serverless/get-endpoint-workers"},{"title":"route","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /route","href":"/api-reference/serverless/route"},{"title":"show deployment","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v0/deployment/{id}","href":"/api-reference/serverless/show-deployment"},{"title":"show deployments","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v0/deployments","href":"/api-reference/serverless/show-deployments"},{"title":"start deployment","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v0/deployment/{id}/start","href":"/api-reference/serverless/start-deployment"},{"title":"stop deployment","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v0/deployment/{id}/stop","href":"/api-reference/serverless/stop-deployment"}]},{"group":"Team","pages":[{"title":"create team","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v0/team","href":"/api-reference/team/create-team"},{"title":"destroy team","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /api/v0/team","href":"/api-reference/team/destroy-team"},{"title":"create team role","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v0/team/roles","href":"/api-reference/team/create-team-role"},{"title":"invite team member","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v0/team/invite","href":"/api-reference/team/invite-team-member"},{"title":"remove team member","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /api/v0/team/members/{id}","href":"/api-reference/team/remove-team-member"},{"title":"show team role","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v0/team/roles/{name}","href":"/api-reference/team/show-team-role"},{"title":"update team role","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v0/team/roles/{name}","href":"/api-reference/team/update-team-role"},{"title":"remove team role","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /api/v0/team/roles/{name}","href":"/api-reference/team/remove-team-role"},{"title":"show team members","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v0/team/members","href":"/api-reference/team/show-team-members"},{"title":"show team roles","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v0/team/roles-full","href":"/api-reference/team/show-team-roles"}]},{"group":"Search","pages":[{"title":"search templates","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v0/template","href":"/api-reference/search/search-templates"},{"title":"search benchmarks","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v0/benchmarks","href":"/api-reference/search/search-benchmarks"},{"title":"search offers","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v0/bundles","href":"/api-reference/search/search-offers"}]},{"group":"Templates","pages":[{"title":"create template","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v0/template","href":"/api-reference/templates/create-template"},{"title":"delete template","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /api/v0/template","href":"/api-reference/templates/delete-template"},{"title":"edit template","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v1/template","href":"/api-reference/templates/edit-template"}]},{"group":"Volumes","pages":[{"title":"list volumes","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v0/volumes","href":"/api-reference/volumes/list-volumes"},{"title":"rent volume","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v0/volumes","href":"/api-reference/volumes/rent-volume"},{"title":"delete volume","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /api/v0/volumes","href":"/api-reference/volumes/delete-volume"},{"title":"search volumes","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v0/volumes/search","href":"/api-reference/volumes/search-volumes"},{"title":"unlist volume","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v0/volumes/unlist","href":"/api-reference/volumes/unlist-volume"}]},{"group":"Notifications","pages":[{"title":"list notification types","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v0/notification-types","href":"/api-reference/notifications/list-notification-types"},{"title":"get notification preferences","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v0/users/{user_id}/notification-prefs","href":"/api-reference/notifications/get-notification-preferences"},{"title":"update notification preferences","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v0/users/{user_id}/notification-prefs","href":"/api-reference/notifications/update-notification-preferences"},{"title":"list notification webhooks","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v0/webhooks","href":"/api-reference/notifications/list-notification-webhooks"},{"title":"create notification webhook","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v0/webhooks","href":"/api-reference/notifications/create-notification-webhook"},{"title":"update notification webhook","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml put /api/v0/webhooks/{id}","href":"/api-reference/notifications/update-notification-webhook"},{"title":"delete notification webhook","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /api/v0/webhooks/{id}","href":"/api-reference/notifications/delete-notification-webhook"},{"title":"rotate notification webhook secret","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v0/webhooks/{id}/rotate-secret","href":"/api-reference/notifications/rotate-notification-webhook-secret"},{"title":"test notification webhook","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /api/v0/webhooks/{id}/test","href":"/api-reference/notifications/test-notification-webhook"}]},{"group":"Billing","pages":[{"title":"show charges","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v0/charges","href":"/api-reference/billing/show-charges"},{"title":"show deposit","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v0/instances/balance/{id}","href":"/api-reference/billing/show-deposit"},{"title":"show earnings","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v0/users/{user_id}/machine-earnings","href":"/api-reference/billing/show-earnings"},{"title":"show invoices","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /api/v1/invoices","href":"/api-reference/billing/show-invoices"}]}]}]},{"tab":"Host","pages":[{"title":"Host","href":"/host/hosting-overview"}]},{"tab":"Examples","pages":[{"title":"Examples","href":"/pytorch"}]}]},"title":"create instance - Vast.ai Documentation: Affordable GPU Cloud Marketplace","buildId":"dpl_2oYXwqkEXirXBPk8wV1FtM5USFWi","deploymentId":"dpl_2oYXwqkEXirXBPk8wV1FtM5USFWi","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-WRhTSUDL.js","utils-ChMov4Kr.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-_REmC2bI.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Bp6nVRCu.js","snippetPresets-DZadmXoU.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CY2WdoTl.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-DwYG-Q4l.js","shallow-BXQIGwv4.js","getApiPlaygroundDisplay-CK5nK5B9.js","CodeSnippet-TH4a2aGW.js","CodeSnippets-DwsQiOFS.js","Page-R3M_BF4L.js","getPastedJson-DD7kUzi_.js","icon-holE3QoJ.js","MethodPill-DUW0T8us.js","DuplicateIcon-CI_p4be-.js","createIcon-BdbRvavb.js","DynamicMarkdown-DN96a4Ur.js","SectionHeading-SCu36A9d.js","axios-vUo_bRtp.js","Markdown-CCeGv-zI.js","clsx-BGBGWFTt.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-Cv_O2fky.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-2C5OB2eV.js"]}