{"openapi":"3.0.0","info":{"description":"Shadeform GPU marketplace API — deploy and manage instances across GPU clouds; X-API-KEY header; OpenAPI 3 spec.","version":"v1"},"servers":[{"description":"Shadeform GPU marketplace API — deploy and manage instances across GPU clouds; X-API-KEY header; OpenAPI 3 spec.","url":"https://api.apirails.com/shadeform"}],"paths":{"/instances":{"get":{"tags":["Instances"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.shadeform.ai/api-reference/instances/instances.md","api_endpoint":"https://api.shadeform.ai/v1/instances"},"summary":"List instances","description":"Get all non deleted instances. Note: instances in the \"deleting\" status will also show up here.","security":[{"bearerAuth":[]}]}},"/instances/types":{"get":{"tags":["Instances"],"parameters":[{"name":"available","in":"query","description":"Filter the instance type results by availability.","required":false,"schema":{"type":"boolean","example":"","items":{"type":"string","enum":[true,false]}}},{"name":"cloud","in":"query","description":"Filter the instance type results by cloud.","required":false,"schema":{"type":"string","example":""}},{"name":"gpu_type","in":"query","description":"Filter the instance type results by gpu type.","required":false,"schema":{"type":"string","example":""}},{"name":"num_gpus","in":"query","description":"Filter the instance type results by the number of gpus.","required":false,"schema":{"type":"string","example":""}},{"name":"region","in":"query","description":"Filter the instance type results by region.","required":false,"schema":{"type":"string","example":""}},{"name":"shade_instance_type","in":"query","description":"Filter the instance type results by the shade instance type.","required":false,"schema":{"type":"string","example":""}},{"name":"sort","in":"query","description":"Sort the order of the instance type results.","required":false,"schema":{"type":"string","example":"","items":{"type":"string","enum":["price"]}}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.shadeform.ai/api-reference/instances/instances-types.md","api_endpoint":"https://api.shadeform.ai/v1/instances/types"},"summary":"List instance types","description":"Return all the GPU instance types with their corresponding availability and specs.","security":[{"bearerAuth":[]}]}},"/instances/create":{"post":{"tags":["Instances"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.shadeform.ai/api-reference/instances/instances-create.md","api_endpoint":"https://api.shadeform.ai/v1/instances/create"},"summary":"Create instance","description":"Create a new GPU instance. Our create API is designed to be asynchronous, so the response will be a CreateResponse object with a status of \"creating\". We then have a process that will pick it up and create it. You can poll the /instances/{id}/info endpoint to check the status of the instance.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"alert":{"type":"object","description":"Set a date or spend threshold to receive an email alert","properties":{"date_threshold":{"type":"string","description":"RFC3339 date string"},"spend_threshold":{"type":"string","description":"Valid decimal representation of a dollar amount"}}},"auto_delete":{"type":"object","description":"Set a date or spend threshold to automatically delete the instance","properties":{"date_threshold":{"type":"string","description":"RFC3339 date string"},"spend_threshold":{"type":"string","description":"Valid decimal representation of a dollar amount"}}},"cloud":{"type":"string","description":"Specifies the underlying cloud provider. See this [explanation](/getting-started/concepts#cloud-cloud-provider) for more details.","required":true},"envs":{"type":"array","description":"List of environment variable name and values to automatically add to the instance","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the environment variable","required":true},"value":{"type":"string","description":"Value of the environment variable","required":true}}}},"launch_configuration":{"type":"object","description":"Defines automatic actions after the instance becomes active.","properties":{"type":{"type":"string","description":"Specifies the type of launch configuration. See [Launch Configuration](/getting-started/concepts#launch-configuration) for more details.","required":true},"docker_configuration":{"type":"object","description":"May only be used if launch_configuration.type is 'docker'. Use docker_configuration to automatically pull and run a docker image. See this [tutorial](/guides/dockercontainers) for examples."},"script_configuration":{"type":"object","description":"May only be used if launch_configuration.type is 'script'. Configures a startup script to be run automatically after the instance is active. See this [tutorial]/guides/startupscript) for examples."}}},"name":{"type":"string","description":"The name of the instance","required":true},"os":{"type":"string","description":"The operating system of the instance."},"region":{"type":"string","description":"Specifies the region.","required":true},"shade_cloud":{"type":"boolean","description":"Specifies if the instance is launched in [Shade Cloud](/getting-started/concepts#shade-cloud) or in a linked cloud account.","required":true,"enum":[true,false]},"shade_instance_type":{"type":"string","description":"The Shadeform standardized instance type. See this [explanation](/getting-started/concepts#shade-instance-type-and-cloud-instance-type) for more details.","required":true},"ssh_key_id":{"type":"string","description":"The ID of the SSH Key."},"tags":{"type":"array","description":"Add custom, searchable tags to instances.","items":{"type":"string"}},"template_id":{"type":"string","description":"The ID of the template to use for this instance"},"volume_ids":{"type":"array","description":"List of volume IDs to be mounted. Currently only supports 1 volume at a time.","items":{"type":"string"}},"volume_mount":{"type":"object","description":"Settings for mounting volumes onto file systems","properties":{"auto":{"type":"boolean","description":"Set to true to automatically mount unmounted disks to a default filesystem.","enum":[true,false]}}}}},"example":{"alert":[{"date_threshold":"2006-01-02T15:04:05-07:00","spend_threshold":"3.14"}],"auto_delete":[{"date_threshold":"2006-01-02T15:04:05-07:00","spend_threshold":"3.14"}],"cloud":["hyperstack"],"envs":[[{"name":"HUGGING_FACE_HUB_TOKEN","value":"hugging_face_api_token"}]],"launch_configuration":[{"type":"docker","docker_configuration":{"args":"--model mistralai/Mistral-7B-v0.1","envs":[{"name":"HUGGING_FACE_HUB_TOKEN","value":"hugging_face_api_token"}],"image":"vllm/vllm-openai:latest","port_mappings":[{"container_port":8000,"host_port":80}],"registry_credentials":{"password":"password","username":"username"},"shared_memory_in_gb":8,"volume_mounts":[{"container_path":"/root/.cache/huggingface","host_path":"~/.cache/huggingface"}]},"script_configuration":{"base64_script":"IyEvYmluL2Jhc2gKCiMgRW5kbGVzcyBsb29wCndoaWxlIHRydWUKZG8KICAgICMgRmV0Y2ggYSBjYXQgZmFjdCB3aXRoIGEgbWF4aW11bSBsZW5ndGggb2YgMTQwIGNoYXJhY3RlcnMKICAgIGN1cmwgLS1uby1wcm9ncmVzcy1tZXRlciBodHRwczovL2NhdGZhY3QubmluamEvZmFjdD9tYXhfbGVuZ3RoPTE0MAoKICAgICMgUHJpbnQgYSBuZXdsaW5lIGZvciByZWFkYWJpbGl0eQogICAgZWNobwoKICAgICMgU2xlZXAgZm9yIDMgc2Vjb25kcyBiZWZvcmUgdGhlIG5leHQgaXRlcmF0aW9uCiAgICBzbGVlcCAzCmRvbmUKCgo="}}],"name":["cool-gpu-server"],"os":["ubuntu22.04_cuda12.2_shade_os"],"region":["canada-1"],"shade_cloud":[true],"shade_instance_type":["A6000"],"ssh_key_id":["78a0dd5a-dbb1-4568-b55c-5e7e0a8b0c40"],"tags":[["tag1"]],"template_id":["template-123"],"volume_ids":[["78a0dd5a-dbb1-4568-b55c-5e7e0a8b0c40"]],"volume_mount":[{"auto":false}]}}}}}},"/instances/{id}/info":{"get":{"tags":["Instances"],"parameters":[{"name":"id","in":"path","description":"The instance id","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.shadeform.ai/api-reference/instances/instances-info.md","api_endpoint":"https://api.shadeform.ai/v1/instances/{id}/info"},"summary":"Get instance info","description":"Get details for the specified, non deleted, instance in the url.","security":[{"bearerAuth":[]}]}},"/instances/{id}/update":{"post":{"tags":["Instances"],"parameters":[{"name":"id","in":"path","description":"The instance id","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.shadeform.ai/api-reference/instances/instances-update.md","api_endpoint":"https://api.shadeform.ai/v1/instances/{id}/update"},"summary":"Update instance","description":"Update mutable details about the instance. Set a value to null to delete it. Omit a value or leave undefined to keep unchanged.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"alert":{"type":"object","description":"Set a date or spend threshold to receive an email alert","properties":{"date_threshold":{"type":"string","description":"RFC3339 date string"},"spend_threshold":{"type":"string","description":"Valid decimal representation of a dollar amount"}}},"auto_delete":{"type":"object","description":"Set a date or spend threshold to automatically delete the instance","properties":{"date_threshold":{"type":"string","description":"RFC3339 date string"},"spend_threshold":{"type":"string","description":"Valid decimal representation of a dollar amount"}}},"name":{"type":"string","description":"The name of the instance"},"tags":{"type":"array","description":"Add custom, searchable tags to instances.","items":{"type":"string"}}}},"example":{"alert":[{"date_threshold":"2006-01-02T15:04:05-07:00","spend_threshold":"3.14"}],"auto_delete":[{"date_threshold":"2006-01-02T15:04:05-07:00","spend_threshold":"3.14"}],"name":["cool-gpu-server"],"tags":[["tag1"]]}}}}}},"/instances/{id}/delete":{"post":{"tags":["Instances"],"parameters":[{"name":"id","in":"path","description":"The instance id","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.shadeform.ai/api-reference/instances/instances-delete.md","api_endpoint":"https://api.shadeform.ai/v1/instances/{id}/delete"},"summary":"Delete instance","description":"This will move the instance to the 'deleting' status while the instance is being deleted. Once the instance has entered the 'deleting' status, the account will no longer be billed for the instance.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/instances/{id}/restart":{"post":{"tags":["Instances"],"parameters":[{"name":"id","in":"path","description":"The instance id","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.shadeform.ai/api-reference/instances/instances-restart.md","api_endpoint":"https://api.shadeform.ai/v1/instances/{id}/restart"},"summary":"Restart instance","description":"Restart an instance. The status of the instance will stay as 'active' throughout, but you may have to wait a few minutes for the instance to be ready to use again.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/clusters":{"get":{"tags":["Clusters"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.shadeform.ai/api-reference/clusters/clusters.md","api_endpoint":"https://api.shadeform.ai/v1/clusters"},"summary":"List clusters","description":"Get all non deleted clusters.","security":[{"bearerAuth":[]}]}},"/clusters/types":{"get":{"tags":["Clusters"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.shadeform.ai/api-reference/clusters/clusters-types.md","api_endpoint":"https://api.shadeform.ai/v1/clusters/types"},"summary":"List cluster types","description":"Return all the GPU cluster types with their corresponding availability and specs.","security":[{"bearerAuth":[]}]}},"/clusters/create":{"post":{"tags":["Clusters"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.shadeform.ai/api-reference/clusters/clusters-create.md","api_endpoint":"https://api.shadeform.ai/v1/clusters/create"},"summary":"Create cluster","description":"Create a new GPU cluster.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"cloud":{"type":"string","description":"The cloud provider for the cluster.","required":true},"cluster_type":{"type":"string","description":"The type of GPU cluster to create.","required":true},"name":{"type":"string","description":"The name of the cluster.","required":true},"num_instances":{"type":"number","description":"The number of instances in the cluster.","required":true},"os":{"type":"string","description":"The operating system for the cluster."},"region":{"type":"string","description":"The region where the cluster will be deployed.","required":true},"ssh_key_id":{"type":"string","description":"The SSH key ID to use for the cluster instances."}}},"example":{"cloud":["denvr"],"cluster_type":["H100_sxm5x8"],"name":["protestant-aquamarine-cluster"],"num_instances":[2],"os":["ubuntu20.04"],"region":["houston-usa-1"],"ssh_key_id":["f0c6ac6d-7240-4968-8eb7-a11c4a0a5dc6"]}}}}}},"/clusters/{id}/info":{"get":{"tags":["Clusters"],"parameters":[{"name":"id","in":"path","description":"The cluster id","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.shadeform.ai/api-reference/clusters/clusters-info.md","api_endpoint":"https://api.shadeform.ai/v1/clusters/{id}/info"},"summary":"Get cluster info","description":"Get details for the specified, non deleted, cluster in the url.","security":[{"bearerAuth":[]}]}},"/clusters/{id}/delete":{"post":{"tags":["Clusters"],"parameters":[{"name":"id","in":"path","description":"The cluster id","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.shadeform.ai/api-reference/clusters/clusters-delete.md","api_endpoint":"https://api.shadeform.ai/v1/clusters/{id}/delete"},"summary":"Delete cluster","description":"This will move the cluster to the 'deleting' status while the cluster is being deleted. Once the cluster has entered the 'deleting' status, the account will no longer be billed for the cluster.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/sshkeys":{"get":{"tags":["SSH Keys"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.shadeform.ai/api-reference/sshkeys/sshkeys.md","api_endpoint":"https://api.shadeform.ai/v1/sshkeys"},"summary":"List SSH keys","description":"Get all SSH Keys for the account.","security":[{"bearerAuth":[]}]}},"/sshkeys/add":{"post":{"tags":["SSH Keys"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.shadeform.ai/api-reference/sshkeys/sshkeys-add.md","api_endpoint":"https://api.shadeform.ai/v1/sshkeys/add"},"summary":"Add SSH key","description":"Add a new SSH Key","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"name":{"type":"string","description":"The name of the SSH Key.","required":true},"public_key":{"type":"string","description":"The public key.","required":true}}},"example":{"name":["My ssh key"],"public_key":["ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAklOUpkDHrfHY17SbrmTIpNLTGK9Tjom/BWDSU GPl+nafzlHDTYW7hdI4yZ5ew18JH4JW9jbhUFrviQzM7xlELEVf4h9lFX5QVkbPppSwg0cda3 Pbv7kOdJ/MTyBlWXFCR+HAo3FXRitBqxiX1nKhXpHAZsMciLq8V6RjsNAQwdsdMFvSlVK/7XA t3FaoJoAsncM1Q9x5+3V0Ww68/eIFmb1zuUFljQJKprrX88XypNDvjYNby6vw/Pb0rwert/En mZ+AW4OZPnTPI89ZPmVMLuayrD2cE86Z/il8b+gw3r3+1nKatmIkjn2so1d01QraTlMqVSsbx NrRFi9wrf+M7Q== schacon@mylaptop.local"]}}}}}},"/sshkeys/{id}/delete":{"post":{"tags":["SSH Keys"],"parameters":[{"name":"id","in":"path","description":"The ssh key id","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.shadeform.ai/api-reference/sshkeys/sshkeys-delete.md","api_endpoint":"https://api.shadeform.ai/v1/sshkeys/{id}/delete"},"summary":"Delete SSH key","description":"Delete an ssh key. The Shadeform managed SSH Key, current default ssh key, and in use SSH Keys cannot be deleted.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/sshkeys/{id}/info":{"get":{"tags":["SSH Keys"],"parameters":[{"name":"id","in":"path","description":"The ssh key id","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.shadeform.ai/api-reference/sshkeys/sshkeys-info.md","api_endpoint":"https://api.shadeform.ai/v1/sshkeys/{id}/info"},"summary":"Get SSH key info","description":"Get details for the specified SSH Key in the url.","security":[{"bearerAuth":[]}]}},"/sshkeys/{id}/setdefault":{"post":{"tags":["SSH Keys"],"parameters":[{"name":"id","in":"path","description":"The ssh key id","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.shadeform.ai/api-reference/sshkeys/sshkeys-setdefault.md","api_endpoint":"https://api.shadeform.ai/v1/sshkeys/{id}/setdefault"},"summary":"Set default SSH key","description":"Set the specified SSH Key as the default SSH Key used by Shadeform.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/volumes":{"get":{"tags":["Volumes"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.shadeform.ai/api-reference/volumes/volumes.md","api_endpoint":"https://api.shadeform.ai/v1/volumes"},"summary":"List volumes","description":"Get all storage volumes for the account.","security":[{"bearerAuth":[]}]}},"/volumes/create":{"post":{"tags":["Volumes"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.shadeform.ai/api-reference/volumes/volumes-create.md","api_endpoint":"https://api.shadeform.ai/v1/volumes/create"},"summary":"Create volume","description":"Create a new storage volume","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"cloud":{"type":"string","description":"Specifies the underlying cloud provider. See this [explanation](/getting-started/concepts#cloud-cloud-provider) for more details.","required":true},"name":{"type":"string","description":"The name of the storage volume.","required":true},"region":{"type":"string","description":"Specifies the region.","required":true},"size_in_gb":{"type":"number","description":"Storage volume size in GB","required":true}}},"example":{"cloud":["hyperstack"],"name":["My storage volume"],"region":["canada-1"],"size_in_gb":[100]}}}}}},"/volumes/{id}/delete":{"post":{"tags":["Volumes"],"parameters":[{"name":"id","in":"path","description":"The volume id.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.shadeform.ai/api-reference/volumes/volumes-delete.md","api_endpoint":"https://api.shadeform.ai/v1/volumes/{id}/delete"},"summary":"Delete volume","description":"Delete a storage volume.","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}},"/volumes/{id}/info":{"get":{"tags":["Volumes"],"parameters":[{"name":"id","in":"path","description":"The volume id.","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.shadeform.ai/api-reference/volumes/volumes-info.md","api_endpoint":"https://api.shadeform.ai/v1/volumes/{id}/info"},"summary":"Get volume info","description":"Get details for the specified storage volume.","security":[{"bearerAuth":[]}]}},"/volumes/types":{"get":{"tags":["Volumes"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.shadeform.ai/api-reference/volumes/volumes-types.md","api_endpoint":"https://api.shadeform.ai/v1/volumes/types"},"summary":"List volume types","description":"Get list of supported storage volumes.","security":[{"bearerAuth":[]}]}},"/templates":{"get":{"tags":["Templates"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.shadeform.ai/api-reference/templates/templates.md","api_endpoint":"https://api.shadeform.ai/v1/templates"},"summary":"List templates","description":"List all templates created by the user","security":[{"bearerAuth":[]}]}},"/templates/featured":{"get":{"tags":["Templates"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.shadeform.ai/api-reference/templates/templates-featured.md","api_endpoint":"https://api.shadeform.ai/v1/templates/featured"},"summary":"List featured templates","description":"List featured templates","security":[{"bearerAuth":[]}]}},"/templates/{template_id}/info":{"get":{"tags":["Templates"],"parameters":[{"name":"template_id","in":"path","description":"The template ID","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.shadeform.ai/api-reference/templates/templates-info.md","api_endpoint":"https://api.shadeform.ai/v1/templates/{template_id}/info"},"summary":"Get template info","description":"Get information about a specific template","security":[{"bearerAuth":[]}]}},"/templates/save":{"post":{"tags":["Templates"],"parameters":[],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.shadeform.ai/api-reference/templates/templates-save.md","api_endpoint":"https://api.shadeform.ai/v1/templates/save"},"summary":"Save template","description":"Create a new template","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"alert":{"type":"object","description":"Set a date or spend threshold to receive an email alert","properties":{"date_threshold":{"type":"string","description":"RFC3339 date string"},"spend_threshold":{"type":"string","description":"Valid decimal representation of a dollar amount"}}},"auto_delete":{"type":"object","description":"Set a date or spend threshold to automatically delete the instance","properties":{"date_threshold":{"type":"string","description":"RFC3339 date string"},"spend_threshold":{"type":"string","description":"Valid decimal representation of a dollar amount"}}},"description":{"type":"string","description":"Description of the template"},"envs":{"type":"array","description":"Environment variables for the template","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the environment variable","required":true},"value":{"type":"string","description":"Value of the environment variable","required":true}}}},"launch_configuration":{"type":"object","description":"Defines automatic actions after the instance becomes active.","properties":{"type":{"type":"string","description":"Specifies the type of launch configuration. See [Launch Configuration](/getting-started/concepts#launch-configuration) for more details.","required":true},"docker_configuration":{"type":"object","description":"May only be used if launch_configuration.type is 'docker'. Use docker_configuration to automatically pull and run a docker image. See this [tutorial](/guides/dockercontainers) for examples."},"script_configuration":{"type":"object","description":"May only be used if launch_configuration.type is 'script'. Configures a startup script to be run automatically after the instance is active. See this [tutorial]/guides/startupscript) for examples."}}},"name":{"type":"string","description":"Name of the template","required":true},"networking":{"type":"object","description":"Network configuration including firewall rules","properties":{"ufw_rules":{"type":"array","description":"List of UFW (Uncomplicated Firewall) rules"}}},"public":{"type":"boolean","description":"Whether the template is publicly available","enum":[true,false]},"tags":{"type":"array","description":"Tags associated with the template","items":{"type":"string"}},"volume_mount":{"type":"object","description":"Settings for mounting volumes onto file systems","properties":{"auto":{"type":"boolean","description":"Set to true to automatically mount unmounted disks to a default filesystem.","enum":[true,false]}}}}},"example":{"alert":[{"date_threshold":"2006-01-02T15:04:05-07:00","spend_threshold":"3.14"}],"auto_delete":[{"date_threshold":"2006-01-02T15:04:05-07:00","spend_threshold":"3.14"}],"description":["A template for ML workloads"],"envs":[[{"name":"HUGGING_FACE_HUB_TOKEN","value":"hugging_face_api_token"}]],"launch_configuration":[{"type":"docker","docker_configuration":{"args":"--model mistralai/Mistral-7B-v0.1","envs":[{"name":"HUGGING_FACE_HUB_TOKEN","value":"hugging_face_api_token"}],"image":"vllm/vllm-openai:latest","port_mappings":[{"container_port":8000,"host_port":80}],"registry_credentials":{"password":"password","username":"username"},"shared_memory_in_gb":8,"volume_mounts":[{"container_path":"/root/.cache/huggingface","host_path":"~/.cache/huggingface"}]},"script_configuration":{"base64_script":"IyEvYmluL2Jhc2gKCiMgRW5kbGVzcyBsb29wCndoaWxlIHRydWUKZG8KICAgICMgRmV0Y2ggYSBjYXQgZmFjdCB3aXRoIGEgbWF4aW11bSBsZW5ndGggb2YgMTQwIGNoYXJhY3RlcnMKICAgIGN1cmwgLS1uby1wcm9ncmVzcy1tZXRlciBodHRwczovL2NhdGZhY3QubmluamEvZmFjdD9tYXhfbGVuZ3RoPTE0MAoKICAgICMgUHJpbnQgYSBuZXdsaW5lIGZvciByZWFkYWJpbGl0eQogICAgZWNobwoKICAgICMgU2xlZXAgZm9yIDMgc2Vjb25kcyBiZWZvcmUgdGhlIG5leHQgaXRlcmF0aW9uCiAgICBzbGVlcCAzCmRvbmUKCgo="}}],"name":["My Template"],"networking":[{"ufw_rules":[{"from_ip":"192.168.1.0/24","port":"80","proto":"tcp","rule":"allow","to_ip":"10.0.0.0/8"}]}],"public":[true],"tags":[["ml","pytorch"]],"volume_mount":[{"auto":false}]}}}}}},"/templates/{template_id}/update":{"post":{"tags":["Templates"],"parameters":[{"name":"template_id","in":"path","description":"The template ID","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.shadeform.ai/api-reference/templates/templates-update.md","api_endpoint":"https://api.shadeform.ai/v1/templates/{template_id}/update"},"summary":"Update template","description":"Update an existing template","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{"alert":{"type":"object","description":"Set a date or spend threshold to receive an email alert","properties":{"date_threshold":{"type":"string","description":"RFC3339 date string"},"spend_threshold":{"type":"string","description":"Valid decimal representation of a dollar amount"}}},"auto_delete":{"type":"object","description":"Set a date or spend threshold to automatically delete the instance","properties":{"date_threshold":{"type":"string","description":"RFC3339 date string"},"spend_threshold":{"type":"string","description":"Valid decimal representation of a dollar amount"}}},"description":{"type":"string","description":"Description of the template"},"envs":{"type":"array","description":"Environment variables for the template","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the environment variable","required":true},"value":{"type":"string","description":"Value of the environment variable","required":true}}}},"launch_configuration":{"type":"object","description":"Defines automatic actions after the instance becomes active.","properties":{"type":{"type":"string","description":"Specifies the type of launch configuration. See [Launch Configuration](/getting-started/concepts#launch-configuration) for more details.","required":true},"docker_configuration":{"type":"object","description":"May only be used if launch_configuration.type is 'docker'. Use docker_configuration to automatically pull and run a docker image. See this [tutorial](/guides/dockercontainers) for examples."},"script_configuration":{"type":"object","description":"May only be used if launch_configuration.type is 'script'. Configures a startup script to be run automatically after the instance is active. See this [tutorial]/guides/startupscript) for examples."}}},"name":{"type":"string","description":"Name of the template","required":true},"networking":{"type":"object","description":"Network configuration including firewall rules","properties":{"ufw_rules":{"type":"array","description":"List of UFW (Uncomplicated Firewall) rules"}}},"public":{"type":"boolean","description":"Whether the template is publicly available","enum":[true,false]},"tags":{"type":"array","description":"Tags associated with the template","items":{"type":"string"}},"volume_mount":{"type":"object","description":"Settings for mounting volumes onto file systems","properties":{"auto":{"type":"boolean","description":"Set to true to automatically mount unmounted disks to a default filesystem.","enum":[true,false]}}}}},"example":{"alert":[{"date_threshold":"2006-01-02T15:04:05-07:00","spend_threshold":"3.14"}],"auto_delete":[{"date_threshold":"2006-01-02T15:04:05-07:00","spend_threshold":"3.14"}],"description":["A template for ML workloads"],"envs":[[{"name":"HUGGING_FACE_HUB_TOKEN","value":"hugging_face_api_token"}]],"launch_configuration":[{"type":"docker","docker_configuration":{"args":"--model mistralai/Mistral-7B-v0.1","envs":[{"name":"HUGGING_FACE_HUB_TOKEN","value":"hugging_face_api_token"}],"image":"vllm/vllm-openai:latest","port_mappings":[{"container_port":8000,"host_port":80}],"registry_credentials":{"password":"password","username":"username"},"shared_memory_in_gb":8,"volume_mounts":[{"container_path":"/root/.cache/huggingface","host_path":"~/.cache/huggingface"}]},"script_configuration":{"base64_script":"IyEvYmluL2Jhc2gKCiMgRW5kbGVzcyBsb29wCndoaWxlIHRydWUKZG8KICAgICMgRmV0Y2ggYSBjYXQgZmFjdCB3aXRoIGEgbWF4aW11bSBsZW5ndGggb2YgMTQwIGNoYXJhY3RlcnMKICAgIGN1cmwgLS1uby1wcm9ncmVzcy1tZXRlciBodHRwczovL2NhdGZhY3QubmluamEvZmFjdD9tYXhfbGVuZ3RoPTE0MAoKICAgICMgUHJpbnQgYSBuZXdsaW5lIGZvciByZWFkYWJpbGl0eQogICAgZWNobwoKICAgICMgU2xlZXAgZm9yIDMgc2Vjb25kcyBiZWZvcmUgdGhlIG5leHQgaXRlcmF0aW9uCiAgICBzbGVlcCAzCmRvbmUKCgo="}}],"name":["My Template"],"networking":[{"ufw_rules":[{"from_ip":"192.168.1.0/24","port":"80","proto":"tcp","rule":"allow","to_ip":"10.0.0.0/8"}]}],"public":[true],"tags":[["ml","pytorch"]],"volume_mount":[{"auto":false}]}}}}}},"/templates/{template_id}/delete":{"post":{"tags":["Templates"],"parameters":[{"name":"template_id","in":"path","description":"The template ID","required":true,"schema":{"type":"string","example":""}}],"responses":{"401":{"description":"Bearer token required (Authorization header)","content":{"application/json":{}}}},"externalDocs":{"api_ref":"https://docs.shadeform.ai/api-reference/templates/templates-delete.md","api_endpoint":"https://api.shadeform.ai/v1/templates/{template_id}/delete"},"summary":"Delete template","description":"Delete a template","security":[{"bearerAuth":[]}],"requestBody":{"description":"","required":true,"content":{"application/json":{"schema":{"type":"object","required":[],"properties":{}},"example":{}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"security":[{"bearerAuth":[]}]}