pydo.images.create_custom()
Generated on 17 Jun 2026
from pydo version
v0.37.0
Usage
client.images.create_custom(
body={
"name": "Nifty New Snapshot",
"distribution": "Ubuntu",
"description": " ",
...,
},
)Description
To create a new custom image, send a POST request to /v2/images. The body must contain a url attribute pointing to a Linux virtual machine image to be imported into DigitalOcean. The image must be in the raw, qcow2, vhdx, vdi, or vmdk format. It may be compressed using gzip or bzip2 and must be smaller than 100 GB after being decompressed.
Parameters
namestring requiredExample:
Nifty New SnapshotThe display name that has been given to an image. This is what is shown in the control panel and is generally a descriptive title for the image in question.
distributionstring optionalThe name of a custom image's distribution. Currently, the valid values are
Arch Linux,CentOS,CoreOS,Debian,Fedora,Fedora Atomic,FreeBSD,Gentoo,openSUSE,RancherOS,Rocky Linux,Ubuntu, andUnknown. Any other value will be accepted but ignored, andUnknownwill be used in its place.descriptionstring optionalAn optional free-form text field to describe an image.
urlstring requiredExample:
http://cloud-images.ubuntu.com/minimal/releases/bionic/release/ubuntu-18.04-minimal-cloudimg-amd64.imgA URL from which the custom Linux virtual machine image may be retrieved. The image it points to must be in the raw, qcow2, vhdx, vdi, or vmdk format. It may be compressed using gzip or bzip2 and must be smaller than 100 GB after being decompressed.
regionstring requiredThe slug identifier for the region where the resource will initially be available.
tagsarray of strings or null optionalExample:
['base-image', 'prod']A flat array of tag names as strings to be applied to the resource. Tag names may be for either existing or new tags.
Requirestag:createscope.
Request Sample
Response Example
More Information
See /v2/images in the API reference for additional detail on responses, headers, parameters, and more.