Digital Ocean Images API

A DigitalOcean [image](https://docs.digitalocean.com/products/images/) can be used to create a Droplet and may come in a number of flavors. Currently, there are five types of images: snapshots, backups, applications, distributions, and custom images. * [Snapshots](https://docs.digitalocean.com/products/snapshots/) provide a full copy of an existing Droplet instance taken on demand. * [Backups](https://docs.digitalocean.com/products/backups/) are similar to snapshots but are created automatically at regular intervals when enabled for a Droplet. * [Custom images](https://docs.digitalocean.com/products/custom-images/) are Linux-based virtual machine images (raw, qcow2, vhdx, vdi, and vmdk formats are supported) that you may upload for use on DigitalOcean. * Distributions are the public Linux distributions that are available to be used as a base to create Droplets. * Applications, or [1-Click Apps](https://docs.digitalocean.com/products/marketplace/), are distributions pre-configured with additional software. To interact with images, you will generally send requests to the images endpoint at /v2/images.

GitHub OpenAPI
Business capability
IT Infrastructure Management BC-600.50

Operations 13

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /v2/images List images · Get images #
Ask an LLM
“What images are available to create Droplets from?”
“Can I see all my custom and public images?”
Tell an agent
List all images.
Show every image I can use to launch a Droplet.
POST /v2/images Create an image from a Droplet · Create images #
Ask an LLM
“How do I save a Droplet as a reusable image?”
“Can I create a custom image from a Droplet I'm done with?”
Tell an agent
Create an image from my Droplet.
Save this Droplet as a new image.
GET /v2/images/{image_id} Get an image · Get images by image id #
Ask an LLM
“What is the name and type of a specific image?”
“Can I look up one image by its ID?”
Tell an agent
Get image {image_id}.
Show the details of image {image_id}.
PUT /v2/images/{image_id} Replace an image · Replace images by image id #
Ask an LLM
“Can I overwrite an image's details?”
“What does replacing an image do?”
Tell an agent
Replace image {image_id}.
Overwrite the details of image {image_id}.
DELETE /v2/images/{image_id} Delete an image · Delete images by image id #
Ask an LLM
“How do I delete an image I no longer need?”
“Can I remove a custom image?”
Tell an agent destructive · confirm first
Delete image {image_id}.
Remove the image {image_id} permanently.
POST /v2/images/{image_id}/account_transfer Transfer an image to another account · Create images by image id account transfer #
Ask an LLM
“How do I share an image with a user on a different account?”
“Can I transfer a custom image to another account?”
Tell an agent
Transfer image {image_id} to another account.
Share my image {image_id} with a user on a different account.
POST /v2/images/{image_id}/account_transfer/accept Accept an image transfer · Create images by image id account transfer accept #
Ask an LLM
“How do I accept an image transfer from another account?”
“What happens when I accept a shared image?”
Tell an agent
Accept the image transfer for image {image_id}.
Confirm I want image {image_id} from the other account.
POST /v2/images/{image_id}/account_transfer/cancel Cancel an image transfer · Create images by image id account transfer cancel #
Ask an LLM
“Can I stop an image transfer I started?”
“How do I cancel a transfer of an image?”
Tell an agent destructive · confirm first
Cancel the image transfer for image {image_id}.
Stop sharing image {image_id}.
POST /v2/images/{image_id}/account_transfer/decline Decline an image transfer · Create images by image id account transfer decline #
Ask an LLM
“How do I refuse an image transfer from another account?”
“Can I decline a shared image?”
Tell an agent destructive · confirm first
Decline the image transfer for image {image_id}.
Refuse the shared image {image_id}.
GET /v2/images/{image_id}/actions List actions on an image · Get images by image id actions #
Ask an LLM
“What actions have been run on an image?”
“Can I see the action history for an image?”
Tell an agent
List actions on image {image_id}.
Show the action history for image {image_id}.
POST /v2/images/{image_id}/actions Run an action on an image · Create images by image id actions #
Ask an LLM
“Can I rebuild an image or resize it through an action?”
“What actions can I run on an image?”
Tell an agent
Run an action on image {image_id}.
Queue a new action for image {image_id}.
GET /v2/images/{image_id}/actions/{action_id} Get an action on an image · Get images by image id actions by action id #
Ask an LLM
“What is the status of a specific action on an image?”
“Can I check one image action by its ID?”
Tell an agent
Get action {action_id} on image {image_id}.
Show the progress of action {action_id} for image {image_id}.
POST /v1/images/generations Generate images from a Droplet · Create images generations #
Ask an LLM
“How do I generate a new image from a Droplet's current state?”
“Can I create an image generation for a Droplet?”
Tell an agent
Generate a new image from my Droplet.
Create an image generation for this Droplet.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/digital-ocean:digital-ocean-images-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

digital-ocean-images-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: DigitalOcean Images API
  version: '2.0'
  description: 'A DigitalOcean image can be

    used to create a Droplet and may come in a number of flavors. Currently,

    there are five types of images: snapshots, backups, applications,

    distributions, and custom images.


    * Snapshots provide

    a full copy of an existing Droplet instance taken on demand.


    * Backups are similar

    to snapshots but are created automatically at regular intervals when

    enabled for a Droplet.


    * Custom images

    are Linux-based virtual machine images (raw, qcow2, vhdx, vdi, and vmdk

    formats are supported) that you may upload for use on DigitalOcean.


    * Distributions are the public Linux distributions that are available to

    be used as a base to create Droplets.


    * Applications, or 1-Click Apps,

    are distributions pre-configured with additional software.


    To interact with images, you will generally send requests to the images

    endpoint at /v2/images.'
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  contact:
    name: DigitalOcean API Team
    email: api-engineering@digitalocean.com
  termsOfService: https://www.digitalocean.com/legal/terms-of-service-agreement/
servers:
- url: https://api.digitalocean.com
  description: production
security:
- bearer_auth: []
tags:
- name: Images
  description: 'A DigitalOcean image can be

    used to create a Droplet and may come in a number of flavors. Currently,

    there are five types of images: snapshots, backups, applications,

    distributions, and custom images.


    * Snapshots provide

    a full copy of an existing Droplet instance taken on demand.


    * Backups are similar

    to snapshots but are created automatically at regular intervals when

    enabled for a Droplet.


    * Custom images

    are Linux-based virtual machine images (raw, qcow2, vhdx, vdi, and vmdk

    formats are supported) that you may upload for use on DigitalOcean.


    * Distributions are the public Linux distributions that are available to

    be used as a base to create Droplets.


    * Applications, or 1-Click Apps,

    are distributions pre-configured with additional software.


    To interact with images, you will generally send requests to the images

    endpoint at /v2/images.'
paths:
  /v2/images:
    get:
      $ref: resources/images/images_list.yml
      tags:
      - Images
      summary: Get images
      x-summary-source: derived
      operationId: getV2Images
      x-operation-id-source: derived
    post:
      $ref: resources/images/images_create_custom.yml
      tags:
      - Images
      summary: Create images
      x-summary-source: derived
      operationId: postV2Images
      x-operation-id-source: derived
  /v2/images/{image_id}:
    get:
      $ref: resources/images/images_get.yml
      tags:
      - Images
      summary: Get images by image id
      x-summary-source: derived
      operationId: getV2ImagesByImageId
      x-operation-id-source: derived
    put:
      $ref: resources/images/images_update.yml
      tags:
      - Images
      summary: Replace images by image id
      x-summary-source: derived
      operationId: putV2ImagesByImageId
      x-operation-id-source: derived
    delete:
      $ref: resources/images/images_delete.yml
      tags:
      - Images
      summary: Delete images by image id
      x-summary-source: derived
      operationId: deleteV2ImagesByImageId
      x-operation-id-source: derived
  /v2/images/{image_id}/account_transfer:
    post:
      $ref: resources/images/images_post_account_transfer_create.yml
      tags:
      - Images
      summary: Create images by image id account transfer
      x-summary-source: derived
      operationId: postV2ImagesByImageIdAccountTransfer
      x-operation-id-source: derived
  /v2/images/{image_id}/account_transfer/accept:
    post:
      $ref: resources/images/images_post_account_transfer_accept.yml
      tags:
      - Images
      summary: Create images by image id account transfer accept
      x-summary-source: derived
      operationId: postV2ImagesByImageIdAccountTransferAccept
      x-operation-id-source: derived
  /v2/images/{image_id}/account_transfer/cancel:
    post:
      $ref: resources/images/images_post_account_transfer_cancel.yml
      tags:
      - Images
      summary: Create images by image id account transfer cancel
      x-summary-source: derived
      operationId: postV2ImagesByImageIdAccountTransferCancel
      x-operation-id-source: derived
  /v2/images/{image_id}/account_transfer/decline:
    post:
      $ref: resources/images/images_post_account_transfer_decline.yml
      tags:
      - Images
      summary: Create images by image id account transfer decline
      x-summary-source: derived
      operationId: postV2ImagesByImageIdAccountTransferDecline
      x-operation-id-source: derived
  /v2/images/{image_id}/actions:
    get:
      $ref: resources/images/imageActions_list.yml
      tags:
      - Images
      summary: Get images by image id actions
      x-summary-source: derived
      operationId: getV2ImagesByImageIdActions
      x-operation-id-source: derived
    post:
      $ref: resources/images/imageActions_post.yml
      tags:
      - Images
      summary: Create images by image id actions
      x-summary-source: derived
      operationId: postV2ImagesByImageIdActions
      x-operation-id-source: derived
  /v2/images/{image_id}/actions/{action_id}:
    get:
      $ref: resources/images/imageActions_get.yml
      tags:
      - Images
      summary: Get images by image id actions by action id
      x-summary-source: derived
      operationId: getV2ImagesByImageIdActionsByActionId
      x-operation-id-source: derived
  /v1/images/generations:
    post:
      $ref: resources/inference/inference_create_image.yml
      tags:
      - Images
      summary: Create images generations
      x-summary-source: derived
      operationId: postV1ImagesGenerations
      x-operation-id-source: derived
components:
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      description: '## OAuth Authentication


        In order to interact with the DigitalOcean API, you or your application must

        authenticate.


        The DigitalOcean API handles this through OAuth, an open standard for

        authorization. OAuth allows you to delegate access to your account.

        Scopes can be used to grant full access, read-only access, or access to

        a specific set of endpoints.


        You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens)

        section of the DigitalOcean control panel for your account.


        An OAuth token functions as a complete authentication request. In effect, it

        acts as a substitute for a username and password pair.


        Because of this, it is absolutely **essential** that you keep your OAuth

        tokens secure. In fact, upon generation, the web interface will only display

        each token a single time in order to prevent the token from being compromised.


        DigitalOcean access tokens begin with an identifiable prefix in order to

        distinguish them from other similar tokens.


        - `dop_v1_` for personal access tokens generated in the control panel

        - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/)

        - `dor_v1_` for OAuth refresh tokens


        ### Scopes


        Scopes act like permissions assigned to an API token. These permissions

        determine what actions the token can perform. You can create API

        tokens that grant read-only access, full access, or limited access to

        specific endpoints by using custom scopes.


        Generally, scopes are designed to match HTTP verbs and common CRUD

        operations (Create, Read, Update, Delete).


        | HTTP Verb | CRUD Operation | Scope |

        |---|---|---|

        | GET | Read | `<resource>:read` |

        | POST | Create | `<resource>:create` |

        | PUT/PATCH | Update | `<resource>:update` |

        | DELETE | Delete | `<resource>:delete` |


        For example, creating a new Droplet by making a `POST` request to the

        `/v2/droplets` endpoint requires the `droplet:create` scope while

        listing Droplets by making a `GET` request to the `/v2/droplets`

        endpoint requires the `droplet:read` scope.


        Each endpoint below specifies which scope is required to access it when

        using custom scopes.


        ### How to Authenticate with OAuth


        In order to make an authenticated request, include a bearer-type

        `Authorization` header containing your OAuth token. All requests must be

        made over HTTPS.


        ### Authenticate with a Bearer Authorization Header


        ```

        curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT"

        ```

        '
    inference_bearer_auth:
      type: http
      scheme: bearer
      description: '## OAuth Authentication


        In order to interact with the DigitalOcean API, you or your application must

        authenticate.


        The DigitalOcean API handles this through OAuth, an open standard for

        authorization. OAuth allows you to delegate access to your account.

        Scopes can be used to grant full access, read-only access, or access to

        a specific set of endpoints.


        You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens)

        section of the DigitalOcean control panel for your account.


        An OAuth token functions as a complete authentication request. In effect, it

        acts as a substitute for a username and password pair.


        Because of this, it is absolutely **essential** that you keep your OAuth

        tokens secure. In fact, upon generation, the web interface will only display

        each token a single time in order to prevent the token from being compromised.


        DigitalOcean access tokens begin with an identifiable prefix in order to

        distinguish them from other similar tokens.


        - `dop_v1_` for personal access tokens generated in the control panel

        - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/)

        - `dor_v1_` for OAuth refresh tokens


        ### Authenticate with a Bearer Authorization Header


        **Serverless Inference:**


        ```

        curl -X POST -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://inference.do-ai.run/v1/chat/completions"

        ```


        **Agent Inference:**


        ```

        curl -X POST -H "Authorization: Bearer $AGENT_ACCESS_KEY" "https://{your-agent-url}.agents.do-ai.run/v1/chat/completions?agent=true"

        ```


        **Note:** Agent Inference APIs use an `agent_access_key` (endpoint access

        key) instead of a DigitalOcean OAuth token. The `agent_access_key` is

        provided when you provision an agent endpoint and is scoped to that

        specific agent. It is not interchangeable with DigitalOcean OAuth tokens

        (`dop_v1_*`, `doo_v1_*`, `dor_v1_*`), which are used with Serverless

        Inference and the control-plane API at `https://api.digitalocean.com`.

        '
x-tagGroups:
- name: Public APIs
  tags:
  - Public APIs Introduction
  - 1-Click Applications
  - Account
  - Actions
  - Add-Ons
  - Action Gateway
  - Action Gateway Data Plane
  - Agent Platform API
  - Apps
  - Billing
  - Block Storage
  - Block Storage Actions
  - BYOIP Prefixes
  - CDN Endpoints
  - Certificates
  - Container Registry
  - Container Registries
  - Databases
  - Dedicated Inference
  - Domain Records
  - Domains
  - Droplet Actions
  - Droplets
  - Droplet Autoscale Pools
  - Firewalls
  - Floating IP Actions
  - Floating IPs
  - Functions
  - Harness Runtime
  - Image Actions
  - Images
  - Insights
  - Kubernetes
  - Load Balancers
  - MicroVMs [Public Preview]
  - Monitoring
  - NFS
  - NFS Actions
  - Organizations
  - Partner Network Connect
  - Project Resources
  - Projects
  - Regions
  - Reserved IP Actions
  - Reserved IPs
  - Reserved IPv6
  - Reserved IPv6 Actions
  - Security
  - Signals
  - Sizes
  - Snapshots
  - Spaces Keys
  - SSH Keys
  - Tags
  - Uptime
  - Vector Databases
  - VPC NAT Gateways
  - VPC Peerings
  - VPC Routes [Public Preview]
  - VPC Subnets [Public Preview]
  - VPCs
- name: Inference APIs
  tags:
  - Inference Introduction
  - Agent Inference
  - Batch Inference
  - Embeddings
  - Serverless Inference