curl --request GET \
--url https://api.shadeform.ai/v1/templates/featured \
--header 'X-API-KEY: <api-key>'{
"templates": [
{
"id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"name": "My AwesomeTemplate",
"description": "A template for running vLLM",
"author": "John Doe",
"logo": "https://example.com/logo.png",
"public": true,
"launch_configuration": {
"type": "docker",
"docker_configuration": {
"image": "vllm/vllm-openai:latest",
"args": "--model mistralai/Mistral-7B-v0.1",
"shared_memory_in_gb": 8,
"envs": [
{
"name": "HUGGING_FACE_HUB_TOKEN",
"value": "hugging_face_api_token"
}
],
"port_mappings": [
{
"host_port": 80,
"container_port": 8000
}
],
"volume_mounts": [
{
"host_path": "~/.cache/huggingface",
"container_path": "/root/.cache/huggingface"
}
],
"registry_credentials": {
"username": "username",
"password": "password"
}
},
"script_configuration": {
"base64_script": "IyEvYmluL2Jhc2gKCiMgRW5kbGVzcyBsb29wCndoaWxlIHRydWUKZG8KICAgICMgRmV0Y2ggYSBjYXQgZmFjdCB3aXRoIGEgbWF4aW11bSBsZW5ndGggb2YgMTQwIGNoYXJhY3RlcnMKICAgIGN1cmwgLS1uby1wcm9ncmVzcy1tZXRlciBodHRwczovL2NhdGZhY3QubmluamEvZmFjdD9tYXhfbGVuZ3RoPTE0MAoKICAgICMgUHJpbnQgYSBuZXdsaW5lIGZvciByZWFkYWJpbGl0eQogICAgZWNobwoKICAgICMgU2xlZXAgZm9yIDMgc2Vjb25kcyBiZWZvcmUgdGhlIG5leHQgaXRlcmF0aW9uCiAgICBzbGVlcCAzCmRvbmUKCgo="
}
},
"auto_delete": {
"date_threshold": "2006-01-02T15:04:05-07:00",
"spend_threshold": "3.14"
},
"alert": {
"date_threshold": "2006-01-02T15:04:05-07:00",
"spend_threshold": "3.14"
},
"volume_mount": {
"auto": true
},
"tags": [
"tag1"
],
"envs": [
{
"name": "HUGGING_FACE_HUB_TOKEN",
"value": "hugging_face_api_token"
}
],
"networking": {
"ufw_rules": [
{
"rule": "allow",
"from_ip": "192.168.1.0/24",
"to_ip": "10.0.0.0/8",
"port": "80",
"proto": "tcp"
}
]
}
}
]
}List featured templates
curl --request GET \
--url https://api.shadeform.ai/v1/templates/featured \
--header 'X-API-KEY: <api-key>'{
"templates": [
{
"id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"name": "My AwesomeTemplate",
"description": "A template for running vLLM",
"author": "John Doe",
"logo": "https://example.com/logo.png",
"public": true,
"launch_configuration": {
"type": "docker",
"docker_configuration": {
"image": "vllm/vllm-openai:latest",
"args": "--model mistralai/Mistral-7B-v0.1",
"shared_memory_in_gb": 8,
"envs": [
{
"name": "HUGGING_FACE_HUB_TOKEN",
"value": "hugging_face_api_token"
}
],
"port_mappings": [
{
"host_port": 80,
"container_port": 8000
}
],
"volume_mounts": [
{
"host_path": "~/.cache/huggingface",
"container_path": "/root/.cache/huggingface"
}
],
"registry_credentials": {
"username": "username",
"password": "password"
}
},
"script_configuration": {
"base64_script": "IyEvYmluL2Jhc2gKCiMgRW5kbGVzcyBsb29wCndoaWxlIHRydWUKZG8KICAgICMgRmV0Y2ggYSBjYXQgZmFjdCB3aXRoIGEgbWF4aW11bSBsZW5ndGggb2YgMTQwIGNoYXJhY3RlcnMKICAgIGN1cmwgLS1uby1wcm9ncmVzcy1tZXRlciBodHRwczovL2NhdGZhY3QubmluamEvZmFjdD9tYXhfbGVuZ3RoPTE0MAoKICAgICMgUHJpbnQgYSBuZXdsaW5lIGZvciByZWFkYWJpbGl0eQogICAgZWNobwoKICAgICMgU2xlZXAgZm9yIDMgc2Vjb25kcyBiZWZvcmUgdGhlIG5leHQgaXRlcmF0aW9uCiAgICBzbGVlcCAzCmRvbmUKCgo="
}
},
"auto_delete": {
"date_threshold": "2006-01-02T15:04:05-07:00",
"spend_threshold": "3.14"
},
"alert": {
"date_threshold": "2006-01-02T15:04:05-07:00",
"spend_threshold": "3.14"
},
"volume_mount": {
"auto": true
},
"tags": [
"tag1"
],
"envs": [
{
"name": "HUGGING_FACE_HUB_TOKEN",
"value": "hugging_face_api_token"
}
],
"networking": {
"ufw_rules": [
{
"rule": "allow",
"from_ip": "192.168.1.0/24",
"to_ip": "10.0.0.0/8",
"port": "80",
"proto": "tcp"
}
]
}
}
]
}Returns a list of featured templates
Show child attributes
Unique identifier for the template, generated by Shadeform
"d290f1ee-6c54-4b01-90e6-d701748f0851"
Name of the template
"My AwesomeTemplate"
Description of the template
"A template for running vLLM"
Author of the template
"John Doe"
URL to the template's logo
"https://example.com/logo.png"
Whether the template is publicly available
true
Defines automatic actions after the instance becomes active.
Show child attributes
Specifies the type of launch configuration. See Launch Configuration for more details.
docker, script "docker"
May only be used if launch_configuration.type is 'docker'. Use docker_configuration to automatically pull and run a docker image. See this tutorial for examples.
Show child attributes
Specifies the docker image to be pulled and run on the instance at startup.
"vllm/vllm-openai:latest"
Specifies the container arguments passed into the image at runtime.
"--model mistralai/Mistral-7B-v0.1"
Describes the amount of shared memory allocated for the container. Equivalent to using the --shm-size flag in the docker cli. If shared_memory_in_gb is not specified, then the container will use the host namespace which is the equivalent of --ipc=host.
8
List of environment variable name-value pairs that will be passed to the docker container.
Show child attributes
List of port mappings between the host instance and the docker container. Equivalent of -p flag for docker run command.
List of volume mounts between the host instance and the docker container. Equivalent of -v flag for docker run command.
Show child attributes
Show child attributes
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.
Show child attributes
A startup script that is base64 encoded.
"IyEvYmluL2Jhc2gKCiMgRW5kbGVzcyBsb29wCndoaWxlIHRydWUKZG8KICAgICMgRmV0Y2ggYSBjYXQgZmFjdCB3aXRoIGEgbWF4aW11bSBsZW5ndGggb2YgMTQwIGNoYXJhY3RlcnMKICAgIGN1cmwgLS1uby1wcm9ncmVzcy1tZXRlciBodHRwczovL2NhdGZhY3QubmluamEvZmFjdD9tYXhfbGVuZ3RoPTE0MAoKICAgICMgUHJpbnQgYSBuZXdsaW5lIGZvciByZWFkYWJpbGl0eQogICAgZWNobwoKICAgICMgU2xlZXAgZm9yIDMgc2Vjb25kcyBiZWZvcmUgdGhlIG5leHQgaXRlcmF0aW9uCiAgICBzbGVlcCAzCmRvbmUKCgo="
Add custom, searchable tags to instances.
Tag for searching and grouping
List of environment variable name and values to automatically add to the instance
Network and firewall configuration
Show child attributes
List of UFW (Uncomplicated Firewall) rules
Show child attributes
The UFW rule action
"allow"
Source IP address or CIDR range
"192.168.1.0/24"
Destination IP address or CIDR range
"10.0.0.0/8"
Port number or range (e.g. '80' or '8000:8999')
"80"
Protocol (e.g. tcp, udp)
"tcp"