I’m trying to spawn a GPU droplet via Python and the API, I’m trying to use the “Create via API” information given when configuring a GPU droplet on the website.
I tried
“size_id”: 288 (provided by the DO website when clicking “create via API”) and
“size:”: “gpu-h100x1-80gb” (provided by https://slugs.do-api.dev/ )
but both result in
“azure.core.exceptions.HttpResponseError: (None) You specified an invalid size for Droplet creation. Code: None”
Any idea what’s wrong?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello, @raminassadollahi
By default, only non-GPU Droplets are returned. To list only GPU Droplets, set the type
query parameter to gpus
. For example, /v2/droplets?type=gpus
.
By default, only non-GPU Droplets are returned. To list only GPU Droplets, set the type
query parameter to gpus
. For example, /v2/droplets?type=gpus
.
Check GPU Droplets
You can alos check our docs on how to create a droplet using the API
https://docs.digitalocean.com/products/droplets/how-to/create/#create-a-droplet-using-automation
Regards
Hey Ramin 👋
Which region are you trying to deploy the GPU Droplet in? Not all GPU sizes are available in every region, so that could be the issue.
If everything looks good and you’re still hitting the error, I’d suggest reaching out to support here: https://do.co/support, they can check the exact availability and help debug the API call.
- Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.