Question

API v2 - You specified an invalid image for Droplet creation.

  • Posted June 23, 2014

As you read the title when i make request with PHP cURL i get the response message of invalid image.

I can see all the image listings “/v2/images/” including the one i request with JSON data which looks like this: <pre> { “name”: “My-Droplet”, “region”: “nyc1”, “size”: “4gb”, “image”: 4201396 } </pre> Now the image 4201396 is totally exist and I also able to get image details “/v2/images/4201396”.

Why the droplet creation API method didn’t recognize the image id? How can i prevent the error? And why the error occurred?

Subscribe
Share

Available image sizes are listed at https://slugs.do-api.dev/.

Note that the image sizes of the API do not correspond to the URL parameters. For instance, size=c-2-4gib becomes "size":"c-2"


Submit an 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.

My problem was that I was trying to select my private snapshot by name, while the docs state you need to use its numeric ID. I was able to find this by inspecting the DOM of the DigitalOcean control panel, but I’m sure theres better ways for that.

  1. Item 1
  2. Item 2
  3. Item 3* Item
  • Item**********

hey guys,

same here,

  1. have created a droplet D1
  2. done a snapshot S1
  3. was able to spin new worker droplets off the S1 snapshot via API dozen of times
  4. have tweaked the D1 droplet into D1’
  5. redid snapshotting of D1’ into S2
  6. removed S1
  7. now NOT able to spin up any new workers with all the same properties as before, via API based on the S2 snapshot the error: digitalocean.DataReadError: You specified an invalid image for Droplet creation. em using this wrapper: https://github.com/koalalorenzo/python-digitalocean

listing all images does return the said S2 snapshot , and its statuses looking correct.

fetching the S2 directly via its ID (obtained when listing all) returns the image with exactly the same name I’m trying to use to spin up a new droplet. Tried renaming the hell out of it, to no avail. what the ?

EDIT: I can’t be sure but this looks like an issue with private snapshots altogether. None of my old snapshots work anymore. Sadly the one that I used right before this all collapsed had been disposed, so can’t compare with thing that I know worked literally yesterday. But even 10month old snapshots are no go currently, if that is an indication to anything…

Same problem here.

I have same issue. Not able to create droplet using image from web api call.

I have same issue…

I tried with id, name and slug and no ones work

Did anybody get any solution?

I have same issue… Did anybody get any solution?

Did anyone solve the issue? “Sometimes you need to call the API a few times before it is successful.” This sounds like “voodoo” and i don’t like it. :)

Yep, I have the same problem. Sometimes you need to call the API a few times before it is successful.

I’m also having this same issue. I’ve tried using both a slug as a string and an image id as a number when posting to the API. I’m also only using regions where the image is available. Any idea what’s going on?