Skip to content
API Reference

API Reference

Libraries

npm install @digitalocean/gradient
pip install gradient

API Overview

Agents

List Agents
get/v2/gen-ai/agents
Create an Agent
post/v2/gen-ai/agents
Retrieve an Existing Agent
get/v2/gen-ai/agents/{uuid}
Update an Agent
put/v2/gen-ai/agents/{uuid}
Delete an Agent
delete/v2/gen-ai/agents/{uuid}
Update Agent Status
put/v2/gen-ai/agents/{uuid}/deployment_visibility
Get Agent Usage
get/v2/gen-ai/agents/{uuid}/usage

AgentsAPI Keys

List Agent API Keys
get/v2/gen-ai/agents/{agent_uuid}/api_keys
Create an Agent API Key
post/v2/gen-ai/agents/{agent_uuid}/api_keys
Update API Key for an Agent
put/v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}
Delete API Key for an Agent
delete/v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}
Regenerate API Key for an Agent
put/v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}/regenerate

AgentsChat

AgentsChatCompletions

AgentsEvaluation Metrics

List Evaluation Metrics
get/v2/gen-ai/evaluation_metrics
List Datacenter Regions
get/v2/gen-ai/regions

AgentsEvaluation MetricsWorkspaces

List Workspaces
get/v2/gen-ai/workspaces
Create a Workspace
post/v2/gen-ai/workspaces
Retrieve an Existing Workspace
get/v2/gen-ai/workspaces/{workspace_uuid}
Delete a Workspace
delete/v2/gen-ai/workspaces/{workspace_uuid}
Update a Workspace
put/v2/gen-ai/workspaces/{workspace_uuid}
List Evaluation Test Cases by Workspace
get/v2/gen-ai/workspaces/{workspace_uuid}/evaluation_test_cases

AgentsEvaluation MetricsWorkspacesAgents

List agents by Workspace
get/v2/gen-ai/workspaces/{workspace_uuid}/agents
Move Agents to a Workspace
put/v2/gen-ai/workspaces/{workspace_uuid}/agents

AgentsEvaluation MetricsAnthropic

AgentsEvaluation MetricsAnthropicKeys

List Anthropic API Keys
get/v2/gen-ai/anthropic/keys
Create Anthropic API Key
post/v2/gen-ai/anthropic/keys
Get Anthropic API Key
get/v2/gen-ai/anthropic/keys/{api_key_uuid}
Update Anthropic API Key
put/v2/gen-ai/anthropic/keys/{api_key_uuid}
Delete Anthropic API Key
delete/v2/gen-ai/anthropic/keys/{api_key_uuid}
List agents by Anthropic key
get/v2/gen-ai/anthropic/keys/{uuid}/agents

AgentsEvaluation MetricsOpenAI

AgentsEvaluation MetricsOpenAIKeys

List OpenAI API Keys
get/v2/gen-ai/openai/keys
Create OpenAI API Key
post/v2/gen-ai/openai/keys
Get OpenAI API Key
get/v2/gen-ai/openai/keys/{api_key_uuid}
Update OpenAI API Key
put/v2/gen-ai/openai/keys/{api_key_uuid}
Delete OpenAI API Key
delete/v2/gen-ai/openai/keys/{api_key_uuid}
List agents by OpenAI key
get/v2/gen-ai/openai/keys/{uuid}/agents

AgentsEvaluation MetricsOauth2

Get Oauth2 URL
get/v2/gen-ai/oauth2/url

AgentsEvaluation MetricsOauth2Dropbox

Get Oauth2 Dropbox Tokens
post/v2/gen-ai/oauth2/dropbox/tokens

AgentsEvaluation MetricsScheduled Indexing

Create scheduled indexing for knowledge base
post/v2/gen-ai/scheduled-indexing
Get Scheduled Indexing for Knowledge Base
get/v2/gen-ai/scheduled-indexing/knowledge-base/{knowledge_base_uuid}
Delete Scheduled Indexing
delete/v2/gen-ai/scheduled-indexing/{uuid}

AgentsEvaluation Runs

Run an Evaluation Test Case
post/v2/gen-ai/evaluation_runs
Retrieve Information About an Existing Evaluation Run
get/v2/gen-ai/evaluation_runs/{evaluation_run_uuid}
Retrieve Results of an Evaluation Run
get/v2/gen-ai/evaluation_runs/{evaluation_run_uuid}/results
Retrieve Results of an Evaluation Run Prompt
get/v2/gen-ai/evaluation_runs/{evaluation_run_uuid}/results/{prompt_id}

AgentsEvaluation Test Cases

List Evaluation Test Cases
get/v2/gen-ai/evaluation_test_cases
Create Evaluation Test Case.
post/v2/gen-ai/evaluation_test_cases
List Evaluation Runs by Test Case
get/v2/gen-ai/evaluation_test_cases/{evaluation_test_case_uuid}/evaluation_runs
Retrieve Information About an Existing Evaluation Test Case
get/v2/gen-ai/evaluation_test_cases/{test_case_uuid}
Update an Evaluation Test Case.
put/v2/gen-ai/evaluation_test_cases/{test_case_uuid}

AgentsEvaluation Datasets

Create Presigned URLs for Evaluation Dataset File Upload
post/v2/gen-ai/evaluation_datasets/file_upload_presigned_urls
Create Evaluation Dataset
post/v2/gen-ai/evaluation_datasets

AgentsFunctions

Add Function Route to an Agent
post/v2/gen-ai/agents/{agent_uuid}/functions
Update Function Route for an Agent
put/v2/gen-ai/agents/{agent_uuid}/functions/{function_uuid}
Delete Function Route for an Agent
delete/v2/gen-ai/agents/{agent_uuid}/functions/{function_uuid}

AgentsVersions

List Agent Versions
get/v2/gen-ai/agents/{uuid}/versions
Rollback to Agent Version
put/v2/gen-ai/agents/{uuid}/versions

AgentsKnowledge Bases

Attach Knowledge Bases to an Agent
post/v2/gen-ai/agents/{agent_uuid}/knowledge_bases
Attach Knowledge Base to an Agent
post/v2/gen-ai/agents/{agent_uuid}/knowledge_bases/{knowledge_base_uuid}
Detach Knowledge Base from an Agent
delete/v2/gen-ai/agents/{agent_uuid}/knowledge_bases/{knowledge_base_uuid}

AgentsRoutes

Update Agent Route for an Agent
put/v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}
Add Agent Route to an Agent
post/v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}
Delete Agent Route for an Agent
delete/v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}
View Agent Routes
get/v2/gen-ai/agents/{uuid}/child_agents

Chat

Images

Creates an image given a prompt
post/images/generations

GPU Droplets

List All Droplets
get/v2/droplets
Create a New Droplet
post/v2/droplets
Deleting Droplets by Tag
delete/v2/droplets
Retrieve an Existing Droplet
get/v2/droplets/{droplet_id}
Delete an Existing Droplet
delete/v2/droplets/{droplet_id}
List Snapshots for a Droplet
get/v2/droplets/{droplet_id}/snapshots
List All Available Kernels for a Droplet
get/v2/droplets/{droplet_id}/kernels
List all Firewalls Applied to a Droplet
get/v2/droplets/{droplet_id}/firewalls
List Neighbors for a Droplet
get/v2/droplets/{droplet_id}/neighbors

GPU DropletsBackups

List Backups for a Droplet
get/v2/droplets/{droplet_id}/backups
Retrieve the Backup Policy for an Existing Droplet
get/v2/droplets/{droplet_id}/backups/policy
List Backup Policies for All Existing Droplets
get/v2/droplets/backups/policies
List Supported Droplet Backup Policies
get/v2/droplets/backups/supported_policies

GPU DropletsActions

List Actions for a Droplet
get/v2/droplets/{droplet_id}/actions
Initiate a Droplet Action
post/v2/droplets/{droplet_id}/actions
Acting on Tagged Droplets
post/v2/droplets/actions
Retrieve a Droplet Action
get/v2/droplets/{droplet_id}/actions/{action_id}

GPU DropletsDestroy With Associated Resources

List Associated Resources for a Droplet
get/v2/droplets/{droplet_id}/destroy_with_associated_resources
Selectively Destroy a Droplet and its Associated Resources
delete/v2/droplets/{droplet_id}/destroy_with_associated_resources/selective
Destroy a Droplet and All of its Associated Resources (Dangerous)
delete/v2/droplets/{droplet_id}/destroy_with_associated_resources/dangerous
Check Status of a Droplet Destroy with Associated Resources Request
get/v2/droplets/{droplet_id}/destroy_with_associated_resources/status
Retry a Droplet Destroy with Associated Resources Request
post/v2/droplets/{droplet_id}/destroy_with_associated_resources/retry

GPU DropletsAutoscale

List All Autoscale Pools
get/v2/droplets/autoscale
Create a New Autoscale Pool
post/v2/droplets/autoscale
Retrieve an Existing Autoscale Pool
get/v2/droplets/autoscale/{autoscale_pool_id}
Update Autoscale Pool
put/v2/droplets/autoscale/{autoscale_pool_id}
Delete autoscale pool
delete/v2/droplets/autoscale/{autoscale_pool_id}
Delete autoscale pool and resources
delete/v2/droplets/autoscale/{autoscale_pool_id}/dangerous
List members
get/v2/droplets/autoscale/{autoscale_pool_id}/members
List history events
get/v2/droplets/autoscale/{autoscale_pool_id}/history

GPU DropletsFirewalls

List All Firewalls
get/v2/firewalls
Create a New Firewall
post/v2/firewalls
Retrieve an Existing Firewall
get/v2/firewalls/{firewall_id}
Update a Firewall
put/v2/firewalls/{firewall_id}
Delete a Firewall
delete/v2/firewalls/{firewall_id}

GPU DropletsFirewallsDroplets

Add Droplets to a Firewall
post/v2/firewalls/{firewall_id}/droplets
Remove Droplets from a Firewall
delete/v2/firewalls/{firewall_id}/droplets

GPU DropletsFirewallsTags

Add Tags to a Firewall
post/v2/firewalls/{firewall_id}/tags
Remove Tags from a Firewall
delete/v2/firewalls/{firewall_id}/tags

GPU DropletsFirewallsRules

Add Rules to a Firewall
post/v2/firewalls/{firewall_id}/rules
Remove Rules from a Firewall
delete/v2/firewalls/{firewall_id}/rules

GPU DropletsFloating IPs

List All Floating IPs
get/v2/floating_ips
Create a New Floating IP
post/v2/floating_ips
Retrieve an Existing Floating IP
get/v2/floating_ips/{floating_ip}
Delete a Floating IP
delete/v2/floating_ips/{floating_ip}

GPU DropletsFloating IPsActions

List All Actions for a Floating IP
get/v2/floating_ips/{floating_ip}/actions
Initiate a Floating IP Action
post/v2/floating_ips/{floating_ip}/actions
Retrieve an Existing Floating IP Action
get/v2/floating_ips/{floating_ip}/actions/{action_id}

GPU DropletsImages

List All Images
get/v2/images
Create a Custom Image
post/v2/images
Retrieve an Existing Image
get/v2/images/{image_id}
Update an Image
put/v2/images/{image_id}
Delete an Image
delete/v2/images/{image_id}

GPU DropletsImagesActions

List All Actions for an Image
get/v2/images/{image_id}/actions
Initiate an Image Action
post/v2/images/{image_id}/actions
Retrieve an Existing Action
get/v2/images/{image_id}/actions/{action_id}

GPU DropletsLoad Balancers

Create a New Load Balancer
post/v2/load_balancers
List All Load Balancers
get/v2/load_balancers
Retrieve an Existing Load Balancer
get/v2/load_balancers/{lb_id}
Update a Load Balancer
put/v2/load_balancers/{lb_id}
Delete a Load Balancer
delete/v2/load_balancers/{lb_id}
Delete a Global Load Balancer CDN Cache
delete/v2/load_balancers/{lb_id}/cache

GPU DropletsLoad BalancersDroplets

Add Droplets to a Load Balancer
post/v2/load_balancers/{lb_id}/droplets
Remove Droplets from a Load Balancer
delete/v2/load_balancers/{lb_id}/droplets

GPU DropletsLoad BalancersForwarding Rules

Add Forwarding Rules to a Load Balancer
post/v2/load_balancers/{lb_id}/forwarding_rules
Remove Forwarding Rules from a Load Balancer
delete/v2/load_balancers/{lb_id}/forwarding_rules

GPU DropletsSizes

GPU DropletsSnapshots

List All Snapshots
get/v2/snapshots
Retrieve an Existing Snapshot
get/v2/snapshots/{snapshot_id}
Delete a Snapshot
delete/v2/snapshots/{snapshot_id}

GPU DropletsVolumes

GPU DropletsVolumesActions

List All Actions for a Volume
get/v2/volumes/{volume_id}/actions
Initiate A Block Storage Action By Volume Id
post/v2/volumes/{volume_id}/actions
Retrieve an Existing Volume Action
get/v2/volumes/{volume_id}/actions/{action_id}

GPU DropletsVolumesSnapshots

Retrieve an Existing Volume Snapshot
get/v2/volumes/snapshots/{snapshot_id}
Delete a Volume Snapshot
delete/v2/volumes/snapshots/{snapshot_id}
List Snapshots for a Volume
get/v2/volumes/{volume_id}/snapshots
Create Snapshot from a Volume
post/v2/volumes/{volume_id}/snapshots

GPU DropletsAccount

GPU DropletsAccountKeys

List All SSH Keys
get/v2/account/keys
Create a New SSH Key
post/v2/account/keys
Retrieve an Existing SSH Key
get/v2/account/keys/{ssh_key_identifier}
Update an SSH Key's Name
put/v2/account/keys/{ssh_key_identifier}
Delete an SSH Key
delete/v2/account/keys/{ssh_key_identifier}

Inference

InferenceAPI Keys

List Model API Keys
get/v2/gen-ai/models/api_keys
Create a Model API Key
post/v2/gen-ai/models/api_keys
Update API Key for a Model
put/v2/gen-ai/models/api_keys/{api_key_uuid}
Delete API Key for a Model
delete/v2/gen-ai/models/api_keys/{api_key_uuid}
Regenerate API Key for a Model
put/v2/gen-ai/models/api_keys/{api_key_uuid}/regenerate

Knowledge Bases

List Knowledge Bases
get/v2/gen-ai/knowledge_bases
Create a Knowledge Base
post/v2/gen-ai/knowledge_bases
Retrieve Information About an Existing Knowledge Base
get/v2/gen-ai/knowledge_bases/{uuid}
Update a Knowledge Base
put/v2/gen-ai/knowledge_bases/{uuid}
Delete a Knowledge Base
delete/v2/gen-ai/knowledge_bases/{uuid}
List Indexing Jobs for a Knowledge Base
get/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/indexing_jobs

Knowledge BasesData Sources

List Data Sources for a Knowledge Base
get/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources
Add Data Source to a Knowledge Base
post/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources
Delete a Data Source from a Knowledge Base
delete/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources/{data_source_uuid}
Create Presigned URLs for Data Source File Upload
post/v2/gen-ai/knowledge_bases/data_sources/file_upload_presigned_urls

Knowledge BasesIndexing Jobs

List Indexing Jobs for a Knowledge Base
get/v2/gen-ai/indexing_jobs
Start Indexing Job for a Knowledge Base
post/v2/gen-ai/indexing_jobs
List Data Sources for Indexing Job for a Knowledge Base
get/v2/gen-ai/indexing_jobs/{indexing_job_uuid}/data_sources
Cancel Indexing Job for a Knowledge Base
put/v2/gen-ai/indexing_jobs/{uuid}/cancel
Get Signed URL for Indexing Job Details
get/v2/gen-ai/indexing_jobs/{indexing_job_uuid}/details_signed_url

Models

List Available Models
get/v2/gen-ai/models

ModelsProviders

ModelsProvidersAnthropic

List Anthropic API Keys
get/v2/gen-ai/anthropic/keys
Create Anthropic API Key
post/v2/gen-ai/anthropic/keys
Get Anthropic API Key
get/v2/gen-ai/anthropic/keys/{api_key_uuid}
Update Anthropic API Key
put/v2/gen-ai/anthropic/keys/{api_key_uuid}
Delete Anthropic API Key
delete/v2/gen-ai/anthropic/keys/{api_key_uuid}
List agents by Anthropic key
get/v2/gen-ai/anthropic/keys/{uuid}/agents

ModelsProvidersOpenAI

List OpenAI API Keys
get/v2/gen-ai/openai/keys
Create OpenAI API Key
post/v2/gen-ai/openai/keys
Get OpenAI API Key
get/v2/gen-ai/openai/keys/{api_key_uuid}
Update OpenAI API Key
put/v2/gen-ai/openai/keys/{api_key_uuid}
Delete OpenAI API Key
delete/v2/gen-ai/openai/keys/{api_key_uuid}
List agents by OpenAI key
get/v2/gen-ai/openai/keys/{uuid}/agents

Regions

Databases

DatabasesSchema Registry

DatabasesSchema RegistryConfig

Retrieve Schema Registry Configuration for a kafka Cluster
get/v2/databases/{database_cluster_uuid}/schema-registry/config
Update Schema Registry Configuration for a kafka Cluster
put/v2/databases/{database_cluster_uuid}/schema-registry/config
Retrieve Schema Registry Configuration for a Subject of kafka Cluster
get/v2/databases/{database_cluster_uuid}/schema-registry/config/{subject_name}
Update Schema Registry Configuration for a Subject of kafka Cluster
put/v2/databases/{database_cluster_uuid}/schema-registry/config/{subject_name}

Nfs

Get an NFS share
get/v2/nfs/{nfs_id}
Delete an NFS share
delete/v2/nfs/{nfs_id}
Initiate an NFS action
post/v2/nfs/{nfs_id}/actions

NfsSnapshots

List NFS snapshots per region
get/v2/nfs/snapshots
Get an NFS snapshot by ID
get/v2/nfs/snapshots/{nfs_snapshot_id}
Delete an NFS snapshot
delete/v2/nfs/snapshots/{nfs_snapshot_id}