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!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hello, @raminassadollahi
By default, only non-GPU Droplets are returned. To list only GPU Droplets, set the
type
query parameter togpus
. For example,/v2/droplets?type=gpus
.By default, only non-GPU Droplets are returned. To list only GPU Droplets, set the
type
query parameter togpus
. 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