Digital Ocean Kubernetes API

[DigitalOcean Kubernetes](https://docs.digitalocean.com/products/kubernetes/) allows you to quickly deploy scalable and secure Kubernetes clusters. By sending requests to the `/v2/kubernetes/clusters` endpoint, you can list, create, or delete clusters as well as scale node pools up and down, recycle individual nodes, and retrieve the kubeconfig file for use with a cluster.

GitHub OpenAPI
Business capability
IT Infrastructure Management BC-600.50

Operations 28

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/kubernetes/clusters List Kubernetes clusters · Get kubernetes clusters #
Ask an LLM
“Which managed Kubernetes clusters do I have?”
“Can I see all my DO Kubernetes clusters at once?”
Tell an agent
List all my Kubernetes clusters.
Show every managed cluster in my account.
POST /v2/kubernetes/clusters Create a Kubernetes cluster · Create kubernetes clusters #
Ask an LLM
“How do I spin up a new managed Kubernetes cluster?”
“Can I create a cluster with a specific version and region?”
Tell an agent
Create a new Kubernetes cluster.
Spin up a managed cluster with my chosen settings.
GET /v2/kubernetes/clusters/{cluster_id} Get a Kubernetes cluster · Get kubernetes clusters by cluster id #
Ask an LLM
“What version and status is one of my clusters in?”
“Can I look up a single managed cluster by its ID?”
Tell an agent
Show Kubernetes cluster {cluster_id}.
Get the status and version of cluster {cluster_id}.
PUT /v2/kubernetes/clusters/{cluster_id} Replace a Kubernetes cluster · Replace kubernetes clusters by cluster id #
Ask an LLM
“Can I replace a whole cluster's configuration at once?”
“Is there a full cluster replacement call?”
Tell an agent
Replace the entire configuration of Kubernetes cluster {cluster_id}.
Overwrite cluster {cluster_id} with a new cluster definition.
DELETE /v2/kubernetes/clusters/{cluster_id} Delete a Kubernetes cluster · Delete kubernetes clusters by cluster id #
Ask an LLM
“How do I delete a managed Kubernetes cluster?”
“Can I remove a cluster I no longer need?”
Tell an agent destructive · confirm first
Delete Kubernetes cluster {cluster_id}.
Remove the managed cluster {cluster_id} from my account.
GET /v2/kubernetes/clusters/{cluster_id}/destroy_with_associated_resources Get the destroy-with-resources status · Get kubernetes clusters by cluster id destroy with associated resources #
Ask an LLM
“Will deleting my cluster also remove its load balancers and volumes?”
“What does the destroy-with-associated-resources flag mean?”
Tell an agent
Check whether cluster {cluster_id} destroys associated resources.
Show the destroy-with-resources status for cluster {cluster_id}.
DELETE /v2/kubernetes/clusters/{cluster_id}/destroy_with_associated_resources/selective Delete a cluster with selective resource removal · Delete kubernetes clusters by cluster id destroy with associated resources… #
Ask an LLM
“Can I delete a cluster and keep some of its resources?”
“Is there a selective delete-with-resources option?”
Tell an agent destructive · confirm first
Delete cluster {cluster_id} with selective resource removal.
Remove cluster {cluster_id} but keep its load balancers.
DELETE /v2/kubernetes/clusters/{cluster_id}/destroy_with_associated_resources/dangerous Delete a cluster with all resources · Delete kubernetes clusters by cluster id destroy with associated resources… #
Ask an LLM
“How do I delete a cluster and everything attached to it?”
“Can I blow away a cluster and all its resources in one call?”
Tell an agent destructive · confirm first
Delete cluster {cluster_id} with all associated resources.
Blow away cluster {cluster_id} and every resource it owns.
GET /v2/kubernetes/clusters/{cluster_id}/kubeconfig Get a cluster's kubeconfig · Get kubernetes clusters by cluster id kubeconfig #
Ask an LLM
“Where do I get the kubeconfig file to connect to my cluster?”
“Can I download the cluster's kubeconfig for kubectl?”
Tell an agent
Get the kubeconfig for Kubernetes cluster {cluster_id}.
Download the cluster {cluster_id} config for kubectl.
GET /v2/kubernetes/clusters/{cluster_id}/credentials Get a cluster's admin credentials · Get kubernetes clusters by cluster id credentials #
Ask an LLM
“What admin credentials does my cluster use?”
“Can I fetch the cluster's admin user and password?”
Tell an agent
Get the admin credentials for cluster {cluster_id}.
Show the admin user and password for cluster {cluster_id}.
GET /v2/kubernetes/clusters/{cluster_id}/upgrades List a cluster's upgrade options · Get kubernetes clusters by cluster id upgrades #
Ask an LLM
“What Kubernetes versions can I upgrade my cluster to?”
“Which upgrades are available for a cluster?”
Tell an agent
List upgrade options for cluster {cluster_id}.
Show which versions cluster {cluster_id} can be upgraded to.
POST /v2/kubernetes/clusters/{cluster_id}/upgrade Upgrade a cluster's version · Create kubernetes clusters by cluster id upgrade #
Ask an LLM
“How do I upgrade my cluster to a newer Kubernetes version?”
“Can I change a cluster's Kubernetes version in place?”
Tell an agent
Upgrade cluster {cluster_id} to a new Kubernetes version.
Change the Kubernetes version of cluster {cluster_id}.
GET /v2/kubernetes/clusters/{cluster_id}/node_pools List a cluster's node pools · Get kubernetes clusters by cluster id node pools #
Ask an LLM
“Which node pools does my cluster have?”
“Can I see the node pool sizes and counts for a cluster?”
Tell an agent
List the node pools of cluster {cluster_id}.
Show how many nodes and what sizes each pool in cluster {cluster_id} has.
POST /v2/kubernetes/clusters/{cluster_id}/node_pools Add a node pool to a cluster · Create kubernetes clusters by cluster id node pools #
Ask an LLM
“How do I add a new node pool to an existing cluster?”
“Can I grow a cluster by adding another node pool?”
Tell an agent
Add a new node pool to cluster {cluster_id}.
Grow cluster {cluster_id} with an additional node pool.
GET /v2/kubernetes/clusters/{cluster_id}/node_pools/{node_pool_id} Get a cluster's node pool · Get kubernetes clusters by cluster id node pools by node pool id #
Ask an LLM
“What size and count does a particular node pool have?”
“Can I look up one node pool of a cluster by its ID?”
Tell an agent
Show node pool {node_pool_id} of cluster {cluster_id}.
Get the size and count of pool {node_pool_id} in cluster {cluster_id}.
PUT /v2/kubernetes/clusters/{cluster_id}/node_pools/{node_pool_id} Replace a cluster's node pool · Replace kubernetes clusters by cluster id node pools by node pool id #
Ask an LLM
“Can I replace a node pool's configuration entirely?”
“Is there a full node pool replacement call?”
Tell an agent
Replace node pool {node_pool_id} of cluster {cluster_id}.
Overwrite the configuration of pool {node_pool_id} in cluster {cluster_id}.
DELETE /v2/kubernetes/clusters/{cluster_id}/node_pools/{node_pool_id} Delete a cluster's node pool · Delete kubernetes clusters by cluster id node pools by node pool id #
Ask an LLM
“How do I remove a node pool from a cluster?”
“Can I delete a node pool without deleting the cluster?”
Tell an agent destructive · confirm first
Delete node pool {node_pool_id} from cluster {cluster_id}.
Remove pool {node_pool_id} from cluster {cluster_id} but keep the cluster.
DELETE /v2/kubernetes/clusters/{cluster_id}/node_pools/{node_pool_id}/nodes/{node_id} Recycle a single node · Delete kubernetes clusters by cluster id node pools by node pool id nodes by… #
Ask an LLM
“How do I reboot just one node in a pool?”
“Can I recycle a single node without touching the pool?”
Tell an agent destructive · confirm first
Recycle node {node_id} in pool {node_pool_id} of cluster {cluster_id}.
Reboot just node {node_id} in pool {node_pool_id} on cluster {cluster_id}.
POST /v2/kubernetes/clusters/{cluster_id}/node_pools/{node_pool_id}/recycle Recycle a node pool · Create kubernetes clusters by cluster id node pools by node pool id recycle #
Ask an LLM
“How do I reboot every node in a node pool?”
“Can I recycle a whole node pool at once?”
Tell an agent destructive · confirm first
Recycle all nodes in pool {node_pool_id} of cluster {cluster_id}.
Reboot every node in pool {node_pool_id} on cluster {cluster_id}.
GET /v2/kubernetes/clusters/{cluster_id}/user Get a cluster's user · Get kubernetes clusters by cluster id user #
Ask an LLM
“Which user account is a cluster using?”
“Can I see the user details for a cluster?”
Tell an agent
Show the user for cluster {cluster_id}.
Get the user account details of cluster {cluster_id}.
GET /v2/kubernetes/options List Kubernetes cluster options · Get kubernetes options #
Ask an LLM
“Which Kubernetes versions and sizes can I choose when creating a cluster?”
“What options are available for new Kubernetes clusters?”
Tell an agent
Show the Kubernetes options available for new clusters.
List the Kubernetes versions and sizes I can use.
POST /v2/kubernetes/clusters/{cluster_id}/clusterlint Submit a cluster lint check · Create kubernetes clusters by cluster id clusterlint #
Ask an LLM
“How do I submit a cluster lint report?”
“Can I send a cluster lint check for a cluster I already have?”
Tell an agent
Submit a cluster lint check for cluster {cluster_id}.
Send a cluster lint report for cluster {cluster_id}.
GET /v2/kubernetes/clusters/{cluster_id}/clusterlint Run a cluster lint check · Get kubernetes clusters by cluster id clusterlint #
Ask an LLM
“Can I check a Kubernetes cluster for common configuration errors?”
“What does a cluster lint report find?”
Tell an agent
Run a cluster lint check on cluster {cluster_id}.
Check cluster {cluster_id} for common Kubernetes configuration issues.
POST /v2/kubernetes/registry Create a Kubernetes registry · Create kubernetes registry #
Ask an LLM
“How do I create a private registry for my Kubernetes clusters?”
“Can I add a registry for storing container images?”
Tell an agent
Create a Kubernetes registry.
Add a private registry for my clusters.
DELETE /v2/kubernetes/registry Delete a Kubernetes registry · Delete kubernetes registry #
Ask an LLM
“How do I remove a Kubernetes registry?”
“Can I delete a registry I no longer use?”
Tell an agent destructive · confirm first
Delete the Kubernetes registry.
Remove the private registry from my account.
POST /v2/kubernetes/registries Create multiple Kubernetes registries · Create kubernetes registries #
Ask an LLM
“Can I create several Kubernetes registries at once?”
“How do I add multiple private registries?”
Tell an agent
Create several Kubernetes registries.
Add multiple private registries to my account.
DELETE /v2/kubernetes/registries Delete multiple Kubernetes registries · Delete kubernetes registries #
Ask an LLM
“How do I remove several Kubernetes registries at once?”
“Can I delete multiple private registries together?”
Tell an agent destructive · confirm first
Delete several Kubernetes registries.
Remove multiple private registries from my account.
GET /v2/kubernetes/clusters/{cluster_id}/status_messages Get a cluster's status messages · Get kubernetes clusters by cluster id status messages #
Ask an LLM
“What status messages has my Kubernetes cluster posted?”
“Can I read the status messages for a cluster?”
Tell an agent
Show the status messages for cluster {cluster_id}.
Read the status messages of cluster {cluster_id}.

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-kubernetes-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-kubernetes-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: DigitalOcean Kubernetes API
  version: '2.0'
  description: 'DigitalOcean Kubernetes

    allows you to quickly deploy scalable and secure Kubernetes clusters. By

    sending requests to the `/v2/kubernetes/clusters` endpoint, you can list,

    create, or delete clusters as well as scale node pools up and down,

    recycle individual nodes, and retrieve the kubeconfig file for use with

    a cluster.'
  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: Kubernetes
  description: 'DigitalOcean Kubernetes

    allows you to quickly deploy scalable and secure Kubernetes clusters. By

    sending requests to the `/v2/kubernetes/clusters` endpoint, you can list,

    create, or delete clusters as well as scale node pools up and down,

    recycle individual nodes, and retrieve the kubeconfig file for use with

    a cluster.'
paths:
  /v2/kubernetes/clusters:
    get:
      $ref: resources/kubernetes/kubernetes_list_clusters.yml
      tags:
      - Kubernetes
      summary: Get kubernetes clusters
      x-summary-source: derived
      operationId: getV2KubernetesClusters
      x-operation-id-source: derived
    post:
      $ref: resources/kubernetes/kubernetes_create_cluster.yml
      tags:
      - Kubernetes
      summary: Create kubernetes clusters
      x-summary-source: derived
      operationId: postV2KubernetesClusters
      x-operation-id-source: derived
  /v2/kubernetes/clusters/{cluster_id}:
    get:
      $ref: resources/kubernetes/kubernetes_get_cluster.yml
      tags:
      - Kubernetes
      summary: Get kubernetes clusters by cluster id
      x-summary-source: derived
      operationId: getV2KubernetesClustersByClusterId
      x-operation-id-source: derived
    put:
      $ref: resources/kubernetes/kubernetes_update_cluster.yml
      tags:
      - Kubernetes
      summary: Replace kubernetes clusters by cluster id
      x-summary-source: derived
      operationId: putV2KubernetesClustersByClusterId
      x-operation-id-source: derived
    delete:
      $ref: resources/kubernetes/kubernetes_delete_cluster.yml
      tags:
      - Kubernetes
      summary: Delete kubernetes clusters by cluster id
      x-summary-source: derived
      operationId: deleteV2KubernetesClustersByClusterId
      x-operation-id-source: derived
  /v2/kubernetes/clusters/{cluster_id}/destroy_with_associated_resources:
    get:
      $ref: resources/kubernetes/kubernetes_list_associatedResources.yml
      tags:
      - Kubernetes
      summary: Get kubernetes clusters by cluster id destroy with associated resources
      x-summary-source: derived
      operationId: getV2KubernetesClustersByClusterIdDestroyWithAssociatedResources
      x-operation-id-source: derived
  /v2/kubernetes/clusters/{cluster_id}/destroy_with_associated_resources/selective:
    delete:
      $ref: resources/kubernetes/kubernetes_destroy_associatedResourcesSelective.yml
      tags:
      - Kubernetes
      summary: Delete kubernetes clusters by cluster id destroy with associated resources…
      x-summary-source: derived
      operationId: deleteV2KubernetesClustersByClusterIdDestroyWithAssociatedResourcesSelective
      x-operation-id-source: derived
  /v2/kubernetes/clusters/{cluster_id}/destroy_with_associated_resources/dangerous:
    delete:
      $ref: resources/kubernetes/kubernetes_destroy_associatedResourcesDangerous.yml
      tags:
      - Kubernetes
      summary: Delete kubernetes clusters by cluster id destroy with associated resources…
      x-summary-source: derived
      operationId: deleteV2KubernetesClustersByClusterIdDestroyWithAssociatedResourcesDangerous
      x-operation-id-source: derived
  /v2/kubernetes/clusters/{cluster_id}/kubeconfig:
    get:
      $ref: resources/kubernetes/kubernetes_get_kubeconfig.yml
      tags:
      - Kubernetes
      summary: Get kubernetes clusters by cluster id kubeconfig
      x-summary-source: derived
      operationId: getV2KubernetesClustersByClusterIdKubeconfig
      x-operation-id-source: derived
  /v2/kubernetes/clusters/{cluster_id}/credentials:
    get:
      $ref: resources/kubernetes/kubernetes_get_credentials.yml
      tags:
      - Kubernetes
      summary: Get kubernetes clusters by cluster id credentials
      x-summary-source: derived
      operationId: getV2KubernetesClustersByClusterIdCredentials
      x-operation-id-source: derived
  /v2/kubernetes/clusters/{cluster_id}/upgrades:
    get:
      $ref: resources/kubernetes/kubernetes_get_availableUpgrades.yml
      tags:
      - Kubernetes
      summary: Get kubernetes clusters by cluster id upgrades
      x-summary-source: derived
      operationId: getV2KubernetesClustersByClusterIdUpgrades
      x-operation-id-source: derived
  /v2/kubernetes/clusters/{cluster_id}/upgrade:
    post:
      $ref: resources/kubernetes/kubernetes_upgrade_cluster.yml
      tags:
      - Kubernetes
      summary: Create kubernetes clusters by cluster id upgrade
      x-summary-source: derived
      operationId: postV2KubernetesClustersByClusterIdUpgrade
      x-operation-id-source: derived
  /v2/kubernetes/clusters/{cluster_id}/node_pools:
    get:
      $ref: resources/kubernetes/kubernetes_list_nodePools.yml
      tags:
      - Kubernetes
      summary: Get kubernetes clusters by cluster id node pools
      x-summary-source: derived
      operationId: getV2KubernetesClustersByClusterIdNodePools
      x-operation-id-source: derived
    post:
      $ref: resources/kubernetes/kubernetes_add_nodePool.yml
      tags:
      - Kubernetes
      summary: Create kubernetes clusters by cluster id node pools
      x-summary-source: derived
      operationId: postV2KubernetesClustersByClusterIdNodePools
      x-operation-id-source: derived
  /v2/kubernetes/clusters/{cluster_id}/node_pools/{node_pool_id}:
    get:
      $ref: resources/kubernetes/kubernetes_get_nodePool.yml
      tags:
      - Kubernetes
      summary: Get kubernetes clusters by cluster id node pools by node pool id
      x-summary-source: derived
      operationId: getV2KubernetesClustersByClusterIdNodePoolsByNodePoolId
      x-operation-id-source: derived
    put:
      $ref: resources/kubernetes/kubernetes_update_nodePool.yml
      tags:
      - Kubernetes
      summary: Replace kubernetes clusters by cluster id node pools by node pool id
      x-summary-source: derived
      operationId: putV2KubernetesClustersByClusterIdNodePoolsByNodePoolId
      x-operation-id-source: derived
    delete:
      $ref: resources/kubernetes/kubernetes_delete_nodePool.yml
      tags:
      - Kubernetes
      summary: Delete kubernetes clusters by cluster id node pools by node pool id
      x-summary-source: derived
      operationId: deleteV2KubernetesClustersByClusterIdNodePoolsByNodePoolId
      x-operation-id-source: derived
  /v2/kubernetes/clusters/{cluster_id}/node_pools/{node_pool_id}/nodes/{node_id}:
    delete:
      $ref: resources/kubernetes/kubernetes_delete_node.yml
      tags:
      - Kubernetes
      summary: Delete kubernetes clusters by cluster id node pools by node pool id nodes by…
      x-summary-source: derived
      operationId: deleteV2KubernetesClustersByClusterIdNodePoolsByNodePoolIdNodesByNodeId
      x-operation-id-source: derived
  /v2/kubernetes/clusters/{cluster_id}/node_pools/{node_pool_id}/recycle:
    post:
      $ref: resources/kubernetes/kubernetes_recycle_nodePool.yml
      tags:
      - Kubernetes
      summary: Create kubernetes clusters by cluster id node pools by node pool id recycle
      x-summary-source: derived
      operationId: postV2KubernetesClustersByClusterIdNodePoolsByNodePoolIdRecycle
      x-operation-id-source: derived
  /v2/kubernetes/clusters/{cluster_id}/user:
    get:
      $ref: resources/kubernetes/kubernetes_get_clusterUser.yml
      tags:
      - Kubernetes
      summary: Get kubernetes clusters by cluster id user
      x-summary-source: derived
      operationId: getV2KubernetesClustersByClusterIdUser
      x-operation-id-source: derived
  /v2/kubernetes/options:
    get:
      $ref: resources/kubernetes/kubernetes_list_options.yml
      tags:
      - Kubernetes
      summary: Get kubernetes options
      x-summary-source: derived
      operationId: getV2KubernetesOptions
      x-operation-id-source: derived
  /v2/kubernetes/clusters/{cluster_id}/clusterlint:
    post:
      $ref: resources/kubernetes/kubernetes_run_clusterLint.yml
      tags:
      - Kubernetes
      summary: Create kubernetes clusters by cluster id clusterlint
      x-summary-source: derived
      operationId: postV2KubernetesClustersByClusterIdClusterlint
      x-operation-id-source: derived
    get:
      $ref: resources/kubernetes/kubernetes_get_clusterLintResults.yml
      tags:
      - Kubernetes
      summary: Get kubernetes clusters by cluster id clusterlint
      x-summary-source: derived
      operationId: getV2KubernetesClustersByClusterIdClusterlint
      x-operation-id-source: derived
  /v2/kubernetes/registry:
    post:
      $ref: resources/kubernetes/kubernetes_add_registry.yml
      tags:
      - Kubernetes
      summary: Create kubernetes registry
      x-summary-source: derived
      operationId: postV2KubernetesRegistry
      x-operation-id-source: derived
    delete:
      $ref: resources/kubernetes/kubernetes_remove_registry.yml
      tags:
      - Kubernetes
      summary: Delete kubernetes registry
      x-summary-source: derived
      operationId: deleteV2KubernetesRegistry
      x-operation-id-source: derived
  /v2/kubernetes/registries:
    post:
      $ref: resources/kubernetes/kubernetes_add_registries.yml
      tags:
      - Kubernetes
      summary: Create kubernetes registries
      x-summary-source: derived
      operationId: postV2KubernetesRegistries
      x-operation-id-source: derived
    delete:
      $ref: resources/kubernetes/kubernetes_remove_registries.yml
      tags:
      - Kubernetes
      summary: Delete kubernetes registries
      x-summary-source: derived
      operationId: deleteV2KubernetesRegistries
      x-operation-id-source: derived
  /v2/kubernetes/clusters/{cluster_id}/status_messages:
    get:
      $ref: resources/kubernetes/kubernetes_get_status_messages.yml
      tags:
      - Kubernetes
      summary: Get kubernetes clusters by cluster id status messages
      x-summary-source: derived
      operationId: getV2KubernetesClustersByClusterIdStatusMessages
      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