Prequisites
There are two pre-requisites for this guide:- After you have created your account, you must top up your wallet here.
- After you have topped up your wallet, generate and retrieve your Shadeform API key here.
Finding a GPU instance
Use the /instances/types API to query for your desired instance. For this guide, we will query for the cheapest available A6000 instance. Make sure to replace<api-key> with your own API Key retrieved from here.
cloud, region, and shade_instance_type fields.
Response
Launching the instance
After we have found the cheapest A6000 that’s available, we will launch the GPU instance using the /instances/create API. Using the values from the previous JSON snippet, we can fill in request payload fields forcloud, region, and shade_instance_type.
If you encounter an error that implies that the selected instance is out of capacity, please try the next instance returned in the response. Sometimes GPU availability can change rapidly!
id property for further requests.
Response
Checking the status of the instance
Now that we have created the GPU instance, we must wait for the instance to spin up. We can check on the status of the instance by calling the /instances/info API. We will need to use theid from the response of the previous step as a URL parameter.
status field to see fi the instance is ready. Right now the instance is pending.
Pending Response
status changes from pending to active. This will typically take 4-5 minutes for A6000 instances. When the status turns to active, the ip field will also become populated. The response below is when the instance becomes ready.
Active Response
SSHing into the instance
Once the instance’s status isactive, we can now SSH into the GPU instance. Unless you have specified a different SSH key in the create request or updated your default SSH key, your default SSH key will be the one labeled as ‘Shadeform Managed Key’. In order to access the GPU instance, you will need to download your Shadeform generated private key. Once you have the private key downloaded, you will need to update the permissions on the key.
Update Private Key Permissions
<ip> with the ip found in the response of the API response above.
SSH into the instance
If you encounter an error that starts with
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!, you can run ssh-keygen -R <ip> to reset your saved host info.Restarting the instance
If you ever need to restart an instance, use our /instances/restart API using the instanceid retrieved earlier. Note that a 200 response does not confirm that the instance restarted successfully. It only confirms that the restart request was initiated. You may need to wait a few minutes for the instance to be ready to use again.
Deleting the instance
Once you’ve done with the instance, you can delete the instance by calling the /instances/delete API using the instanceid retrieved earlier.
Tutorial Library
Use startup scripts, launch containers, concepts, and more
Core Concepts
Learn about the core concepts that powers Shadeform
FAQ
Frequently asked questions and answers
API Documentation
Full reference on our public APIs