GradientAI Platform
Generated on 25 May 2026
The API lets you build GPU-powered AI agents with pre-built or custom foundation models, function and agent routes, and RAG pipelines with knowledge bases.
https://api.digitalocean.com
Endpoints
GET List Agents
/v2/gen-ai/agents
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To list all agents, send a GET request to /v2/gen-ai/agents.
Query Parameters
only_deployed
optional
trueOnly list agents that are deployed.
page
optional
1Page number.
per_page
optional
1Items per page.
Request: /v2/gen-ai/agents
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/agents"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
agents
optional
Agents
Show child properties
chatbot
optional
A Chatbot
Show child properties
allowed_domains
optional
["example string"]button_background_color
optional
example stringlogo
optional
example stringname
optional
example nameName of chatbot
primary_color
optional
example stringsecondary_color
optional
example stringstarting_message
optional
example stringchatbot_identifiers
optional
Chatbot identifiers
Show child properties
agent_chatbot_identifier
optional
123e4567-e89b-12d3-a456-426614174000Agent chatbot identifier
created_at
optional
2021-01-01T00:00:00ZCreation date / time
deployment
optional
Description of deployment
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date / time
name
optional
example nameName
status
optional
STATUS_UNKNOWNupdated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your deployed agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
visibility
optional
VISIBILITY_UNKNOWN- VISIBILITY_UNKNOWN: The status of the deployment is unknown
- VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests
- VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state
- VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet
- VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys
description
optional
This is a chatbot that can help you with your questions.Description of agent
if_case
optional
if talking about the weather use this routeInstructions to the agent on how to use the route
instruction
optional
Hello, how can I help you?Agent instruction. Instructions help your agent to perform its job effectively. See Write Effective Agent Instructions for best practices.
k
optional
5How many results should be considered from an attached knowledge base
max_tokens
optional
100Specifies the maximum number of tokens the model can process in a single input or output, set as a number between 1 and 512. This determines the length of each response.
mcp_servers
optional
MCP (Model Context Protocol) servers attached to this agent
Show child properties
allowed_tools
optional
["example string"]Optional list of allowed tool names to expose from this server
authorization
optional
example stringOptional authorization header value for the MCP server
headers
optional
Optional additional headers to send to the MCP server
server_label
optional
example stringA label identifying this MCP server
server_url
optional
example stringThe URL of the MCP server
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
Show child properties
description
optional
example stringname
optional
example nameurl
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
Show child properties
capabilities
optional
["example string"]Capabilities supported by this endpoint (e.g. input_text, output_text, input_image)
endpoint
optional
/chat/responsesThe endpoint path (e.g. /chat/responses)
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
Show child properties
input
optional
["example string"]output
optional
["example string"]name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
Show child properties
default_string
optional
example stringString default value (for type="dropdown", e.g. "medium")
default_value
optional
0.7Numeric default value (for type="number")
max
optional
1Maximum allowed value (for type="number")
min
optional
0Minimum allowed value (for type="number")
name
optional
temperatureSetting key name (e.g. "max_tokens", "temperature", "resolution")
options
optional
["example string"]Allowed values for dropdown selections (for type="dropdown")
step
optional
123Step increment for numeric settings (for type="number")
type
optional
numberSetting value type: "number" or "dropdown"
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
Show child properties
major
optional
123Major version number
minor
optional
123Minor version number
patch
optional
123Patch version number
model_router
optional
Model router
Show child properties
config
optional
Show child properties
fallback_models
optional
["example string"]Router-level fallback models
policies
optional
Task routing policies
created_at
optional
2023-01-01T00:00:00ZCreation date / time
description
optional
example stringDescription
name
optional
example nameName of the model router
regions
optional
["example string"]Target regions for the router
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
My AgentAgent name
project_id
optional
12345678-1234-1234-1234-123456789012The DigitalOcean project ID associated with the agent
provide_citations
optional
trueWhether the agent should provide in-response citations
reasoning_effort
optional
"low"The reasoning effort for the agent
region
optional
"tor1"Region code
retrieval_method
optional
RETRIEVAL_METHOD_UNKNOWN- RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown
- RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite
- RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back
- RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries
- RETRIEVAL_METHOD_NONE: The retrieval method is none
route_created_at
optional
2021-01-01T00:00:00ZCreation of route date / time
route_created_by
optional
12345678Id of user that created the route
route_name
optional
Route NameRoute name
route_uuid
optional
"12345678-1234-1234-1234-123456789012"Route uuid
tags
optional
["example string"]A set of abitrary tags to organize your agent
temperature
optional
0.5Controls the model’s creativity, specified as a number between 0 and 1. Lower values produce more predictable and conservative responses, while higher values encourage creativity and variation.
template
optional
Represents an AgentTemplate entity
Show child properties
created_at
optional
2023-01-01T00:00:00ZThe agent template's creation date
description
optional
example stringDeprecated - Use summary instead
guardrails
optional
List of guardrails associated with the agent template
Show child properties
priority
optional
123Priority of the guardrail
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the guardrail
instruction
optional
example stringInstructions for the agent template
k
optional
123The 'k' value for the agent template
knowledge_bases
optional
List of knowledge bases associated with the agent template
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
long_description
optional
The long description of the agent template
max_tokens
optional
123The max_tokens setting for the agent template
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the agent template
short_description
optional
The short description of the agent template
summary
optional
example stringThe summary of the agent template
tags
optional
["example string"]List of tags associated with the agent template
temperature
optional
123The temperature setting for the agent template
template_type
optional
AGENT_TEMPLATE_TYPE_STANDARD- AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template
- AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template
top_p
optional
123The top_p setting for the agent template
updated_at
optional
2023-01-01T00:00:00ZThe agent template's last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
thinking_token_budget
optional
1000The thinking token budget for Anthropic extended thinking (0 = disabled)
top_p
optional
0.9Defines the cumulative probability threshold for word selection, specified as a number between 0 and 1. Higher values allow for more diverse outputs, while lower values ensure focused and coherent responses.
updated_at
optional
2021-01-01T00:00:00ZLast modified
url
optional
https://example.com/agentAccess your agent under this url
user_id
optional
12345678Id of user that created the agent
uuid
optional
"12345678-1234-1234-1234-123456789012"Unique agent id
version_hash
optional
example stringThe latest version of the agent
links
optional
Links to other pages
Show child properties
pages
optional
Information about how to reach other pages
Show child properties
first
optional
example stringFirst page
last
optional
example stringLast page
next
optional
example stringNext page
previous
optional
example stringPrevious page
meta
optional
Meta information about the data set
Show child properties
page
optional
123The current page
pages
optional
123Total number of pages
total
optional
123Total amount of items over all pages
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"agents": [
{
"chatbot_identifiers": [],
"created_at": "2021-01-01T00:00:00Z",
"description": "This is a chatbot that can help you with your questions.",
"if_case": "if talking about the weather use this route",
"instruction": "Hello, how can I help you?",
"k": 5,
"max_tokens": 100,
"mcp_servers": [],
"name": "My Agent",
"project_id": "12345678-1234-1234-1234-123456789012",
"provide_citations": true,
"reasoning_effort": "\"low\"",
"region": "\"tor1\"",
"retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",
"route_created_at": "2021-01-01T00:00:00Z",
"route_created_by": "12345678",
"route_name": "Route Name",
"route_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"tags": [
"example string"
],
"temperature": 0.5,
"thinking_token_budget": 1000,
"top_p": 0.9,
"updated_at": "2021-01-01T00:00:00Z",
"url": "https://example.com/agent",
"user_id": "12345678",
"uuid": "\"12345678-1234-1234-1234-123456789012\"",
"version_hash": "example string"
}
],
"links": {
"pages": {
"first": "example string",
"last": "example string",
"next": "example string",
"previous": "example string"
}
},
"meta": {
"page": 123,
"pages": 123,
"total": 123
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}POST Create an Agent
/v2/gen-ai/agents
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To create a new agent, send a POST request to /v2/gen-ai/agents. The response body contains a JSON object with the newly created agent object.
Request Body: application/json
anthropic_key_uuid
optional
"12345678-1234-1234-1234-123456789012"Optional Anthropic API key ID to use with Anthropic models
description
optional
"My Agent Description"A text description of the agent, not used in inference
instruction
optional
"You are an agent who thinks deeply about the world"Agent instruction. Instructions help your agent to perform its job effectively. See Write Effective Agent Instructions for best practices.
knowledge_base_uuid
optional
["example string"]Ids of the knowledge base(s) to attach to the agent
mcp_servers
optional
MCP (Model Context Protocol) servers to attach to the agent
Show child properties
allowed_tools
optional
["example string"]Optional list of allowed tool names to expose from this server
authorization
optional
example stringOptional authorization header value for the MCP server
headers
optional
Optional additional headers to send to the MCP server
server_label
optional
example stringA label identifying this MCP server
server_url
optional
example stringThe URL of the MCP server
model_provider_key_uuid
optional
"12345678-1234-1234-1234-123456789012"model_router_uuid
optional
"12345678-1234-1234-1234-123456789012"model_uuid
optional
"12345678-1234-1234-1234-123456789012"Identifier for the foundation model.
name
optional
"My Agent"Agent name
open_ai_key_uuid
optional
"12345678-1234-1234-1234-123456789012"Optional OpenAI API key ID to use with OpenAI models
project_id
optional
"12345678-1234-1234-1234-123456789012"The id of the DigitalOcean project this agent will belong to
reasoning_effort
optional
"low"region
optional
"tor1"The DigitalOcean region to deploy your agent in
router_preset_slug
optional
"general"tags
optional
["example string"]Agent tag to organize related resources
thinking_token_budget
optional
123workspace_uuid
optional
123e4567-e89b-12d3-a456-426614174000Identifier for the workspace
Request: /v2/gen-ai/agents
{
"anthropic_key_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"description": "\"My Agent Description\"",
"instruction": "\"You are an agent who thinks deeply about the world\"",
"knowledge_base_uuid": [
"example string"
],
"mcp_servers": [
{
"allowed_tools": [
"example string"
],
"authorization": "example string",
"server_label": "example string",
"server_url": "example string"
}
],
"model_provider_key_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"model_router_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"model_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"name": "\"My Agent\"",
"open_ai_key_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"project_id": "\"12345678-1234-1234-1234-123456789012\"",
"reasoning_effort": "\"low\"",
"region": "\"tor1\"",
"router_preset_slug": "\"general\"",
"tags": [
"example string"
],
"thinking_token_budget": 123,
"workspace_uuid": "123e4567-e89b-12d3-a456-426614174000"
}curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/agents" \
-d '{
"name": "api-create",
"model_uuid": "95ea6652-75ed-11ef-bf8f-4e013e2ddde4",
"instruction": "be a weather reporter",
"description": "weather-agent",
"project_id": "37455431-84bd-4fa2-94cf-e8486f8f8c5e",
"tags": [
"tag1"
],
"region": "tor1",
"knowledge_base_uuid": [
"9758a232-b351-11ef-bf8f-4e013e2ddde4"
]
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
agent
optional
An Agent
Show child properties
anthropic_api_key
optional
Anthropic API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_key_infos
optional
Api key infos
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_keys
optional
Api keys
Show child properties
api_key
optional
example stringApi key
chatbot
optional
A Chatbot
Show child properties
allowed_domains
optional
["example string"]button_background_color
optional
example stringlogo
optional
example stringname
optional
example nameName of chatbot
primary_color
optional
example stringsecondary_color
optional
example stringstarting_message
optional
example stringchatbot_identifiers
optional
Chatbot identifiers
Show child properties
agent_chatbot_identifier
optional
123e4567-e89b-12d3-a456-426614174000Agent chatbot identifier
child_agents
optional
Child agents
conversation_logs_enabled
optional
trueWhether conversation logs are enabled for the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
deployment
optional
Description of deployment
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date / time
name
optional
example nameName
status
optional
STATUS_UNKNOWNupdated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your deployed agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
visibility
optional
VISIBILITY_UNKNOWN- VISIBILITY_UNKNOWN: The status of the deployment is unknown
- VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests
- VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state
- VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet
- VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys
description
optional
example stringDescription of agent
functions
optional
Show child properties
api_key
optional
example stringApi key
created_at
optional
2023-01-01T00:00:00ZCreation date / time
created_by
optional
12345Created by user id from DO
description
optional
example stringAgent description
faas_name
optional
example namefaas_namespace
optional
example nameinput_schema
optional
name
optional
example nameName
output_schema
optional
updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringDownload your agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
guardrails
optional
The guardrails the agent is attached to
Show child properties
agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000created_at
optional
2023-01-01T00:00:00Zdefault_response
optional
example stringdescription
optional
example stringguardrail_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_attached
optional
trueis_default
optional
truemetadata
optional
name
optional
example namepriority
optional
123type
optional
GUARDRAIL_TYPE_UNKNOWNupdated_at
optional
2023-01-01T00:00:00Zuuid
optional
123e4567-e89b-12d3-a456-426614174000if_case
optional
example stringinstruction
optional
example stringAgent instruction. Instructions help your agent to perform its job effectively. See Write Effective Agent Instructions for best practices.
k
optional
123knowledge_bases
optional
Knowledge bases
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
Show child properties
completed_datasources
optional
123Number of datasources indexed completed
created_at
optional
2023-01-01T00:00:00ZCreation date / time
data_source_jobs
optional
Details on Data Sources included in the Indexing Job
data_source_uuids
optional
["example string"]finished_at
optional
2023-01-01T00:00:00Zis_report_available
optional
trueBoolean value to determine if the indexing job details are available
knowledge_base_uuid
optional
123e4567-e89b-12d3-a456-426614174000Knowledge base id
phase
optional
BATCH_JOB_PHASE_UNKNOWNstarted_at
optional
2023-01-01T00:00:00Zstatus
optional
INDEX_JOB_STATUS_UNKNOWNtokens
optional
123Number of tokens [This field is deprecated]
total_datasources
optional
123Number of datasources being indexed
total_tokens
optional
12345Total Tokens Consumed By the Indexing Job
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
Show child properties
enabled
optional
trueWhether reranking is enabled for retrieval
model
optional
"bge-reranker-v2-m3"Reranker model internal name
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
logging_config
optional
Show child properties
galileo_project_id
optional
123e4567-e89b-12d3-a456-426614174000Galileo project identifier
galileo_project_name
optional
example nameName of the Galileo project
insights_enabled
optional
trueWhether insights are enabled
insights_enabled_at
optional
2023-01-01T00:00:00ZTimestamp when insights were enabled
log_stream_id
optional
123e4567-e89b-12d3-a456-426614174000Identifier for the log stream
log_stream_name
optional
example nameName of the log stream
max_tokens
optional
123mcp_servers
optional
MCP (Model Context Protocol) servers attached to this agent
Show child properties
allowed_tools
optional
["example string"]Optional list of allowed tool names to expose from this server
authorization
optional
example stringOptional authorization header value for the MCP server
headers
optional
Optional additional headers to send to the MCP server
server_label
optional
example stringA label identifying this MCP server
server_url
optional
example stringThe URL of the MCP server
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
Show child properties
description
optional
example stringname
optional
example nameurl
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
Show child properties
capabilities
optional
["example string"]Capabilities supported by this endpoint (e.g. input_text, output_text, input_image)
endpoint
optional
/chat/responsesThe endpoint path (e.g. /chat/responses)
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
Show child properties
input
optional
["example string"]output
optional
["example string"]name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
Show child properties
default_string
optional
example stringString default value (for type="dropdown", e.g. "medium")
default_value
optional
0.7Numeric default value (for type="number")
max
optional
1Maximum allowed value (for type="number")
min
optional
0Minimum allowed value (for type="number")
name
optional
temperatureSetting key name (e.g. "max_tokens", "temperature", "resolution")
options
optional
["example string"]Allowed values for dropdown selections (for type="dropdown")
step
optional
123Step increment for numeric settings (for type="number")
type
optional
numberSetting value type: "number" or "dropdown"
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
Show child properties
major
optional
123Major version number
minor
optional
123Minor version number
patch
optional
123Patch version number
model_provider_key
optional
Show child properties
api_key_uuid
optional
123e4567-e89b-12d3-a456-426614174000API key ID
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the key
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_at
optional
2023-01-01T00:00:00ZKey last updated date
model_router
optional
Model router
Show child properties
config
optional
Show child properties
fallback_models
optional
["example string"]Router-level fallback models
policies
optional
Task routing policies
created_at
optional
2023-01-01T00:00:00ZCreation date / time
description
optional
example stringDescription
name
optional
example nameName of the model router
regions
optional
["example string"]Target regions for the router
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameAgent name
openai_api_key
optional
OpenAI API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
parent_agents
optional
Parent agents
project_id
optional
123e4567-e89b-12d3-a456-426614174000provide_citations
optional
trueWhether the agent should provide in-response citations
reasoning_effort
optional
example stringThe reasoning effort for the agent
region
optional
example stringRegion code
retrieval_method
optional
RETRIEVAL_METHOD_UNKNOWN- RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown
- RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite
- RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back
- RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries
- RETRIEVAL_METHOD_NONE: The retrieval method is none
route_created_at
optional
2023-01-01T00:00:00ZCreation of route date / time
route_created_by
optional
12345route_name
optional
example nameRoute name
route_uuid
optional
123e4567-e89b-12d3-a456-426614174000tags
optional
["example string"]Agent tag to organize related resources
temperature
optional
123template
optional
Represents an AgentTemplate entity
Show child properties
created_at
optional
2023-01-01T00:00:00ZThe agent template's creation date
description
optional
example stringDeprecated - Use summary instead
guardrails
optional
List of guardrails associated with the agent template
Show child properties
priority
optional
123Priority of the guardrail
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the guardrail
instruction
optional
example stringInstructions for the agent template
k
optional
123The 'k' value for the agent template
knowledge_bases
optional
List of knowledge bases associated with the agent template
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
long_description
optional
The long description of the agent template
max_tokens
optional
123The max_tokens setting for the agent template
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the agent template
short_description
optional
The short description of the agent template
summary
optional
example stringThe summary of the agent template
tags
optional
["example string"]List of tags associated with the agent template
temperature
optional
123The temperature setting for the agent template
template_type
optional
AGENT_TEMPLATE_TYPE_STANDARD- AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template
- AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template
top_p
optional
123The top_p setting for the agent template
updated_at
optional
2023-01-01T00:00:00ZThe agent template's last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
thinking_token_budget
optional
123The thinking token budget for Anthropic extended thinking (0 = disabled)
top_p
optional
123updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your agent under this url
user_id
optional
12345Id of user that created the agent
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique agent id
version_hash
optional
example stringThe latest version of the agent
vpc_egress_ips
optional
["example string"]VPC Egress IPs
vpc_uuid
optional
"12345678-1234-1234-1234-123456789012"workspace
optional
Show child properties
agents
optional
Agents
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345The id of user who created this workspace
created_by_email
optional
[email protected]The email of the user who created this workspace
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
description
optional
example stringDescription of the workspace
evaluation_test_cases
optional
Evaluations
Show child properties
archived_at
optional
2023-01-01T00:00:00Zcreated_at
optional
2023-01-01T00:00:00Zcreated_by_user_email
optional
[email protected]created_by_user_id
optional
12345dataset
optional
dataset_name
optional
example namedataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000description
optional
example stringlatest_version_number_of_runs
optional
123metrics
optional
name
optional
example namestar_metric
optional
test_case_uuid
optional
123e4567-e89b-12d3-a456-426614174000total_runs
optional
123updated_at
optional
2023-01-01T00:00:00Zupdated_by_user_email
optional
[email protected]updated_by_user_id
optional
12345version
optional
123name
optional
example nameName of the workspace
updated_at
optional
2023-01-01T00:00:00ZUpdate date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"agent": {
"anthropic_api_key": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"api_key_infos": [],
"api_keys": [],
"chatbot": {
"allowed_domains": [
"example string"
],
"button_background_color": "example string",
"logo": "example string",
"name": "example name",
"primary_color": "example string",
"secondary_color": "example string",
"starting_message": "example string"
},
"chatbot_identifiers": [],
"child_agents": [],
"conversation_logs_enabled": true,
"created_at": "2023-01-01T00:00:00Z",
"deployment": {
"created_at": "2023-01-01T00:00:00Z",
"name": "example name",
"status": "STATUS_UNKNOWN",
"updated_at": "2023-01-01T00:00:00Z",
"url": "example string",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"visibility": "VISIBILITY_UNKNOWN"
},
"description": "example string",
"functions": [],
"guardrails": [],
"if_case": "example string",
"instruction": "example string",
"k": 123,
"knowledge_bases": [],
"logging_config": {
"galileo_project_id": "123e4567-e89b-12d3-a456-426614174000",
"galileo_project_name": "example name",
"insights_enabled": true,
"insights_enabled_at": "2023-01-01T00:00:00Z",
"log_stream_id": "123e4567-e89b-12d3-a456-426614174000",
"log_stream_name": "example name"
},
"max_tokens": 123,
"mcp_servers": [],
"model": {
"capabilities": [
"example string"
],
"context_window": "12345",
"created_at": "2023-01-01T00:00:00Z",
"endpoints": [],
"inference_name": "example name",
"inference_version": "example string",
"is_foundational": true,
"kb_default_chunk_size": 123,
"kb_max_chunk_size": 123,
"kb_min_chunk_size": 123,
"lifecycle_status": "example string",
"name": "example name",
"parameter_count": 123,
"parent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"reasoning_efforts": [
"example string"
],
"settings": [],
"thinking": true,
"type": "example string",
"updated_at": "2023-01-01T00:00:00Z",
"upload_complete": true,
"url": "example string",
"usecases": [
"MODEL_USECASE_AGENT",
"MODEL_USECASE_GUARDRAIL"
],
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"model_provider_key": {
"api_key_uuid": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [],
"name": "example name",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"updated_at": "2023-01-01T00:00:00Z"
},
"model_router": {
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"name": "example name",
"regions": [
"example string"
],
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"name": "example name",
"openai_api_key": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"parent_agents": [],
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"provide_citations": true,
"reasoning_effort": "example string",
"region": "example string",
"retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",
"route_created_at": "2023-01-01T00:00:00Z",
"route_created_by": "12345",
"route_name": "example name",
"route_uuid": "123e4567-e89b-12d3-a456-426614174000",
"tags": [
"example string"
],
"temperature": 123,
"template": {
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"guardrails": [],
"instruction": "example string",
"k": 123,
"knowledge_bases": [],
"long_description": "\"Enhance your customer service with an AI agent designed to provide consistent, helpful, and accurate support across multiple channels. This template creates an agent that can answer product questions, troubleshoot common issues, process simple requests, and maintain a friendly, on-brand voice throughout customer interactions. Reduce response times, handle routine inquiries efficiently, and ensure your customers feel heard and helped.\"",
"max_tokens": 123,
"name": "example name",
"short_description": "\"This template has been designed with question-answer and conversational use cases in mind. It comes with validated agent instructions, fine-tuned model settings, and preconfigured guardrails defined for customer support-related use cases.\"",
"summary": "example string",
"tags": [
"example string"
],
"temperature": 123,
"template_type": "AGENT_TEMPLATE_TYPE_STANDARD",
"top_p": 123,
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"thinking_token_budget": 123,
"top_p": 123,
"updated_at": "2023-01-01T00:00:00Z",
"url": "example string",
"user_id": "12345",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"version_hash": "example string",
"vpc_egress_ips": [
"example string"
],
"vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"workspace": {
"agents": [],
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"created_by_email": "[email protected]",
"deleted_at": "2023-01-01T00:00:00Z",
"description": "example string",
"evaluation_test_cases": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET List Agent API Keys
/v2/gen-ai/agents/{agent_uuid}/api_keys
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To list all agent API keys, send a GET request to /v2/gen-ai/agents/{agent_uuid}/api_keys.
Path Parameters
agent_uuid
required
"123e4567-e89b-12d3-a456-426614174000"Agent id
Query Parameters
page
optional
1Page number.
per_page
optional
1Items per page.
Request: /v2/gen-ai/agents/{agent_uuid}/api_keys
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/agents/c441bf77-81d6-11ef-bf8f-4e013e2ddde4/api_keys"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
api_key_infos
optional
Api key infos
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
links
optional
Links to other pages
Show child properties
pages
optional
Information about how to reach other pages
Show child properties
first
optional
example stringFirst page
last
optional
example stringLast page
next
optional
example stringNext page
previous
optional
example stringPrevious page
meta
optional
Meta information about the data set
Show child properties
page
optional
123The current page
pages
optional
123Total number of pages
total
optional
123Total amount of items over all pages
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"api_key_infos": [
{
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"name": "example name",
"secret_key": "example string",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
],
"links": {
"pages": {
"first": "example string",
"last": "example string",
"next": "example string",
"previous": "example string"
}
},
"meta": {
"page": 123,
"pages": 123,
"total": 123
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}POST Create an Agent API Key
/v2/gen-ai/agents/{agent_uuid}/api_keys
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To create an agent API key, send a POST request to /v2/gen-ai/agents/{agent_uuid}/api_keys.
Path Parameters
agent_uuid
required
"123e4567-e89b-12d3-a456-426614174000"Agent id
Request Body: application/json
agent_uuid
optional
"12345678-1234-1234-1234-123456789012"Agent id
name
optional
Production KeyA human friendly name to identify the key
Request: /v2/gen-ai/agents/{agent_uuid}/api_keys
{
"agent_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"name": "Production Key"
}curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/agents/1b418231-b7d6-11ef-bf8f-4e013e2ddde4/api_keys" \
-d '{
"agent_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4",
"name": "test-key"
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
api_key_info
optional
Agent API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"api_key_info": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"name": "example name",
"secret_key": "example string",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}PUT Update API Key for an Agent
/v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To update an agent API key, send a PUT request to /v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}.
Path Parameters
agent_uuid
required
"123e4567-e89b-12d3-a456-426614174000"Agent id
api_key_uuid
required
"123e4567-e89b-12d3-a456-426614174000"API key ID
Request Body: application/json
agent_uuid
optional
"12345678-1234-1234-1234-123456789012"Agent id
api_key_uuid
optional
"12345678-1234-1234-1234-123456789012"API key ID
name
optional
"Production Key"Name
Request: /v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}
{
"agent_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"api_key_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"name": "\"Production Key\""
}curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/agents/1b418231-b7d6-11ef-bf8f-4e013e2ddde4/api_keys/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4" \
-d '{
"agent_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4",
"api_key_uuid": "11efb7d6-cdb5-6388-bf8f-4e013e2ddde4",
"name": "test-key2"
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
api_key_info
optional
Agent API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"api_key_info": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"name": "example name",
"secret_key": "example string",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}DELETE Delete API Key for an Agent
/v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To delete an API key for an agent, send a DELETE request to /v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}.
Path Parameters
agent_uuid
required
"123e4567-e89b-12d3-a456-426614174000"A unique identifier for your agent.
api_key_uuid
required
"123e4567-e89b-12d3-a456-426614174000"API key for an agent.
Request: /v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}
curl -X DELETE \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/agents/1b418231-b7d6-11ef-bf8f-4e013e2ddde4/api_keys/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
api_key_info
optional
Agent API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"api_key_info": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"name": "example name",
"secret_key": "example string",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}PUT Regenerate API Key for an Agent
/v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}/regenerate
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To regenerate an agent API key, send a PUT request to /v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}/regenerate.
Path Parameters
agent_uuid
required
"123e4567-e89b-12d3-a456-426614174000"Agent id
api_key_uuid
required
"123e4567-e89b-12d3-a456-426614174000"API key ID
Request: /v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}/regenerate
curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/agents/1b418231-b7d6-11ef-bf8f-4e013e2ddde4/api_keys/11efcf7e-824d-2808-bf8f-4e013e2ddde4/regenerate"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
api_key_info
optional
Agent API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"api_key_info": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"name": "example name",
"secret_key": "example string",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}POST Add Function Route to an Agent
/v2/gen-ai/agents/{agent_uuid}/functions
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To create a function route for an agent, send a POST request to /v2/gen-ai/agents/{agent_uuid}/functions.
Path Parameters
agent_uuid
required
"123e4567-e89b-12d3-a456-426614174000"Agent id
Request Body: application/json
agent_uuid
optional
"12345678-1234-1234-1234-123456789012"Agent id
description
optional
"My Function Description"Function description
faas_name
optional
"my-function"The name of the function in the DigitalOcean functions platform
faas_namespace
optional
"default"The namespace of the function in the DigitalOcean functions platform
function_name
optional
"My Function"Function name
input_schema
optional
Describe the input schema for the function so the agent may call it
output_schema
optional
Describe the output schema for the function so the agent handle its response
Request: /v2/gen-ai/agents/{agent_uuid}/functions
{
"agent_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"description": "\"My Function Description\"",
"faas_name": "\"my-function\"",
"faas_namespace": "\"default\"",
"function_name": "\"My Function\""
}curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/agents/1b418231-b7d6-11ef-bf8f-4e013e2ddde4/functions" \
-d '{
"agent_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4",
"function_name": "funzip",
"description": "Use when you need the zipcode for a city",
"input_schema": {
"city": {
"description": "the city you want a zipcode for",
"required": true,
"type": "string"
}
},
"output_schema": {
"zip_code": {
"description": "The zipcode of the desired city",
"type": "number"
}
},
"faas_namespace": "fn-2014dc98-faa1-45f4-ba1f-59910cb3d399",
"faas_name": "default/get-zipcode"
}'
Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
agent
optional
An Agent
Show child properties
anthropic_api_key
optional
Anthropic API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_key_infos
optional
Api key infos
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_keys
optional
Api keys
Show child properties
api_key
optional
example stringApi key
chatbot
optional
A Chatbot
Show child properties
allowed_domains
optional
["example string"]button_background_color
optional
example stringlogo
optional
example stringname
optional
example nameName of chatbot
primary_color
optional
example stringsecondary_color
optional
example stringstarting_message
optional
example stringchatbot_identifiers
optional
Chatbot identifiers
Show child properties
agent_chatbot_identifier
optional
123e4567-e89b-12d3-a456-426614174000Agent chatbot identifier
child_agents
optional
Child agents
conversation_logs_enabled
optional
trueWhether conversation logs are enabled for the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
deployment
optional
Description of deployment
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date / time
name
optional
example nameName
status
optional
STATUS_UNKNOWNupdated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your deployed agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
visibility
optional
VISIBILITY_UNKNOWN- VISIBILITY_UNKNOWN: The status of the deployment is unknown
- VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests
- VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state
- VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet
- VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys
description
optional
example stringDescription of agent
functions
optional
Show child properties
api_key
optional
example stringApi key
created_at
optional
2023-01-01T00:00:00ZCreation date / time
created_by
optional
12345Created by user id from DO
description
optional
example stringAgent description
faas_name
optional
example namefaas_namespace
optional
example nameinput_schema
optional
name
optional
example nameName
output_schema
optional
updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringDownload your agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
guardrails
optional
The guardrails the agent is attached to
Show child properties
agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000created_at
optional
2023-01-01T00:00:00Zdefault_response
optional
example stringdescription
optional
example stringguardrail_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_attached
optional
trueis_default
optional
truemetadata
optional
name
optional
example namepriority
optional
123type
optional
GUARDRAIL_TYPE_UNKNOWNupdated_at
optional
2023-01-01T00:00:00Zuuid
optional
123e4567-e89b-12d3-a456-426614174000if_case
optional
example stringinstruction
optional
example stringAgent instruction. Instructions help your agent to perform its job effectively. See Write Effective Agent Instructions for best practices.
k
optional
123knowledge_bases
optional
Knowledge bases
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
Show child properties
completed_datasources
optional
123Number of datasources indexed completed
created_at
optional
2023-01-01T00:00:00ZCreation date / time
data_source_jobs
optional
Details on Data Sources included in the Indexing Job
data_source_uuids
optional
["example string"]finished_at
optional
2023-01-01T00:00:00Zis_report_available
optional
trueBoolean value to determine if the indexing job details are available
knowledge_base_uuid
optional
123e4567-e89b-12d3-a456-426614174000Knowledge base id
phase
optional
BATCH_JOB_PHASE_UNKNOWNstarted_at
optional
2023-01-01T00:00:00Zstatus
optional
INDEX_JOB_STATUS_UNKNOWNtokens
optional
123Number of tokens [This field is deprecated]
total_datasources
optional
123Number of datasources being indexed
total_tokens
optional
12345Total Tokens Consumed By the Indexing Job
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
Show child properties
enabled
optional
trueWhether reranking is enabled for retrieval
model
optional
"bge-reranker-v2-m3"Reranker model internal name
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
logging_config
optional
Show child properties
galileo_project_id
optional
123e4567-e89b-12d3-a456-426614174000Galileo project identifier
galileo_project_name
optional
example nameName of the Galileo project
insights_enabled
optional
trueWhether insights are enabled
insights_enabled_at
optional
2023-01-01T00:00:00ZTimestamp when insights were enabled
log_stream_id
optional
123e4567-e89b-12d3-a456-426614174000Identifier for the log stream
log_stream_name
optional
example nameName of the log stream
max_tokens
optional
123mcp_servers
optional
MCP (Model Context Protocol) servers attached to this agent
Show child properties
allowed_tools
optional
["example string"]Optional list of allowed tool names to expose from this server
authorization
optional
example stringOptional authorization header value for the MCP server
headers
optional
Optional additional headers to send to the MCP server
server_label
optional
example stringA label identifying this MCP server
server_url
optional
example stringThe URL of the MCP server
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
Show child properties
description
optional
example stringname
optional
example nameurl
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
Show child properties
capabilities
optional
["example string"]Capabilities supported by this endpoint (e.g. input_text, output_text, input_image)
endpoint
optional
/chat/responsesThe endpoint path (e.g. /chat/responses)
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
Show child properties
input
optional
["example string"]output
optional
["example string"]name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
Show child properties
default_string
optional
example stringString default value (for type="dropdown", e.g. "medium")
default_value
optional
0.7Numeric default value (for type="number")
max
optional
1Maximum allowed value (for type="number")
min
optional
0Minimum allowed value (for type="number")
name
optional
temperatureSetting key name (e.g. "max_tokens", "temperature", "resolution")
options
optional
["example string"]Allowed values for dropdown selections (for type="dropdown")
step
optional
123Step increment for numeric settings (for type="number")
type
optional
numberSetting value type: "number" or "dropdown"
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
Show child properties
major
optional
123Major version number
minor
optional
123Minor version number
patch
optional
123Patch version number
model_provider_key
optional
Show child properties
api_key_uuid
optional
123e4567-e89b-12d3-a456-426614174000API key ID
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the key
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_at
optional
2023-01-01T00:00:00ZKey last updated date
model_router
optional
Model router
Show child properties
config
optional
Show child properties
fallback_models
optional
["example string"]Router-level fallback models
policies
optional
Task routing policies
created_at
optional
2023-01-01T00:00:00ZCreation date / time
description
optional
example stringDescription
name
optional
example nameName of the model router
regions
optional
["example string"]Target regions for the router
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameAgent name
openai_api_key
optional
OpenAI API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
parent_agents
optional
Parent agents
project_id
optional
123e4567-e89b-12d3-a456-426614174000provide_citations
optional
trueWhether the agent should provide in-response citations
reasoning_effort
optional
example stringThe reasoning effort for the agent
region
optional
example stringRegion code
retrieval_method
optional
RETRIEVAL_METHOD_UNKNOWN- RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown
- RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite
- RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back
- RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries
- RETRIEVAL_METHOD_NONE: The retrieval method is none
route_created_at
optional
2023-01-01T00:00:00ZCreation of route date / time
route_created_by
optional
12345route_name
optional
example nameRoute name
route_uuid
optional
123e4567-e89b-12d3-a456-426614174000tags
optional
["example string"]Agent tag to organize related resources
temperature
optional
123template
optional
Represents an AgentTemplate entity
Show child properties
created_at
optional
2023-01-01T00:00:00ZThe agent template's creation date
description
optional
example stringDeprecated - Use summary instead
guardrails
optional
List of guardrails associated with the agent template
Show child properties
priority
optional
123Priority of the guardrail
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the guardrail
instruction
optional
example stringInstructions for the agent template
k
optional
123The 'k' value for the agent template
knowledge_bases
optional
List of knowledge bases associated with the agent template
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
long_description
optional
The long description of the agent template
max_tokens
optional
123The max_tokens setting for the agent template
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the agent template
short_description
optional
The short description of the agent template
summary
optional
example stringThe summary of the agent template
tags
optional
["example string"]List of tags associated with the agent template
temperature
optional
123The temperature setting for the agent template
template_type
optional
AGENT_TEMPLATE_TYPE_STANDARD- AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template
- AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template
top_p
optional
123The top_p setting for the agent template
updated_at
optional
2023-01-01T00:00:00ZThe agent template's last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
thinking_token_budget
optional
123The thinking token budget for Anthropic extended thinking (0 = disabled)
top_p
optional
123updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your agent under this url
user_id
optional
12345Id of user that created the agent
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique agent id
version_hash
optional
example stringThe latest version of the agent
vpc_egress_ips
optional
["example string"]VPC Egress IPs
vpc_uuid
optional
"12345678-1234-1234-1234-123456789012"workspace
optional
Show child properties
agents
optional
Agents
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345The id of user who created this workspace
created_by_email
optional
[email protected]The email of the user who created this workspace
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
description
optional
example stringDescription of the workspace
evaluation_test_cases
optional
Evaluations
Show child properties
archived_at
optional
2023-01-01T00:00:00Zcreated_at
optional
2023-01-01T00:00:00Zcreated_by_user_email
optional
[email protected]created_by_user_id
optional
12345dataset
optional
dataset_name
optional
example namedataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000description
optional
example stringlatest_version_number_of_runs
optional
123metrics
optional
name
optional
example namestar_metric
optional
test_case_uuid
optional
123e4567-e89b-12d3-a456-426614174000total_runs
optional
123updated_at
optional
2023-01-01T00:00:00Zupdated_by_user_email
optional
[email protected]updated_by_user_id
optional
12345version
optional
123name
optional
example nameName of the workspace
updated_at
optional
2023-01-01T00:00:00ZUpdate date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"agent": {
"anthropic_api_key": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"api_key_infos": [],
"api_keys": [],
"chatbot": {
"allowed_domains": [
"example string"
],
"button_background_color": "example string",
"logo": "example string",
"name": "example name",
"primary_color": "example string",
"secondary_color": "example string",
"starting_message": "example string"
},
"chatbot_identifiers": [],
"child_agents": [],
"conversation_logs_enabled": true,
"created_at": "2023-01-01T00:00:00Z",
"deployment": {
"created_at": "2023-01-01T00:00:00Z",
"name": "example name",
"status": "STATUS_UNKNOWN",
"updated_at": "2023-01-01T00:00:00Z",
"url": "example string",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"visibility": "VISIBILITY_UNKNOWN"
},
"description": "example string",
"functions": [],
"guardrails": [],
"if_case": "example string",
"instruction": "example string",
"k": 123,
"knowledge_bases": [],
"logging_config": {
"galileo_project_id": "123e4567-e89b-12d3-a456-426614174000",
"galileo_project_name": "example name",
"insights_enabled": true,
"insights_enabled_at": "2023-01-01T00:00:00Z",
"log_stream_id": "123e4567-e89b-12d3-a456-426614174000",
"log_stream_name": "example name"
},
"max_tokens": 123,
"mcp_servers": [],
"model": {
"capabilities": [
"example string"
],
"context_window": "12345",
"created_at": "2023-01-01T00:00:00Z",
"endpoints": [],
"inference_name": "example name",
"inference_version": "example string",
"is_foundational": true,
"kb_default_chunk_size": 123,
"kb_max_chunk_size": 123,
"kb_min_chunk_size": 123,
"lifecycle_status": "example string",
"name": "example name",
"parameter_count": 123,
"parent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"reasoning_efforts": [
"example string"
],
"settings": [],
"thinking": true,
"type": "example string",
"updated_at": "2023-01-01T00:00:00Z",
"upload_complete": true,
"url": "example string",
"usecases": [
"MODEL_USECASE_AGENT",
"MODEL_USECASE_GUARDRAIL"
],
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"model_provider_key": {
"api_key_uuid": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [],
"name": "example name",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"updated_at": "2023-01-01T00:00:00Z"
},
"model_router": {
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"name": "example name",
"regions": [
"example string"
],
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"name": "example name",
"openai_api_key": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"parent_agents": [],
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"provide_citations": true,
"reasoning_effort": "example string",
"region": "example string",
"retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",
"route_created_at": "2023-01-01T00:00:00Z",
"route_created_by": "12345",
"route_name": "example name",
"route_uuid": "123e4567-e89b-12d3-a456-426614174000",
"tags": [
"example string"
],
"temperature": 123,
"template": {
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"guardrails": [],
"instruction": "example string",
"k": 123,
"knowledge_bases": [],
"long_description": "\"Enhance your customer service with an AI agent designed to provide consistent, helpful, and accurate support across multiple channels. This template creates an agent that can answer product questions, troubleshoot common issues, process simple requests, and maintain a friendly, on-brand voice throughout customer interactions. Reduce response times, handle routine inquiries efficiently, and ensure your customers feel heard and helped.\"",
"max_tokens": 123,
"name": "example name",
"short_description": "\"This template has been designed with question-answer and conversational use cases in mind. It comes with validated agent instructions, fine-tuned model settings, and preconfigured guardrails defined for customer support-related use cases.\"",
"summary": "example string",
"tags": [
"example string"
],
"temperature": 123,
"template_type": "AGENT_TEMPLATE_TYPE_STANDARD",
"top_p": 123,
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"thinking_token_budget": 123,
"top_p": 123,
"updated_at": "2023-01-01T00:00:00Z",
"url": "example string",
"user_id": "12345",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"version_hash": "example string",
"vpc_egress_ips": [
"example string"
],
"vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"workspace": {
"agents": [],
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"created_by_email": "[email protected]",
"deleted_at": "2023-01-01T00:00:00Z",
"description": "example string",
"evaluation_test_cases": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}PUT Update Function Route for an Agent
/v2/gen-ai/agents/{agent_uuid}/functions/{function_uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To update the function route, send a PUT request to /v2/gen-ai/agents/{agent_uuid}/functions/{function_uuid}.
Path Parameters
agent_uuid
required
"123e4567-e89b-12d3-a456-426614174000"Agent id
function_uuid
required
"123e4567-e89b-12d3-a456-426614174000"Function id
Request Body: application/json
agent_uuid
optional
"12345678-1234-1234-1234-123456789012"Agent id
description
optional
"My Function Description"Funciton description
faas_name
optional
"my-function"The name of the function in the DigitalOcean functions platform
faas_namespace
optional
"default"The namespace of the function in the DigitalOcean functions platform
function_name
optional
"My Function"Function name
function_uuid
optional
"12345678-1234-1234-1234-123456789012"Function id
input_schema
optional
Describe the input schema for the function so the agent may call it
output_schema
optional
Describe the output schema for the function so the agent handle its response
Request: /v2/gen-ai/agents/{agent_uuid}/functions/{function_uuid}
{
"agent_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"description": "\"My Function Description\"",
"faas_name": "\"my-function\"",
"faas_namespace": "\"default\"",
"function_name": "\"My Function\"",
"function_uuid": "\"12345678-1234-1234-1234-123456789012\""
}curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/agents/1b418231-b7d6-11ef-bf8f-4e013e2ddde4/functions/b00e74f6-985c-11ef-bf8f-4e013e2ddde4" \
-d '{
"agent_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4",
"function_uuid": "6cc5cda5-9ac3-11ef-bf8f-4e013e2ddde4",
"function_name": "func-rename"
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
agent
optional
An Agent
Show child properties
anthropic_api_key
optional
Anthropic API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_key_infos
optional
Api key infos
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_keys
optional
Api keys
Show child properties
api_key
optional
example stringApi key
chatbot
optional
A Chatbot
Show child properties
allowed_domains
optional
["example string"]button_background_color
optional
example stringlogo
optional
example stringname
optional
example nameName of chatbot
primary_color
optional
example stringsecondary_color
optional
example stringstarting_message
optional
example stringchatbot_identifiers
optional
Chatbot identifiers
Show child properties
agent_chatbot_identifier
optional
123e4567-e89b-12d3-a456-426614174000Agent chatbot identifier
child_agents
optional
Child agents
conversation_logs_enabled
optional
trueWhether conversation logs are enabled for the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
deployment
optional
Description of deployment
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date / time
name
optional
example nameName
status
optional
STATUS_UNKNOWNupdated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your deployed agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
visibility
optional
VISIBILITY_UNKNOWN- VISIBILITY_UNKNOWN: The status of the deployment is unknown
- VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests
- VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state
- VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet
- VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys
description
optional
example stringDescription of agent
functions
optional
Show child properties
api_key
optional
example stringApi key
created_at
optional
2023-01-01T00:00:00ZCreation date / time
created_by
optional
12345Created by user id from DO
description
optional
example stringAgent description
faas_name
optional
example namefaas_namespace
optional
example nameinput_schema
optional
name
optional
example nameName
output_schema
optional
updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringDownload your agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
guardrails
optional
The guardrails the agent is attached to
Show child properties
agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000created_at
optional
2023-01-01T00:00:00Zdefault_response
optional
example stringdescription
optional
example stringguardrail_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_attached
optional
trueis_default
optional
truemetadata
optional
name
optional
example namepriority
optional
123type
optional
GUARDRAIL_TYPE_UNKNOWNupdated_at
optional
2023-01-01T00:00:00Zuuid
optional
123e4567-e89b-12d3-a456-426614174000if_case
optional
example stringinstruction
optional
example stringAgent instruction. Instructions help your agent to perform its job effectively. See Write Effective Agent Instructions for best practices.
k
optional
123knowledge_bases
optional
Knowledge bases
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
Show child properties
completed_datasources
optional
123Number of datasources indexed completed
created_at
optional
2023-01-01T00:00:00ZCreation date / time
data_source_jobs
optional
Details on Data Sources included in the Indexing Job
data_source_uuids
optional
["example string"]finished_at
optional
2023-01-01T00:00:00Zis_report_available
optional
trueBoolean value to determine if the indexing job details are available
knowledge_base_uuid
optional
123e4567-e89b-12d3-a456-426614174000Knowledge base id
phase
optional
BATCH_JOB_PHASE_UNKNOWNstarted_at
optional
2023-01-01T00:00:00Zstatus
optional
INDEX_JOB_STATUS_UNKNOWNtokens
optional
123Number of tokens [This field is deprecated]
total_datasources
optional
123Number of datasources being indexed
total_tokens
optional
12345Total Tokens Consumed By the Indexing Job
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
Show child properties
enabled
optional
trueWhether reranking is enabled for retrieval
model
optional
"bge-reranker-v2-m3"Reranker model internal name
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
logging_config
optional
Show child properties
galileo_project_id
optional
123e4567-e89b-12d3-a456-426614174000Galileo project identifier
galileo_project_name
optional
example nameName of the Galileo project
insights_enabled
optional
trueWhether insights are enabled
insights_enabled_at
optional
2023-01-01T00:00:00ZTimestamp when insights were enabled
log_stream_id
optional
123e4567-e89b-12d3-a456-426614174000Identifier for the log stream
log_stream_name
optional
example nameName of the log stream
max_tokens
optional
123mcp_servers
optional
MCP (Model Context Protocol) servers attached to this agent
Show child properties
allowed_tools
optional
["example string"]Optional list of allowed tool names to expose from this server
authorization
optional
example stringOptional authorization header value for the MCP server
headers
optional
Optional additional headers to send to the MCP server
server_label
optional
example stringA label identifying this MCP server
server_url
optional
example stringThe URL of the MCP server
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
Show child properties
description
optional
example stringname
optional
example nameurl
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
Show child properties
capabilities
optional
["example string"]Capabilities supported by this endpoint (e.g. input_text, output_text, input_image)
endpoint
optional
/chat/responsesThe endpoint path (e.g. /chat/responses)
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
Show child properties
input
optional
["example string"]output
optional
["example string"]name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
Show child properties
default_string
optional
example stringString default value (for type="dropdown", e.g. "medium")
default_value
optional
0.7Numeric default value (for type="number")
max
optional
1Maximum allowed value (for type="number")
min
optional
0Minimum allowed value (for type="number")
name
optional
temperatureSetting key name (e.g. "max_tokens", "temperature", "resolution")
options
optional
["example string"]Allowed values for dropdown selections (for type="dropdown")
step
optional
123Step increment for numeric settings (for type="number")
type
optional
numberSetting value type: "number" or "dropdown"
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
Show child properties
major
optional
123Major version number
minor
optional
123Minor version number
patch
optional
123Patch version number
model_provider_key
optional
Show child properties
api_key_uuid
optional
123e4567-e89b-12d3-a456-426614174000API key ID
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the key
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_at
optional
2023-01-01T00:00:00ZKey last updated date
model_router
optional
Model router
Show child properties
config
optional
Show child properties
fallback_models
optional
["example string"]Router-level fallback models
policies
optional
Task routing policies
created_at
optional
2023-01-01T00:00:00ZCreation date / time
description
optional
example stringDescription
name
optional
example nameName of the model router
regions
optional
["example string"]Target regions for the router
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameAgent name
openai_api_key
optional
OpenAI API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
parent_agents
optional
Parent agents
project_id
optional
123e4567-e89b-12d3-a456-426614174000provide_citations
optional
trueWhether the agent should provide in-response citations
reasoning_effort
optional
example stringThe reasoning effort for the agent
region
optional
example stringRegion code
retrieval_method
optional
RETRIEVAL_METHOD_UNKNOWN- RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown
- RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite
- RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back
- RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries
- RETRIEVAL_METHOD_NONE: The retrieval method is none
route_created_at
optional
2023-01-01T00:00:00ZCreation of route date / time
route_created_by
optional
12345route_name
optional
example nameRoute name
route_uuid
optional
123e4567-e89b-12d3-a456-426614174000tags
optional
["example string"]Agent tag to organize related resources
temperature
optional
123template
optional
Represents an AgentTemplate entity
Show child properties
created_at
optional
2023-01-01T00:00:00ZThe agent template's creation date
description
optional
example stringDeprecated - Use summary instead
guardrails
optional
List of guardrails associated with the agent template
Show child properties
priority
optional
123Priority of the guardrail
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the guardrail
instruction
optional
example stringInstructions for the agent template
k
optional
123The 'k' value for the agent template
knowledge_bases
optional
List of knowledge bases associated with the agent template
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
long_description
optional
The long description of the agent template
max_tokens
optional
123The max_tokens setting for the agent template
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the agent template
short_description
optional
The short description of the agent template
summary
optional
example stringThe summary of the agent template
tags
optional
["example string"]List of tags associated with the agent template
temperature
optional
123The temperature setting for the agent template
template_type
optional
AGENT_TEMPLATE_TYPE_STANDARD- AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template
- AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template
top_p
optional
123The top_p setting for the agent template
updated_at
optional
2023-01-01T00:00:00ZThe agent template's last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
thinking_token_budget
optional
123The thinking token budget for Anthropic extended thinking (0 = disabled)
top_p
optional
123updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your agent under this url
user_id
optional
12345Id of user that created the agent
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique agent id
version_hash
optional
example stringThe latest version of the agent
vpc_egress_ips
optional
["example string"]VPC Egress IPs
vpc_uuid
optional
"12345678-1234-1234-1234-123456789012"workspace
optional
Show child properties
agents
optional
Agents
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345The id of user who created this workspace
created_by_email
optional
[email protected]The email of the user who created this workspace
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
description
optional
example stringDescription of the workspace
evaluation_test_cases
optional
Evaluations
Show child properties
archived_at
optional
2023-01-01T00:00:00Zcreated_at
optional
2023-01-01T00:00:00Zcreated_by_user_email
optional
[email protected]created_by_user_id
optional
12345dataset
optional
dataset_name
optional
example namedataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000description
optional
example stringlatest_version_number_of_runs
optional
123metrics
optional
name
optional
example namestar_metric
optional
test_case_uuid
optional
123e4567-e89b-12d3-a456-426614174000total_runs
optional
123updated_at
optional
2023-01-01T00:00:00Zupdated_by_user_email
optional
[email protected]updated_by_user_id
optional
12345version
optional
123name
optional
example nameName of the workspace
updated_at
optional
2023-01-01T00:00:00ZUpdate date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"agent": {
"anthropic_api_key": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"api_key_infos": [],
"api_keys": [],
"chatbot": {
"allowed_domains": [
"example string"
],
"button_background_color": "example string",
"logo": "example string",
"name": "example name",
"primary_color": "example string",
"secondary_color": "example string",
"starting_message": "example string"
},
"chatbot_identifiers": [],
"child_agents": [],
"conversation_logs_enabled": true,
"created_at": "2023-01-01T00:00:00Z",
"deployment": {
"created_at": "2023-01-01T00:00:00Z",
"name": "example name",
"status": "STATUS_UNKNOWN",
"updated_at": "2023-01-01T00:00:00Z",
"url": "example string",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"visibility": "VISIBILITY_UNKNOWN"
},
"description": "example string",
"functions": [],
"guardrails": [],
"if_case": "example string",
"instruction": "example string",
"k": 123,
"knowledge_bases": [],
"logging_config": {
"galileo_project_id": "123e4567-e89b-12d3-a456-426614174000",
"galileo_project_name": "example name",
"insights_enabled": true,
"insights_enabled_at": "2023-01-01T00:00:00Z",
"log_stream_id": "123e4567-e89b-12d3-a456-426614174000",
"log_stream_name": "example name"
},
"max_tokens": 123,
"mcp_servers": [],
"model": {
"capabilities": [
"example string"
],
"context_window": "12345",
"created_at": "2023-01-01T00:00:00Z",
"endpoints": [],
"inference_name": "example name",
"inference_version": "example string",
"is_foundational": true,
"kb_default_chunk_size": 123,
"kb_max_chunk_size": 123,
"kb_min_chunk_size": 123,
"lifecycle_status": "example string",
"name": "example name",
"parameter_count": 123,
"parent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"reasoning_efforts": [
"example string"
],
"settings": [],
"thinking": true,
"type": "example string",
"updated_at": "2023-01-01T00:00:00Z",
"upload_complete": true,
"url": "example string",
"usecases": [
"MODEL_USECASE_AGENT",
"MODEL_USECASE_GUARDRAIL"
],
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"model_provider_key": {
"api_key_uuid": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [],
"name": "example name",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"updated_at": "2023-01-01T00:00:00Z"
},
"model_router": {
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"name": "example name",
"regions": [
"example string"
],
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"name": "example name",
"openai_api_key": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"parent_agents": [],
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"provide_citations": true,
"reasoning_effort": "example string",
"region": "example string",
"retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",
"route_created_at": "2023-01-01T00:00:00Z",
"route_created_by": "12345",
"route_name": "example name",
"route_uuid": "123e4567-e89b-12d3-a456-426614174000",
"tags": [
"example string"
],
"temperature": 123,
"template": {
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"guardrails": [],
"instruction": "example string",
"k": 123,
"knowledge_bases": [],
"long_description": "\"Enhance your customer service with an AI agent designed to provide consistent, helpful, and accurate support across multiple channels. This template creates an agent that can answer product questions, troubleshoot common issues, process simple requests, and maintain a friendly, on-brand voice throughout customer interactions. Reduce response times, handle routine inquiries efficiently, and ensure your customers feel heard and helped.\"",
"max_tokens": 123,
"name": "example name",
"short_description": "\"This template has been designed with question-answer and conversational use cases in mind. It comes with validated agent instructions, fine-tuned model settings, and preconfigured guardrails defined for customer support-related use cases.\"",
"summary": "example string",
"tags": [
"example string"
],
"temperature": 123,
"template_type": "AGENT_TEMPLATE_TYPE_STANDARD",
"top_p": 123,
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"thinking_token_budget": 123,
"top_p": 123,
"updated_at": "2023-01-01T00:00:00Z",
"url": "example string",
"user_id": "12345",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"version_hash": "example string",
"vpc_egress_ips": [
"example string"
],
"vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"workspace": {
"agents": [],
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"created_by_email": "[email protected]",
"deleted_at": "2023-01-01T00:00:00Z",
"description": "example string",
"evaluation_test_cases": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}DELETE Delete Function Route for an Agent
/v2/gen-ai/agents/{agent_uuid}/functions/{function_uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To delete a function route from an agent, send a DELETE request to /v2/gen-ai/agents/{agent_uuid}/functions/{function_uuid}.
Path Parameters
agent_uuid
required
"123e4567-e89b-12d3-a456-426614174000"The id of the agent the function route belongs to.
function_uuid
required
"123e4567-e89b-12d3-a456-426614174000"The function route to be destroyed. This does not destroy the function itself.
Request: /v2/gen-ai/agents/{agent_uuid}/functions/{function_uuid}
curl -X DELETE \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/agents/ff47f5b7-96e5-11ef-bf8f-4e013e2ddde4/functions/6cc5cda5-9ac3-11ef-bf8f-4e013e2ddde4"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
agent
optional
An Agent
Show child properties
anthropic_api_key
optional
Anthropic API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_key_infos
optional
Api key infos
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_keys
optional
Api keys
Show child properties
api_key
optional
example stringApi key
chatbot
optional
A Chatbot
Show child properties
allowed_domains
optional
["example string"]button_background_color
optional
example stringlogo
optional
example stringname
optional
example nameName of chatbot
primary_color
optional
example stringsecondary_color
optional
example stringstarting_message
optional
example stringchatbot_identifiers
optional
Chatbot identifiers
Show child properties
agent_chatbot_identifier
optional
123e4567-e89b-12d3-a456-426614174000Agent chatbot identifier
child_agents
optional
Child agents
conversation_logs_enabled
optional
trueWhether conversation logs are enabled for the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
deployment
optional
Description of deployment
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date / time
name
optional
example nameName
status
optional
STATUS_UNKNOWNupdated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your deployed agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
visibility
optional
VISIBILITY_UNKNOWN- VISIBILITY_UNKNOWN: The status of the deployment is unknown
- VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests
- VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state
- VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet
- VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys
description
optional
example stringDescription of agent
functions
optional
Show child properties
api_key
optional
example stringApi key
created_at
optional
2023-01-01T00:00:00ZCreation date / time
created_by
optional
12345Created by user id from DO
description
optional
example stringAgent description
faas_name
optional
example namefaas_namespace
optional
example nameinput_schema
optional
name
optional
example nameName
output_schema
optional
updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringDownload your agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
guardrails
optional
The guardrails the agent is attached to
Show child properties
agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000created_at
optional
2023-01-01T00:00:00Zdefault_response
optional
example stringdescription
optional
example stringguardrail_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_attached
optional
trueis_default
optional
truemetadata
optional
name
optional
example namepriority
optional
123type
optional
GUARDRAIL_TYPE_UNKNOWNupdated_at
optional
2023-01-01T00:00:00Zuuid
optional
123e4567-e89b-12d3-a456-426614174000if_case
optional
example stringinstruction
optional
example stringAgent instruction. Instructions help your agent to perform its job effectively. See Write Effective Agent Instructions for best practices.
k
optional
123knowledge_bases
optional
Knowledge bases
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
Show child properties
completed_datasources
optional
123Number of datasources indexed completed
created_at
optional
2023-01-01T00:00:00ZCreation date / time
data_source_jobs
optional
Details on Data Sources included in the Indexing Job
data_source_uuids
optional
["example string"]finished_at
optional
2023-01-01T00:00:00Zis_report_available
optional
trueBoolean value to determine if the indexing job details are available
knowledge_base_uuid
optional
123e4567-e89b-12d3-a456-426614174000Knowledge base id
phase
optional
BATCH_JOB_PHASE_UNKNOWNstarted_at
optional
2023-01-01T00:00:00Zstatus
optional
INDEX_JOB_STATUS_UNKNOWNtokens
optional
123Number of tokens [This field is deprecated]
total_datasources
optional
123Number of datasources being indexed
total_tokens
optional
12345Total Tokens Consumed By the Indexing Job
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
Show child properties
enabled
optional
trueWhether reranking is enabled for retrieval
model
optional
"bge-reranker-v2-m3"Reranker model internal name
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
logging_config
optional
Show child properties
galileo_project_id
optional
123e4567-e89b-12d3-a456-426614174000Galileo project identifier
galileo_project_name
optional
example nameName of the Galileo project
insights_enabled
optional
trueWhether insights are enabled
insights_enabled_at
optional
2023-01-01T00:00:00ZTimestamp when insights were enabled
log_stream_id
optional
123e4567-e89b-12d3-a456-426614174000Identifier for the log stream
log_stream_name
optional
example nameName of the log stream
max_tokens
optional
123mcp_servers
optional
MCP (Model Context Protocol) servers attached to this agent
Show child properties
allowed_tools
optional
["example string"]Optional list of allowed tool names to expose from this server
authorization
optional
example stringOptional authorization header value for the MCP server
headers
optional
Optional additional headers to send to the MCP server
server_label
optional
example stringA label identifying this MCP server
server_url
optional
example stringThe URL of the MCP server
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
Show child properties
description
optional
example stringname
optional
example nameurl
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
Show child properties
capabilities
optional
["example string"]Capabilities supported by this endpoint (e.g. input_text, output_text, input_image)
endpoint
optional
/chat/responsesThe endpoint path (e.g. /chat/responses)
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
Show child properties
input
optional
["example string"]output
optional
["example string"]name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
Show child properties
default_string
optional
example stringString default value (for type="dropdown", e.g. "medium")
default_value
optional
0.7Numeric default value (for type="number")
max
optional
1Maximum allowed value (for type="number")
min
optional
0Minimum allowed value (for type="number")
name
optional
temperatureSetting key name (e.g. "max_tokens", "temperature", "resolution")
options
optional
["example string"]Allowed values for dropdown selections (for type="dropdown")
step
optional
123Step increment for numeric settings (for type="number")
type
optional
numberSetting value type: "number" or "dropdown"
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
Show child properties
major
optional
123Major version number
minor
optional
123Minor version number
patch
optional
123Patch version number
model_provider_key
optional
Show child properties
api_key_uuid
optional
123e4567-e89b-12d3-a456-426614174000API key ID
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the key
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_at
optional
2023-01-01T00:00:00ZKey last updated date
model_router
optional
Model router
Show child properties
config
optional
Show child properties
fallback_models
optional
["example string"]Router-level fallback models
policies
optional
Task routing policies
created_at
optional
2023-01-01T00:00:00ZCreation date / time
description
optional
example stringDescription
name
optional
example nameName of the model router
regions
optional
["example string"]Target regions for the router
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameAgent name
openai_api_key
optional
OpenAI API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
parent_agents
optional
Parent agents
project_id
optional
123e4567-e89b-12d3-a456-426614174000provide_citations
optional
trueWhether the agent should provide in-response citations
reasoning_effort
optional
example stringThe reasoning effort for the agent
region
optional
example stringRegion code
retrieval_method
optional
RETRIEVAL_METHOD_UNKNOWN- RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown
- RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite
- RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back
- RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries
- RETRIEVAL_METHOD_NONE: The retrieval method is none
route_created_at
optional
2023-01-01T00:00:00ZCreation of route date / time
route_created_by
optional
12345route_name
optional
example nameRoute name
route_uuid
optional
123e4567-e89b-12d3-a456-426614174000tags
optional
["example string"]Agent tag to organize related resources
temperature
optional
123template
optional
Represents an AgentTemplate entity
Show child properties
created_at
optional
2023-01-01T00:00:00ZThe agent template's creation date
description
optional
example stringDeprecated - Use summary instead
guardrails
optional
List of guardrails associated with the agent template
Show child properties
priority
optional
123Priority of the guardrail
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the guardrail
instruction
optional
example stringInstructions for the agent template
k
optional
123The 'k' value for the agent template
knowledge_bases
optional
List of knowledge bases associated with the agent template
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
long_description
optional
The long description of the agent template
max_tokens
optional
123The max_tokens setting for the agent template
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the agent template
short_description
optional
The short description of the agent template
summary
optional
example stringThe summary of the agent template
tags
optional
["example string"]List of tags associated with the agent template
temperature
optional
123The temperature setting for the agent template
template_type
optional
AGENT_TEMPLATE_TYPE_STANDARD- AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template
- AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template
top_p
optional
123The top_p setting for the agent template
updated_at
optional
2023-01-01T00:00:00ZThe agent template's last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
thinking_token_budget
optional
123The thinking token budget for Anthropic extended thinking (0 = disabled)
top_p
optional
123updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your agent under this url
user_id
optional
12345Id of user that created the agent
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique agent id
version_hash
optional
example stringThe latest version of the agent
vpc_egress_ips
optional
["example string"]VPC Egress IPs
vpc_uuid
optional
"12345678-1234-1234-1234-123456789012"workspace
optional
Show child properties
agents
optional
Agents
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345The id of user who created this workspace
created_by_email
optional
[email protected]The email of the user who created this workspace
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
description
optional
example stringDescription of the workspace
evaluation_test_cases
optional
Evaluations
Show child properties
archived_at
optional
2023-01-01T00:00:00Zcreated_at
optional
2023-01-01T00:00:00Zcreated_by_user_email
optional
[email protected]created_by_user_id
optional
12345dataset
optional
dataset_name
optional
example namedataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000description
optional
example stringlatest_version_number_of_runs
optional
123metrics
optional
name
optional
example namestar_metric
optional
test_case_uuid
optional
123e4567-e89b-12d3-a456-426614174000total_runs
optional
123updated_at
optional
2023-01-01T00:00:00Zupdated_by_user_email
optional
[email protected]updated_by_user_id
optional
12345version
optional
123name
optional
example nameName of the workspace
updated_at
optional
2023-01-01T00:00:00ZUpdate date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"agent": {
"anthropic_api_key": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"api_key_infos": [],
"api_keys": [],
"chatbot": {
"allowed_domains": [
"example string"
],
"button_background_color": "example string",
"logo": "example string",
"name": "example name",
"primary_color": "example string",
"secondary_color": "example string",
"starting_message": "example string"
},
"chatbot_identifiers": [],
"child_agents": [],
"conversation_logs_enabled": true,
"created_at": "2023-01-01T00:00:00Z",
"deployment": {
"created_at": "2023-01-01T00:00:00Z",
"name": "example name",
"status": "STATUS_UNKNOWN",
"updated_at": "2023-01-01T00:00:00Z",
"url": "example string",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"visibility": "VISIBILITY_UNKNOWN"
},
"description": "example string",
"functions": [],
"guardrails": [],
"if_case": "example string",
"instruction": "example string",
"k": 123,
"knowledge_bases": [],
"logging_config": {
"galileo_project_id": "123e4567-e89b-12d3-a456-426614174000",
"galileo_project_name": "example name",
"insights_enabled": true,
"insights_enabled_at": "2023-01-01T00:00:00Z",
"log_stream_id": "123e4567-e89b-12d3-a456-426614174000",
"log_stream_name": "example name"
},
"max_tokens": 123,
"mcp_servers": [],
"model": {
"capabilities": [
"example string"
],
"context_window": "12345",
"created_at": "2023-01-01T00:00:00Z",
"endpoints": [],
"inference_name": "example name",
"inference_version": "example string",
"is_foundational": true,
"kb_default_chunk_size": 123,
"kb_max_chunk_size": 123,
"kb_min_chunk_size": 123,
"lifecycle_status": "example string",
"name": "example name",
"parameter_count": 123,
"parent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"reasoning_efforts": [
"example string"
],
"settings": [],
"thinking": true,
"type": "example string",
"updated_at": "2023-01-01T00:00:00Z",
"upload_complete": true,
"url": "example string",
"usecases": [
"MODEL_USECASE_AGENT",
"MODEL_USECASE_GUARDRAIL"
],
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"model_provider_key": {
"api_key_uuid": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [],
"name": "example name",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"updated_at": "2023-01-01T00:00:00Z"
},
"model_router": {
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"name": "example name",
"regions": [
"example string"
],
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"name": "example name",
"openai_api_key": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"parent_agents": [],
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"provide_citations": true,
"reasoning_effort": "example string",
"region": "example string",
"retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",
"route_created_at": "2023-01-01T00:00:00Z",
"route_created_by": "12345",
"route_name": "example name",
"route_uuid": "123e4567-e89b-12d3-a456-426614174000",
"tags": [
"example string"
],
"temperature": 123,
"template": {
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"guardrails": [],
"instruction": "example string",
"k": 123,
"knowledge_bases": [],
"long_description": "\"Enhance your customer service with an AI agent designed to provide consistent, helpful, and accurate support across multiple channels. This template creates an agent that can answer product questions, troubleshoot common issues, process simple requests, and maintain a friendly, on-brand voice throughout customer interactions. Reduce response times, handle routine inquiries efficiently, and ensure your customers feel heard and helped.\"",
"max_tokens": 123,
"name": "example name",
"short_description": "\"This template has been designed with question-answer and conversational use cases in mind. It comes with validated agent instructions, fine-tuned model settings, and preconfigured guardrails defined for customer support-related use cases.\"",
"summary": "example string",
"tags": [
"example string"
],
"temperature": 123,
"template_type": "AGENT_TEMPLATE_TYPE_STANDARD",
"top_p": 123,
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"thinking_token_budget": 123,
"top_p": 123,
"updated_at": "2023-01-01T00:00:00Z",
"url": "example string",
"user_id": "12345",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"version_hash": "example string",
"vpc_egress_ips": [
"example string"
],
"vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"workspace": {
"agents": [],
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"created_by_email": "[email protected]",
"deleted_at": "2023-01-01T00:00:00Z",
"description": "example string",
"evaluation_test_cases": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}POST Attach Guardrails to an Agent
/v2/gen-ai/agents/{agent_uuid}/guardrails
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To attach guardrails to an agent, send a POST request to /v2/gen-ai/agents/{agent_uuid}/guardrails.
Path Parameters
agent_uuid
required
"123e4567-e89b-12d3-a456-426614174000"The UUID of the agent.
Request Body: application/json
agent_uuid
optional
"12345678-1234-1234-1234-123456789012"The UUID of the agent.
guardrails
optional
The list of guardrails to attach.
Show child properties
guardrail_uuid
optional
123e4567-e89b-12d3-a456-426614174000Guardrail uuid
priority
optional
123Priority of the guardrail
Request: /v2/gen-ai/agents/{agent_uuid}/guardrails
{
"agent_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"guardrails": [
{
"guardrail_uuid": "123e4567-e89b-12d3-a456-426614174000",
"priority": 123
}
]
}curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/agents/1c8be326-00fe-11f1-b542-ca68c578b05c/guardrails" \
-d '{
"guardrails": [
{
"guardrail_uuid": "69bcc61c-2bb2-49fd-b6ed-7c1bd73d6442",
"priority": 1
},
{
"guardrail_uuid": "dc72b12b-bd45-46c9-bca1-00a6624aac3a",
"priority": 2
}
]
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
agent
optional
An Agent
Show child properties
anthropic_api_key
optional
Anthropic API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_key_infos
optional
Api key infos
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_keys
optional
Api keys
Show child properties
api_key
optional
example stringApi key
chatbot
optional
A Chatbot
Show child properties
allowed_domains
optional
["example string"]button_background_color
optional
example stringlogo
optional
example stringname
optional
example nameName of chatbot
primary_color
optional
example stringsecondary_color
optional
example stringstarting_message
optional
example stringchatbot_identifiers
optional
Chatbot identifiers
Show child properties
agent_chatbot_identifier
optional
123e4567-e89b-12d3-a456-426614174000Agent chatbot identifier
child_agents
optional
Child agents
conversation_logs_enabled
optional
trueWhether conversation logs are enabled for the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
deployment
optional
Description of deployment
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date / time
name
optional
example nameName
status
optional
STATUS_UNKNOWNupdated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your deployed agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
visibility
optional
VISIBILITY_UNKNOWN- VISIBILITY_UNKNOWN: The status of the deployment is unknown
- VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests
- VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state
- VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet
- VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys
description
optional
example stringDescription of agent
functions
optional
Show child properties
api_key
optional
example stringApi key
created_at
optional
2023-01-01T00:00:00ZCreation date / time
created_by
optional
12345Created by user id from DO
description
optional
example stringAgent description
faas_name
optional
example namefaas_namespace
optional
example nameinput_schema
optional
name
optional
example nameName
output_schema
optional
updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringDownload your agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
guardrails
optional
The guardrails the agent is attached to
Show child properties
agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000created_at
optional
2023-01-01T00:00:00Zdefault_response
optional
example stringdescription
optional
example stringguardrail_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_attached
optional
trueis_default
optional
truemetadata
optional
name
optional
example namepriority
optional
123type
optional
GUARDRAIL_TYPE_UNKNOWNupdated_at
optional
2023-01-01T00:00:00Zuuid
optional
123e4567-e89b-12d3-a456-426614174000if_case
optional
example stringinstruction
optional
example stringAgent instruction. Instructions help your agent to perform its job effectively. See Write Effective Agent Instructions for best practices.
k
optional
123knowledge_bases
optional
Knowledge bases
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
Show child properties
completed_datasources
optional
123Number of datasources indexed completed
created_at
optional
2023-01-01T00:00:00ZCreation date / time
data_source_jobs
optional
Details on Data Sources included in the Indexing Job
data_source_uuids
optional
["example string"]finished_at
optional
2023-01-01T00:00:00Zis_report_available
optional
trueBoolean value to determine if the indexing job details are available
knowledge_base_uuid
optional
123e4567-e89b-12d3-a456-426614174000Knowledge base id
phase
optional
BATCH_JOB_PHASE_UNKNOWNstarted_at
optional
2023-01-01T00:00:00Zstatus
optional
INDEX_JOB_STATUS_UNKNOWNtokens
optional
123Number of tokens [This field is deprecated]
total_datasources
optional
123Number of datasources being indexed
total_tokens
optional
12345Total Tokens Consumed By the Indexing Job
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
Show child properties
enabled
optional
trueWhether reranking is enabled for retrieval
model
optional
"bge-reranker-v2-m3"Reranker model internal name
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
logging_config
optional
Show child properties
galileo_project_id
optional
123e4567-e89b-12d3-a456-426614174000Galileo project identifier
galileo_project_name
optional
example nameName of the Galileo project
insights_enabled
optional
trueWhether insights are enabled
insights_enabled_at
optional
2023-01-01T00:00:00ZTimestamp when insights were enabled
log_stream_id
optional
123e4567-e89b-12d3-a456-426614174000Identifier for the log stream
log_stream_name
optional
example nameName of the log stream
max_tokens
optional
123mcp_servers
optional
MCP (Model Context Protocol) servers attached to this agent
Show child properties
allowed_tools
optional
["example string"]Optional list of allowed tool names to expose from this server
authorization
optional
example stringOptional authorization header value for the MCP server
headers
optional
Optional additional headers to send to the MCP server
server_label
optional
example stringA label identifying this MCP server
server_url
optional
example stringThe URL of the MCP server
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
Show child properties
description
optional
example stringname
optional
example nameurl
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
Show child properties
capabilities
optional
["example string"]Capabilities supported by this endpoint (e.g. input_text, output_text, input_image)
endpoint
optional
/chat/responsesThe endpoint path (e.g. /chat/responses)
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
Show child properties
input
optional
["example string"]output
optional
["example string"]name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
Show child properties
default_string
optional
example stringString default value (for type="dropdown", e.g. "medium")
default_value
optional
0.7Numeric default value (for type="number")
max
optional
1Maximum allowed value (for type="number")
min
optional
0Minimum allowed value (for type="number")
name
optional
temperatureSetting key name (e.g. "max_tokens", "temperature", "resolution")
options
optional
["example string"]Allowed values for dropdown selections (for type="dropdown")
step
optional
123Step increment for numeric settings (for type="number")
type
optional
numberSetting value type: "number" or "dropdown"
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
Show child properties
major
optional
123Major version number
minor
optional
123Minor version number
patch
optional
123Patch version number
model_provider_key
optional
Show child properties
api_key_uuid
optional
123e4567-e89b-12d3-a456-426614174000API key ID
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the key
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_at
optional
2023-01-01T00:00:00ZKey last updated date
model_router
optional
Model router
Show child properties
config
optional
Show child properties
fallback_models
optional
["example string"]Router-level fallback models
policies
optional
Task routing policies
created_at
optional
2023-01-01T00:00:00ZCreation date / time
description
optional
example stringDescription
name
optional
example nameName of the model router
regions
optional
["example string"]Target regions for the router
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameAgent name
openai_api_key
optional
OpenAI API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
parent_agents
optional
Parent agents
project_id
optional
123e4567-e89b-12d3-a456-426614174000provide_citations
optional
trueWhether the agent should provide in-response citations
reasoning_effort
optional
example stringThe reasoning effort for the agent
region
optional
example stringRegion code
retrieval_method
optional
RETRIEVAL_METHOD_UNKNOWN- RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown
- RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite
- RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back
- RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries
- RETRIEVAL_METHOD_NONE: The retrieval method is none
route_created_at
optional
2023-01-01T00:00:00ZCreation of route date / time
route_created_by
optional
12345route_name
optional
example nameRoute name
route_uuid
optional
123e4567-e89b-12d3-a456-426614174000tags
optional
["example string"]Agent tag to organize related resources
temperature
optional
123template
optional
Represents an AgentTemplate entity
Show child properties
created_at
optional
2023-01-01T00:00:00ZThe agent template's creation date
description
optional
example stringDeprecated - Use summary instead
guardrails
optional
List of guardrails associated with the agent template
Show child properties
priority
optional
123Priority of the guardrail
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the guardrail
instruction
optional
example stringInstructions for the agent template
k
optional
123The 'k' value for the agent template
knowledge_bases
optional
List of knowledge bases associated with the agent template
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
long_description
optional
The long description of the agent template
max_tokens
optional
123The max_tokens setting for the agent template
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the agent template
short_description
optional
The short description of the agent template
summary
optional
example stringThe summary of the agent template
tags
optional
["example string"]List of tags associated with the agent template
temperature
optional
123The temperature setting for the agent template
template_type
optional
AGENT_TEMPLATE_TYPE_STANDARD- AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template
- AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template
top_p
optional
123The top_p setting for the agent template
updated_at
optional
2023-01-01T00:00:00ZThe agent template's last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
thinking_token_budget
optional
123The thinking token budget for Anthropic extended thinking (0 = disabled)
top_p
optional
123updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your agent under this url
user_id
optional
12345Id of user that created the agent
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique agent id
version_hash
optional
example stringThe latest version of the agent
vpc_egress_ips
optional
["example string"]VPC Egress IPs
vpc_uuid
optional
"12345678-1234-1234-1234-123456789012"workspace
optional
Show child properties
agents
optional
Agents
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345The id of user who created this workspace
created_by_email
optional
[email protected]The email of the user who created this workspace
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
description
optional
example stringDescription of the workspace
evaluation_test_cases
optional
Evaluations
Show child properties
archived_at
optional
2023-01-01T00:00:00Zcreated_at
optional
2023-01-01T00:00:00Zcreated_by_user_email
optional
[email protected]created_by_user_id
optional
12345dataset
optional
dataset_name
optional
example namedataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000description
optional
example stringlatest_version_number_of_runs
optional
123metrics
optional
name
optional
example namestar_metric
optional
test_case_uuid
optional
123e4567-e89b-12d3-a456-426614174000total_runs
optional
123updated_at
optional
2023-01-01T00:00:00Zupdated_by_user_email
optional
[email protected]updated_by_user_id
optional
12345version
optional
123name
optional
example nameName of the workspace
updated_at
optional
2023-01-01T00:00:00ZUpdate date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"agent": {
"anthropic_api_key": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"api_key_infos": [],
"api_keys": [],
"chatbot": {
"allowed_domains": [
"example string"
],
"button_background_color": "example string",
"logo": "example string",
"name": "example name",
"primary_color": "example string",
"secondary_color": "example string",
"starting_message": "example string"
},
"chatbot_identifiers": [],
"child_agents": [],
"conversation_logs_enabled": true,
"created_at": "2023-01-01T00:00:00Z",
"deployment": {
"created_at": "2023-01-01T00:00:00Z",
"name": "example name",
"status": "STATUS_UNKNOWN",
"updated_at": "2023-01-01T00:00:00Z",
"url": "example string",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"visibility": "VISIBILITY_UNKNOWN"
},
"description": "example string",
"functions": [],
"guardrails": [],
"if_case": "example string",
"instruction": "example string",
"k": 123,
"knowledge_bases": [],
"logging_config": {
"galileo_project_id": "123e4567-e89b-12d3-a456-426614174000",
"galileo_project_name": "example name",
"insights_enabled": true,
"insights_enabled_at": "2023-01-01T00:00:00Z",
"log_stream_id": "123e4567-e89b-12d3-a456-426614174000",
"log_stream_name": "example name"
},
"max_tokens": 123,
"mcp_servers": [],
"model": {
"capabilities": [
"example string"
],
"context_window": "12345",
"created_at": "2023-01-01T00:00:00Z",
"endpoints": [],
"inference_name": "example name",
"inference_version": "example string",
"is_foundational": true,
"kb_default_chunk_size": 123,
"kb_max_chunk_size": 123,
"kb_min_chunk_size": 123,
"lifecycle_status": "example string",
"name": "example name",
"parameter_count": 123,
"parent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"reasoning_efforts": [
"example string"
],
"settings": [],
"thinking": true,
"type": "example string",
"updated_at": "2023-01-01T00:00:00Z",
"upload_complete": true,
"url": "example string",
"usecases": [
"MODEL_USECASE_AGENT",
"MODEL_USECASE_GUARDRAIL"
],
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"model_provider_key": {
"api_key_uuid": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [],
"name": "example name",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"updated_at": "2023-01-01T00:00:00Z"
},
"model_router": {
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"name": "example name",
"regions": [
"example string"
],
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"name": "example name",
"openai_api_key": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"parent_agents": [],
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"provide_citations": true,
"reasoning_effort": "example string",
"region": "example string",
"retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",
"route_created_at": "2023-01-01T00:00:00Z",
"route_created_by": "12345",
"route_name": "example name",
"route_uuid": "123e4567-e89b-12d3-a456-426614174000",
"tags": [
"example string"
],
"temperature": 123,
"template": {
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"guardrails": [],
"instruction": "example string",
"k": 123,
"knowledge_bases": [],
"long_description": "\"Enhance your customer service with an AI agent designed to provide consistent, helpful, and accurate support across multiple channels. This template creates an agent that can answer product questions, troubleshoot common issues, process simple requests, and maintain a friendly, on-brand voice throughout customer interactions. Reduce response times, handle routine inquiries efficiently, and ensure your customers feel heard and helped.\"",
"max_tokens": 123,
"name": "example name",
"short_description": "\"This template has been designed with question-answer and conversational use cases in mind. It comes with validated agent instructions, fine-tuned model settings, and preconfigured guardrails defined for customer support-related use cases.\"",
"summary": "example string",
"tags": [
"example string"
],
"temperature": 123,
"template_type": "AGENT_TEMPLATE_TYPE_STANDARD",
"top_p": 123,
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"thinking_token_budget": 123,
"top_p": 123,
"updated_at": "2023-01-01T00:00:00Z",
"url": "example string",
"user_id": "12345",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"version_hash": "example string",
"vpc_egress_ips": [
"example string"
],
"vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"workspace": {
"agents": [],
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"created_by_email": "[email protected]",
"deleted_at": "2023-01-01T00:00:00Z",
"description": "example string",
"evaluation_test_cases": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}DELETE Detach a Guardrail from an Agent
/v2/gen-ai/agents/{agent_uuid}/guardrails/{guardrail_uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To detach a guardrail from an agent, send a DELETE request to /v2/gen-ai/agents/{agent_uuid}/guardrails/{guardrail_uuid}.
Path Parameters
agent_uuid
required
"123e4567-e89b-12d3-a456-426614174000"The UUID of the agent.
guardrail_uuid
required
"123e4567-e89b-12d3-a456-426614174000"The UUID of the guardrail to detach.
Request: /v2/gen-ai/agents/{agent_uuid}/guardrails/{guardrail_uuid}
curl -X DELETE \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/agents/1c8be326-00fe-11f1-b542-ca68c578b04c/guardrails/69bcc61c-2bb2-49fd-b6ed-7c1bd73d6572"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
agent
optional
An Agent
Show child properties
anthropic_api_key
optional
Anthropic API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_key_infos
optional
Api key infos
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_keys
optional
Api keys
Show child properties
api_key
optional
example stringApi key
chatbot
optional
A Chatbot
Show child properties
allowed_domains
optional
["example string"]button_background_color
optional
example stringlogo
optional
example stringname
optional
example nameName of chatbot
primary_color
optional
example stringsecondary_color
optional
example stringstarting_message
optional
example stringchatbot_identifiers
optional
Chatbot identifiers
Show child properties
agent_chatbot_identifier
optional
123e4567-e89b-12d3-a456-426614174000Agent chatbot identifier
child_agents
optional
Child agents
conversation_logs_enabled
optional
trueWhether conversation logs are enabled for the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
deployment
optional
Description of deployment
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date / time
name
optional
example nameName
status
optional
STATUS_UNKNOWNupdated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your deployed agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
visibility
optional
VISIBILITY_UNKNOWN- VISIBILITY_UNKNOWN: The status of the deployment is unknown
- VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests
- VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state
- VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet
- VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys
description
optional
example stringDescription of agent
functions
optional
Show child properties
api_key
optional
example stringApi key
created_at
optional
2023-01-01T00:00:00ZCreation date / time
created_by
optional
12345Created by user id from DO
description
optional
example stringAgent description
faas_name
optional
example namefaas_namespace
optional
example nameinput_schema
optional
name
optional
example nameName
output_schema
optional
updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringDownload your agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
guardrails
optional
The guardrails the agent is attached to
Show child properties
agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000created_at
optional
2023-01-01T00:00:00Zdefault_response
optional
example stringdescription
optional
example stringguardrail_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_attached
optional
trueis_default
optional
truemetadata
optional
name
optional
example namepriority
optional
123type
optional
GUARDRAIL_TYPE_UNKNOWNupdated_at
optional
2023-01-01T00:00:00Zuuid
optional
123e4567-e89b-12d3-a456-426614174000if_case
optional
example stringinstruction
optional
example stringAgent instruction. Instructions help your agent to perform its job effectively. See Write Effective Agent Instructions for best practices.
k
optional
123knowledge_bases
optional
Knowledge bases
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
Show child properties
completed_datasources
optional
123Number of datasources indexed completed
created_at
optional
2023-01-01T00:00:00ZCreation date / time
data_source_jobs
optional
Details on Data Sources included in the Indexing Job
data_source_uuids
optional
["example string"]finished_at
optional
2023-01-01T00:00:00Zis_report_available
optional
trueBoolean value to determine if the indexing job details are available
knowledge_base_uuid
optional
123e4567-e89b-12d3-a456-426614174000Knowledge base id
phase
optional
BATCH_JOB_PHASE_UNKNOWNstarted_at
optional
2023-01-01T00:00:00Zstatus
optional
INDEX_JOB_STATUS_UNKNOWNtokens
optional
123Number of tokens [This field is deprecated]
total_datasources
optional
123Number of datasources being indexed
total_tokens
optional
12345Total Tokens Consumed By the Indexing Job
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
Show child properties
enabled
optional
trueWhether reranking is enabled for retrieval
model
optional
"bge-reranker-v2-m3"Reranker model internal name
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
logging_config
optional
Show child properties
galileo_project_id
optional
123e4567-e89b-12d3-a456-426614174000Galileo project identifier
galileo_project_name
optional
example nameName of the Galileo project
insights_enabled
optional
trueWhether insights are enabled
insights_enabled_at
optional
2023-01-01T00:00:00ZTimestamp when insights were enabled
log_stream_id
optional
123e4567-e89b-12d3-a456-426614174000Identifier for the log stream
log_stream_name
optional
example nameName of the log stream
max_tokens
optional
123mcp_servers
optional
MCP (Model Context Protocol) servers attached to this agent
Show child properties
allowed_tools
optional
["example string"]Optional list of allowed tool names to expose from this server
authorization
optional
example stringOptional authorization header value for the MCP server
headers
optional
Optional additional headers to send to the MCP server
server_label
optional
example stringA label identifying this MCP server
server_url
optional
example stringThe URL of the MCP server
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
Show child properties
description
optional
example stringname
optional
example nameurl
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
Show child properties
capabilities
optional
["example string"]Capabilities supported by this endpoint (e.g. input_text, output_text, input_image)
endpoint
optional
/chat/responsesThe endpoint path (e.g. /chat/responses)
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
Show child properties
input
optional
["example string"]output
optional
["example string"]name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
Show child properties
default_string
optional
example stringString default value (for type="dropdown", e.g. "medium")
default_value
optional
0.7Numeric default value (for type="number")
max
optional
1Maximum allowed value (for type="number")
min
optional
0Minimum allowed value (for type="number")
name
optional
temperatureSetting key name (e.g. "max_tokens", "temperature", "resolution")
options
optional
["example string"]Allowed values for dropdown selections (for type="dropdown")
step
optional
123Step increment for numeric settings (for type="number")
type
optional
numberSetting value type: "number" or "dropdown"
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
Show child properties
major
optional
123Major version number
minor
optional
123Minor version number
patch
optional
123Patch version number
model_provider_key
optional
Show child properties
api_key_uuid
optional
123e4567-e89b-12d3-a456-426614174000API key ID
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the key
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_at
optional
2023-01-01T00:00:00ZKey last updated date
model_router
optional
Model router
Show child properties
config
optional
Show child properties
fallback_models
optional
["example string"]Router-level fallback models
policies
optional
Task routing policies
created_at
optional
2023-01-01T00:00:00ZCreation date / time
description
optional
example stringDescription
name
optional
example nameName of the model router
regions
optional
["example string"]Target regions for the router
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameAgent name
openai_api_key
optional
OpenAI API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
parent_agents
optional
Parent agents
project_id
optional
123e4567-e89b-12d3-a456-426614174000provide_citations
optional
trueWhether the agent should provide in-response citations
reasoning_effort
optional
example stringThe reasoning effort for the agent
region
optional
example stringRegion code
retrieval_method
optional
RETRIEVAL_METHOD_UNKNOWN- RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown
- RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite
- RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back
- RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries
- RETRIEVAL_METHOD_NONE: The retrieval method is none
route_created_at
optional
2023-01-01T00:00:00ZCreation of route date / time
route_created_by
optional
12345route_name
optional
example nameRoute name
route_uuid
optional
123e4567-e89b-12d3-a456-426614174000tags
optional
["example string"]Agent tag to organize related resources
temperature
optional
123template
optional
Represents an AgentTemplate entity
Show child properties
created_at
optional
2023-01-01T00:00:00ZThe agent template's creation date
description
optional
example stringDeprecated - Use summary instead
guardrails
optional
List of guardrails associated with the agent template
Show child properties
priority
optional
123Priority of the guardrail
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the guardrail
instruction
optional
example stringInstructions for the agent template
k
optional
123The 'k' value for the agent template
knowledge_bases
optional
List of knowledge bases associated with the agent template
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
long_description
optional
The long description of the agent template
max_tokens
optional
123The max_tokens setting for the agent template
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the agent template
short_description
optional
The short description of the agent template
summary
optional
example stringThe summary of the agent template
tags
optional
["example string"]List of tags associated with the agent template
temperature
optional
123The temperature setting for the agent template
template_type
optional
AGENT_TEMPLATE_TYPE_STANDARD- AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template
- AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template
top_p
optional
123The top_p setting for the agent template
updated_at
optional
2023-01-01T00:00:00ZThe agent template's last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
thinking_token_budget
optional
123The thinking token budget for Anthropic extended thinking (0 = disabled)
top_p
optional
123updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your agent under this url
user_id
optional
12345Id of user that created the agent
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique agent id
version_hash
optional
example stringThe latest version of the agent
vpc_egress_ips
optional
["example string"]VPC Egress IPs
vpc_uuid
optional
"12345678-1234-1234-1234-123456789012"workspace
optional
Show child properties
agents
optional
Agents
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345The id of user who created this workspace
created_by_email
optional
[email protected]The email of the user who created this workspace
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
description
optional
example stringDescription of the workspace
evaluation_test_cases
optional
Evaluations
Show child properties
archived_at
optional
2023-01-01T00:00:00Zcreated_at
optional
2023-01-01T00:00:00Zcreated_by_user_email
optional
[email protected]created_by_user_id
optional
12345dataset
optional
dataset_name
optional
example namedataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000description
optional
example stringlatest_version_number_of_runs
optional
123metrics
optional
name
optional
example namestar_metric
optional
test_case_uuid
optional
123e4567-e89b-12d3-a456-426614174000total_runs
optional
123updated_at
optional
2023-01-01T00:00:00Zupdated_by_user_email
optional
[email protected]updated_by_user_id
optional
12345version
optional
123name
optional
example nameName of the workspace
updated_at
optional
2023-01-01T00:00:00ZUpdate date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"agent": {
"anthropic_api_key": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"api_key_infos": [],
"api_keys": [],
"chatbot": {
"allowed_domains": [
"example string"
],
"button_background_color": "example string",
"logo": "example string",
"name": "example name",
"primary_color": "example string",
"secondary_color": "example string",
"starting_message": "example string"
},
"chatbot_identifiers": [],
"child_agents": [],
"conversation_logs_enabled": true,
"created_at": "2023-01-01T00:00:00Z",
"deployment": {
"created_at": "2023-01-01T00:00:00Z",
"name": "example name",
"status": "STATUS_UNKNOWN",
"updated_at": "2023-01-01T00:00:00Z",
"url": "example string",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"visibility": "VISIBILITY_UNKNOWN"
},
"description": "example string",
"functions": [],
"guardrails": [],
"if_case": "example string",
"instruction": "example string",
"k": 123,
"knowledge_bases": [],
"logging_config": {
"galileo_project_id": "123e4567-e89b-12d3-a456-426614174000",
"galileo_project_name": "example name",
"insights_enabled": true,
"insights_enabled_at": "2023-01-01T00:00:00Z",
"log_stream_id": "123e4567-e89b-12d3-a456-426614174000",
"log_stream_name": "example name"
},
"max_tokens": 123,
"mcp_servers": [],
"model": {
"capabilities": [
"example string"
],
"context_window": "12345",
"created_at": "2023-01-01T00:00:00Z",
"endpoints": [],
"inference_name": "example name",
"inference_version": "example string",
"is_foundational": true,
"kb_default_chunk_size": 123,
"kb_max_chunk_size": 123,
"kb_min_chunk_size": 123,
"lifecycle_status": "example string",
"name": "example name",
"parameter_count": 123,
"parent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"reasoning_efforts": [
"example string"
],
"settings": [],
"thinking": true,
"type": "example string",
"updated_at": "2023-01-01T00:00:00Z",
"upload_complete": true,
"url": "example string",
"usecases": [
"MODEL_USECASE_AGENT",
"MODEL_USECASE_GUARDRAIL"
],
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"model_provider_key": {
"api_key_uuid": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [],
"name": "example name",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"updated_at": "2023-01-01T00:00:00Z"
},
"model_router": {
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"name": "example name",
"regions": [
"example string"
],
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"name": "example name",
"openai_api_key": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"parent_agents": [],
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"provide_citations": true,
"reasoning_effort": "example string",
"region": "example string",
"retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",
"route_created_at": "2023-01-01T00:00:00Z",
"route_created_by": "12345",
"route_name": "example name",
"route_uuid": "123e4567-e89b-12d3-a456-426614174000",
"tags": [
"example string"
],
"temperature": 123,
"template": {
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"guardrails": [],
"instruction": "example string",
"k": 123,
"knowledge_bases": [],
"long_description": "\"Enhance your customer service with an AI agent designed to provide consistent, helpful, and accurate support across multiple channels. This template creates an agent that can answer product questions, troubleshoot common issues, process simple requests, and maintain a friendly, on-brand voice throughout customer interactions. Reduce response times, handle routine inquiries efficiently, and ensure your customers feel heard and helped.\"",
"max_tokens": 123,
"name": "example name",
"short_description": "\"This template has been designed with question-answer and conversational use cases in mind. It comes with validated agent instructions, fine-tuned model settings, and preconfigured guardrails defined for customer support-related use cases.\"",
"summary": "example string",
"tags": [
"example string"
],
"temperature": 123,
"template_type": "AGENT_TEMPLATE_TYPE_STANDARD",
"top_p": 123,
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"thinking_token_budget": 123,
"top_p": 123,
"updated_at": "2023-01-01T00:00:00Z",
"url": "example string",
"user_id": "12345",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"version_hash": "example string",
"vpc_egress_ips": [
"example string"
],
"vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"workspace": {
"agents": [],
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"created_by_email": "[email protected]",
"deleted_at": "2023-01-01T00:00:00Z",
"description": "example string",
"evaluation_test_cases": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}POST Attach Knowledge Bases to an Agent
/v2/gen-ai/agents/{agent_uuid}/knowledge_bases
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To attach knowledge bases to an agent, send a POST request to /v2/gen-ai/agents/{agent_uuid}/knowledge_bases
Path Parameters
agent_uuid
required
"123e4567-e89b-12d3-a456-426614174000"A unique identifier for an agent.
Request: /v2/gen-ai/agents/{agent_uuid}/knowledge_bases
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/agents/1b418231-b7d6-11ef-bf8f-4e013e2ddde4/knowledge_bases" \
-d '{
"agent_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4",
"knowledge_base_uuids": [
"9a6e3975-b0c6-11ef-bf8f-4e013e2ddde4",
"683c3100-7c18-4c94-aea4-5ac5875cc87c",
"4887a78b-74af-46b3-98f4-451a48f9cc5e"
]
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
agent
optional
An Agent
Show child properties
anthropic_api_key
optional
Anthropic API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_key_infos
optional
Api key infos
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_keys
optional
Api keys
Show child properties
api_key
optional
example stringApi key
chatbot
optional
A Chatbot
Show child properties
allowed_domains
optional
["example string"]button_background_color
optional
example stringlogo
optional
example stringname
optional
example nameName of chatbot
primary_color
optional
example stringsecondary_color
optional
example stringstarting_message
optional
example stringchatbot_identifiers
optional
Chatbot identifiers
Show child properties
agent_chatbot_identifier
optional
123e4567-e89b-12d3-a456-426614174000Agent chatbot identifier
child_agents
optional
Child agents
conversation_logs_enabled
optional
trueWhether conversation logs are enabled for the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
deployment
optional
Description of deployment
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date / time
name
optional
example nameName
status
optional
STATUS_UNKNOWNupdated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your deployed agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
visibility
optional
VISIBILITY_UNKNOWN- VISIBILITY_UNKNOWN: The status of the deployment is unknown
- VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests
- VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state
- VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet
- VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys
description
optional
example stringDescription of agent
functions
optional
Show child properties
api_key
optional
example stringApi key
created_at
optional
2023-01-01T00:00:00ZCreation date / time
created_by
optional
12345Created by user id from DO
description
optional
example stringAgent description
faas_name
optional
example namefaas_namespace
optional
example nameinput_schema
optional
name
optional
example nameName
output_schema
optional
updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringDownload your agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
guardrails
optional
The guardrails the agent is attached to
Show child properties
agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000created_at
optional
2023-01-01T00:00:00Zdefault_response
optional
example stringdescription
optional
example stringguardrail_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_attached
optional
trueis_default
optional
truemetadata
optional
name
optional
example namepriority
optional
123type
optional
GUARDRAIL_TYPE_UNKNOWNupdated_at
optional
2023-01-01T00:00:00Zuuid
optional
123e4567-e89b-12d3-a456-426614174000if_case
optional
example stringinstruction
optional
example stringAgent instruction. Instructions help your agent to perform its job effectively. See Write Effective Agent Instructions for best practices.
k
optional
123knowledge_bases
optional
Knowledge bases
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
Show child properties
completed_datasources
optional
123Number of datasources indexed completed
created_at
optional
2023-01-01T00:00:00ZCreation date / time
data_source_jobs
optional
Details on Data Sources included in the Indexing Job
data_source_uuids
optional
["example string"]finished_at
optional
2023-01-01T00:00:00Zis_report_available
optional
trueBoolean value to determine if the indexing job details are available
knowledge_base_uuid
optional
123e4567-e89b-12d3-a456-426614174000Knowledge base id
phase
optional
BATCH_JOB_PHASE_UNKNOWNstarted_at
optional
2023-01-01T00:00:00Zstatus
optional
INDEX_JOB_STATUS_UNKNOWNtokens
optional
123Number of tokens [This field is deprecated]
total_datasources
optional
123Number of datasources being indexed
total_tokens
optional
12345Total Tokens Consumed By the Indexing Job
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
Show child properties
enabled
optional
trueWhether reranking is enabled for retrieval
model
optional
"bge-reranker-v2-m3"Reranker model internal name
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
logging_config
optional
Show child properties
galileo_project_id
optional
123e4567-e89b-12d3-a456-426614174000Galileo project identifier
galileo_project_name
optional
example nameName of the Galileo project
insights_enabled
optional
trueWhether insights are enabled
insights_enabled_at
optional
2023-01-01T00:00:00ZTimestamp when insights were enabled
log_stream_id
optional
123e4567-e89b-12d3-a456-426614174000Identifier for the log stream
log_stream_name
optional
example nameName of the log stream
max_tokens
optional
123mcp_servers
optional
MCP (Model Context Protocol) servers attached to this agent
Show child properties
allowed_tools
optional
["example string"]Optional list of allowed tool names to expose from this server
authorization
optional
example stringOptional authorization header value for the MCP server
headers
optional
Optional additional headers to send to the MCP server
server_label
optional
example stringA label identifying this MCP server
server_url
optional
example stringThe URL of the MCP server
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
Show child properties
description
optional
example stringname
optional
example nameurl
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
Show child properties
capabilities
optional
["example string"]Capabilities supported by this endpoint (e.g. input_text, output_text, input_image)
endpoint
optional
/chat/responsesThe endpoint path (e.g. /chat/responses)
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
Show child properties
input
optional
["example string"]output
optional
["example string"]name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
Show child properties
default_string
optional
example stringString default value (for type="dropdown", e.g. "medium")
default_value
optional
0.7Numeric default value (for type="number")
max
optional
1Maximum allowed value (for type="number")
min
optional
0Minimum allowed value (for type="number")
name
optional
temperatureSetting key name (e.g. "max_tokens", "temperature", "resolution")
options
optional
["example string"]Allowed values for dropdown selections (for type="dropdown")
step
optional
123Step increment for numeric settings (for type="number")
type
optional
numberSetting value type: "number" or "dropdown"
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
Show child properties
major
optional
123Major version number
minor
optional
123Minor version number
patch
optional
123Patch version number
model_provider_key
optional
Show child properties
api_key_uuid
optional
123e4567-e89b-12d3-a456-426614174000API key ID
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the key
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_at
optional
2023-01-01T00:00:00ZKey last updated date
model_router
optional
Model router
Show child properties
config
optional
Show child properties
fallback_models
optional
["example string"]Router-level fallback models
policies
optional
Task routing policies
created_at
optional
2023-01-01T00:00:00ZCreation date / time
description
optional
example stringDescription
name
optional
example nameName of the model router
regions
optional
["example string"]Target regions for the router
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameAgent name
openai_api_key
optional
OpenAI API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
parent_agents
optional
Parent agents
project_id
optional
123e4567-e89b-12d3-a456-426614174000provide_citations
optional
trueWhether the agent should provide in-response citations
reasoning_effort
optional
example stringThe reasoning effort for the agent
region
optional
example stringRegion code
retrieval_method
optional
RETRIEVAL_METHOD_UNKNOWN- RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown
- RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite
- RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back
- RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries
- RETRIEVAL_METHOD_NONE: The retrieval method is none
route_created_at
optional
2023-01-01T00:00:00ZCreation of route date / time
route_created_by
optional
12345route_name
optional
example nameRoute name
route_uuid
optional
123e4567-e89b-12d3-a456-426614174000tags
optional
["example string"]Agent tag to organize related resources
temperature
optional
123template
optional
Represents an AgentTemplate entity
Show child properties
created_at
optional
2023-01-01T00:00:00ZThe agent template's creation date
description
optional
example stringDeprecated - Use summary instead
guardrails
optional
List of guardrails associated with the agent template
Show child properties
priority
optional
123Priority of the guardrail
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the guardrail
instruction
optional
example stringInstructions for the agent template
k
optional
123The 'k' value for the agent template
knowledge_bases
optional
List of knowledge bases associated with the agent template
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
long_description
optional
The long description of the agent template
max_tokens
optional
123The max_tokens setting for the agent template
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the agent template
short_description
optional
The short description of the agent template
summary
optional
example stringThe summary of the agent template
tags
optional
["example string"]List of tags associated with the agent template
temperature
optional
123The temperature setting for the agent template
template_type
optional
AGENT_TEMPLATE_TYPE_STANDARD- AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template
- AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template
top_p
optional
123The top_p setting for the agent template
updated_at
optional
2023-01-01T00:00:00ZThe agent template's last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
thinking_token_budget
optional
123The thinking token budget for Anthropic extended thinking (0 = disabled)
top_p
optional
123updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your agent under this url
user_id
optional
12345Id of user that created the agent
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique agent id
version_hash
optional
example stringThe latest version of the agent
vpc_egress_ips
optional
["example string"]VPC Egress IPs
vpc_uuid
optional
"12345678-1234-1234-1234-123456789012"workspace
optional
Show child properties
agents
optional
Agents
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345The id of user who created this workspace
created_by_email
optional
[email protected]The email of the user who created this workspace
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
description
optional
example stringDescription of the workspace
evaluation_test_cases
optional
Evaluations
Show child properties
archived_at
optional
2023-01-01T00:00:00Zcreated_at
optional
2023-01-01T00:00:00Zcreated_by_user_email
optional
[email protected]created_by_user_id
optional
12345dataset
optional
dataset_name
optional
example namedataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000description
optional
example stringlatest_version_number_of_runs
optional
123metrics
optional
name
optional
example namestar_metric
optional
test_case_uuid
optional
123e4567-e89b-12d3-a456-426614174000total_runs
optional
123updated_at
optional
2023-01-01T00:00:00Zupdated_by_user_email
optional
[email protected]updated_by_user_id
optional
12345version
optional
123name
optional
example nameName of the workspace
updated_at
optional
2023-01-01T00:00:00ZUpdate date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"agent": {
"anthropic_api_key": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"api_key_infos": [],
"api_keys": [],
"chatbot": {
"allowed_domains": [
"example string"
],
"button_background_color": "example string",
"logo": "example string",
"name": "example name",
"primary_color": "example string",
"secondary_color": "example string",
"starting_message": "example string"
},
"chatbot_identifiers": [],
"child_agents": [],
"conversation_logs_enabled": true,
"created_at": "2023-01-01T00:00:00Z",
"deployment": {
"created_at": "2023-01-01T00:00:00Z",
"name": "example name",
"status": "STATUS_UNKNOWN",
"updated_at": "2023-01-01T00:00:00Z",
"url": "example string",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"visibility": "VISIBILITY_UNKNOWN"
},
"description": "example string",
"functions": [],
"guardrails": [],
"if_case": "example string",
"instruction": "example string",
"k": 123,
"knowledge_bases": [],
"logging_config": {
"galileo_project_id": "123e4567-e89b-12d3-a456-426614174000",
"galileo_project_name": "example name",
"insights_enabled": true,
"insights_enabled_at": "2023-01-01T00:00:00Z",
"log_stream_id": "123e4567-e89b-12d3-a456-426614174000",
"log_stream_name": "example name"
},
"max_tokens": 123,
"mcp_servers": [],
"model": {
"capabilities": [
"example string"
],
"context_window": "12345",
"created_at": "2023-01-01T00:00:00Z",
"endpoints": [],
"inference_name": "example name",
"inference_version": "example string",
"is_foundational": true,
"kb_default_chunk_size": 123,
"kb_max_chunk_size": 123,
"kb_min_chunk_size": 123,
"lifecycle_status": "example string",
"name": "example name",
"parameter_count": 123,
"parent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"reasoning_efforts": [
"example string"
],
"settings": [],
"thinking": true,
"type": "example string",
"updated_at": "2023-01-01T00:00:00Z",
"upload_complete": true,
"url": "example string",
"usecases": [
"MODEL_USECASE_AGENT",
"MODEL_USECASE_GUARDRAIL"
],
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"model_provider_key": {
"api_key_uuid": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [],
"name": "example name",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"updated_at": "2023-01-01T00:00:00Z"
},
"model_router": {
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"name": "example name",
"regions": [
"example string"
],
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"name": "example name",
"openai_api_key": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"parent_agents": [],
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"provide_citations": true,
"reasoning_effort": "example string",
"region": "example string",
"retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",
"route_created_at": "2023-01-01T00:00:00Z",
"route_created_by": "12345",
"route_name": "example name",
"route_uuid": "123e4567-e89b-12d3-a456-426614174000",
"tags": [
"example string"
],
"temperature": 123,
"template": {
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"guardrails": [],
"instruction": "example string",
"k": 123,
"knowledge_bases": [],
"long_description": "\"Enhance your customer service with an AI agent designed to provide consistent, helpful, and accurate support across multiple channels. This template creates an agent that can answer product questions, troubleshoot common issues, process simple requests, and maintain a friendly, on-brand voice throughout customer interactions. Reduce response times, handle routine inquiries efficiently, and ensure your customers feel heard and helped.\"",
"max_tokens": 123,
"name": "example name",
"short_description": "\"This template has been designed with question-answer and conversational use cases in mind. It comes with validated agent instructions, fine-tuned model settings, and preconfigured guardrails defined for customer support-related use cases.\"",
"summary": "example string",
"tags": [
"example string"
],
"temperature": 123,
"template_type": "AGENT_TEMPLATE_TYPE_STANDARD",
"top_p": 123,
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"thinking_token_budget": 123,
"top_p": 123,
"updated_at": "2023-01-01T00:00:00Z",
"url": "example string",
"user_id": "12345",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"version_hash": "example string",
"vpc_egress_ips": [
"example string"
],
"vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"workspace": {
"agents": [],
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"created_by_email": "[email protected]",
"deleted_at": "2023-01-01T00:00:00Z",
"description": "example string",
"evaluation_test_cases": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}POST Attach Knowledge Base to an Agent
/v2/gen-ai/agents/{agent_uuid}/knowledge_bases/{knowledge_base_uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To attach a knowledge base to an agent, send a POST request to /v2/gen-ai/agents/{agent_uuid}/knowledge_bases/{knowledge_base_uuid}
Path Parameters
agent_uuid
required
"123e4567-e89b-12d3-a456-426614174000"A unique identifier for an agent.
knowledge_base_uuid
required
"123e4567-e89b-12d3-a456-426614174000"A unique identifier for a knowledge base.
Request: /v2/gen-ai/agents/{agent_uuid}/knowledge_bases/{knowledge_base_uuid}
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/agents/1b418231-b7d6-11ef-bf8f-4e013e2ddde4/knowledge_bases/9a6e3975-b0c6-11ef-bf8f-4e013e2ddde4" \
-d '{
"agent_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4",
"agent_uuid": "9a6e3975-b0c6-11ef-bf8f-4e013e2ddde4"
}'
Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
agent
optional
An Agent
Show child properties
anthropic_api_key
optional
Anthropic API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_key_infos
optional
Api key infos
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_keys
optional
Api keys
Show child properties
api_key
optional
example stringApi key
chatbot
optional
A Chatbot
Show child properties
allowed_domains
optional
["example string"]button_background_color
optional
example stringlogo
optional
example stringname
optional
example nameName of chatbot
primary_color
optional
example stringsecondary_color
optional
example stringstarting_message
optional
example stringchatbot_identifiers
optional
Chatbot identifiers
Show child properties
agent_chatbot_identifier
optional
123e4567-e89b-12d3-a456-426614174000Agent chatbot identifier
child_agents
optional
Child agents
conversation_logs_enabled
optional
trueWhether conversation logs are enabled for the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
deployment
optional
Description of deployment
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date / time
name
optional
example nameName
status
optional
STATUS_UNKNOWNupdated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your deployed agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
visibility
optional
VISIBILITY_UNKNOWN- VISIBILITY_UNKNOWN: The status of the deployment is unknown
- VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests
- VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state
- VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet
- VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys
description
optional
example stringDescription of agent
functions
optional
Show child properties
api_key
optional
example stringApi key
created_at
optional
2023-01-01T00:00:00ZCreation date / time
created_by
optional
12345Created by user id from DO
description
optional
example stringAgent description
faas_name
optional
example namefaas_namespace
optional
example nameinput_schema
optional
name
optional
example nameName
output_schema
optional
updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringDownload your agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
guardrails
optional
The guardrails the agent is attached to
Show child properties
agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000created_at
optional
2023-01-01T00:00:00Zdefault_response
optional
example stringdescription
optional
example stringguardrail_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_attached
optional
trueis_default
optional
truemetadata
optional
name
optional
example namepriority
optional
123type
optional
GUARDRAIL_TYPE_UNKNOWNupdated_at
optional
2023-01-01T00:00:00Zuuid
optional
123e4567-e89b-12d3-a456-426614174000if_case
optional
example stringinstruction
optional
example stringAgent instruction. Instructions help your agent to perform its job effectively. See Write Effective Agent Instructions for best practices.
k
optional
123knowledge_bases
optional
Knowledge bases
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
Show child properties
completed_datasources
optional
123Number of datasources indexed completed
created_at
optional
2023-01-01T00:00:00ZCreation date / time
data_source_jobs
optional
Details on Data Sources included in the Indexing Job
data_source_uuids
optional
["example string"]finished_at
optional
2023-01-01T00:00:00Zis_report_available
optional
trueBoolean value to determine if the indexing job details are available
knowledge_base_uuid
optional
123e4567-e89b-12d3-a456-426614174000Knowledge base id
phase
optional
BATCH_JOB_PHASE_UNKNOWNstarted_at
optional
2023-01-01T00:00:00Zstatus
optional
INDEX_JOB_STATUS_UNKNOWNtokens
optional
123Number of tokens [This field is deprecated]
total_datasources
optional
123Number of datasources being indexed
total_tokens
optional
12345Total Tokens Consumed By the Indexing Job
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
Show child properties
enabled
optional
trueWhether reranking is enabled for retrieval
model
optional
"bge-reranker-v2-m3"Reranker model internal name
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
logging_config
optional
Show child properties
galileo_project_id
optional
123e4567-e89b-12d3-a456-426614174000Galileo project identifier
galileo_project_name
optional
example nameName of the Galileo project
insights_enabled
optional
trueWhether insights are enabled
insights_enabled_at
optional
2023-01-01T00:00:00ZTimestamp when insights were enabled
log_stream_id
optional
123e4567-e89b-12d3-a456-426614174000Identifier for the log stream
log_stream_name
optional
example nameName of the log stream
max_tokens
optional
123mcp_servers
optional
MCP (Model Context Protocol) servers attached to this agent
Show child properties
allowed_tools
optional
["example string"]Optional list of allowed tool names to expose from this server
authorization
optional
example stringOptional authorization header value for the MCP server
headers
optional
Optional additional headers to send to the MCP server
server_label
optional
example stringA label identifying this MCP server
server_url
optional
example stringThe URL of the MCP server
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
Show child properties
description
optional
example stringname
optional
example nameurl
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
Show child properties
capabilities
optional
["example string"]Capabilities supported by this endpoint (e.g. input_text, output_text, input_image)
endpoint
optional
/chat/responsesThe endpoint path (e.g. /chat/responses)
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
Show child properties
input
optional
["example string"]output
optional
["example string"]name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
Show child properties
default_string
optional
example stringString default value (for type="dropdown", e.g. "medium")
default_value
optional
0.7Numeric default value (for type="number")
max
optional
1Maximum allowed value (for type="number")
min
optional
0Minimum allowed value (for type="number")
name
optional
temperatureSetting key name (e.g. "max_tokens", "temperature", "resolution")
options
optional
["example string"]Allowed values for dropdown selections (for type="dropdown")
step
optional
123Step increment for numeric settings (for type="number")
type
optional
numberSetting value type: "number" or "dropdown"
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
Show child properties
major
optional
123Major version number
minor
optional
123Minor version number
patch
optional
123Patch version number
model_provider_key
optional
Show child properties
api_key_uuid
optional
123e4567-e89b-12d3-a456-426614174000API key ID
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the key
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_at
optional
2023-01-01T00:00:00ZKey last updated date
model_router
optional
Model router
Show child properties
config
optional
Show child properties
fallback_models
optional
["example string"]Router-level fallback models
policies
optional
Task routing policies
created_at
optional
2023-01-01T00:00:00ZCreation date / time
description
optional
example stringDescription
name
optional
example nameName of the model router
regions
optional
["example string"]Target regions for the router
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameAgent name
openai_api_key
optional
OpenAI API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
parent_agents
optional
Parent agents
project_id
optional
123e4567-e89b-12d3-a456-426614174000provide_citations
optional
trueWhether the agent should provide in-response citations
reasoning_effort
optional
example stringThe reasoning effort for the agent
region
optional
example stringRegion code
retrieval_method
optional
RETRIEVAL_METHOD_UNKNOWN- RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown
- RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite
- RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back
- RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries
- RETRIEVAL_METHOD_NONE: The retrieval method is none
route_created_at
optional
2023-01-01T00:00:00ZCreation of route date / time
route_created_by
optional
12345route_name
optional
example nameRoute name
route_uuid
optional
123e4567-e89b-12d3-a456-426614174000tags
optional
["example string"]Agent tag to organize related resources
temperature
optional
123template
optional
Represents an AgentTemplate entity
Show child properties
created_at
optional
2023-01-01T00:00:00ZThe agent template's creation date
description
optional
example stringDeprecated - Use summary instead
guardrails
optional
List of guardrails associated with the agent template
Show child properties
priority
optional
123Priority of the guardrail
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the guardrail
instruction
optional
example stringInstructions for the agent template
k
optional
123The 'k' value for the agent template
knowledge_bases
optional
List of knowledge bases associated with the agent template
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
long_description
optional
The long description of the agent template
max_tokens
optional
123The max_tokens setting for the agent template
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the agent template
short_description
optional
The short description of the agent template
summary
optional
example stringThe summary of the agent template
tags
optional
["example string"]List of tags associated with the agent template
temperature
optional
123The temperature setting for the agent template
template_type
optional
AGENT_TEMPLATE_TYPE_STANDARD- AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template
- AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template
top_p
optional
123The top_p setting for the agent template
updated_at
optional
2023-01-01T00:00:00ZThe agent template's last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
thinking_token_budget
optional
123The thinking token budget for Anthropic extended thinking (0 = disabled)
top_p
optional
123updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your agent under this url
user_id
optional
12345Id of user that created the agent
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique agent id
version_hash
optional
example stringThe latest version of the agent
vpc_egress_ips
optional
["example string"]VPC Egress IPs
vpc_uuid
optional
"12345678-1234-1234-1234-123456789012"workspace
optional
Show child properties
agents
optional
Agents
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345The id of user who created this workspace
created_by_email
optional
[email protected]The email of the user who created this workspace
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
description
optional
example stringDescription of the workspace
evaluation_test_cases
optional
Evaluations
Show child properties
archived_at
optional
2023-01-01T00:00:00Zcreated_at
optional
2023-01-01T00:00:00Zcreated_by_user_email
optional
[email protected]created_by_user_id
optional
12345dataset
optional
dataset_name
optional
example namedataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000description
optional
example stringlatest_version_number_of_runs
optional
123metrics
optional
name
optional
example namestar_metric
optional
test_case_uuid
optional
123e4567-e89b-12d3-a456-426614174000total_runs
optional
123updated_at
optional
2023-01-01T00:00:00Zupdated_by_user_email
optional
[email protected]updated_by_user_id
optional
12345version
optional
123name
optional
example nameName of the workspace
updated_at
optional
2023-01-01T00:00:00ZUpdate date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"agent": {
"anthropic_api_key": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"api_key_infos": [],
"api_keys": [],
"chatbot": {
"allowed_domains": [
"example string"
],
"button_background_color": "example string",
"logo": "example string",
"name": "example name",
"primary_color": "example string",
"secondary_color": "example string",
"starting_message": "example string"
},
"chatbot_identifiers": [],
"child_agents": [],
"conversation_logs_enabled": true,
"created_at": "2023-01-01T00:00:00Z",
"deployment": {
"created_at": "2023-01-01T00:00:00Z",
"name": "example name",
"status": "STATUS_UNKNOWN",
"updated_at": "2023-01-01T00:00:00Z",
"url": "example string",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"visibility": "VISIBILITY_UNKNOWN"
},
"description": "example string",
"functions": [],
"guardrails": [],
"if_case": "example string",
"instruction": "example string",
"k": 123,
"knowledge_bases": [],
"logging_config": {
"galileo_project_id": "123e4567-e89b-12d3-a456-426614174000",
"galileo_project_name": "example name",
"insights_enabled": true,
"insights_enabled_at": "2023-01-01T00:00:00Z",
"log_stream_id": "123e4567-e89b-12d3-a456-426614174000",
"log_stream_name": "example name"
},
"max_tokens": 123,
"mcp_servers": [],
"model": {
"capabilities": [
"example string"
],
"context_window": "12345",
"created_at": "2023-01-01T00:00:00Z",
"endpoints": [],
"inference_name": "example name",
"inference_version": "example string",
"is_foundational": true,
"kb_default_chunk_size": 123,
"kb_max_chunk_size": 123,
"kb_min_chunk_size": 123,
"lifecycle_status": "example string",
"name": "example name",
"parameter_count": 123,
"parent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"reasoning_efforts": [
"example string"
],
"settings": [],
"thinking": true,
"type": "example string",
"updated_at": "2023-01-01T00:00:00Z",
"upload_complete": true,
"url": "example string",
"usecases": [
"MODEL_USECASE_AGENT",
"MODEL_USECASE_GUARDRAIL"
],
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"model_provider_key": {
"api_key_uuid": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [],
"name": "example name",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"updated_at": "2023-01-01T00:00:00Z"
},
"model_router": {
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"name": "example name",
"regions": [
"example string"
],
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"name": "example name",
"openai_api_key": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"parent_agents": [],
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"provide_citations": true,
"reasoning_effort": "example string",
"region": "example string",
"retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",
"route_created_at": "2023-01-01T00:00:00Z",
"route_created_by": "12345",
"route_name": "example name",
"route_uuid": "123e4567-e89b-12d3-a456-426614174000",
"tags": [
"example string"
],
"temperature": 123,
"template": {
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"guardrails": [],
"instruction": "example string",
"k": 123,
"knowledge_bases": [],
"long_description": "\"Enhance your customer service with an AI agent designed to provide consistent, helpful, and accurate support across multiple channels. This template creates an agent that can answer product questions, troubleshoot common issues, process simple requests, and maintain a friendly, on-brand voice throughout customer interactions. Reduce response times, handle routine inquiries efficiently, and ensure your customers feel heard and helped.\"",
"max_tokens": 123,
"name": "example name",
"short_description": "\"This template has been designed with question-answer and conversational use cases in mind. It comes with validated agent instructions, fine-tuned model settings, and preconfigured guardrails defined for customer support-related use cases.\"",
"summary": "example string",
"tags": [
"example string"
],
"temperature": 123,
"template_type": "AGENT_TEMPLATE_TYPE_STANDARD",
"top_p": 123,
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"thinking_token_budget": 123,
"top_p": 123,
"updated_at": "2023-01-01T00:00:00Z",
"url": "example string",
"user_id": "12345",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"version_hash": "example string",
"vpc_egress_ips": [
"example string"
],
"vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"workspace": {
"agents": [],
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"created_by_email": "[email protected]",
"deleted_at": "2023-01-01T00:00:00Z",
"description": "example string",
"evaluation_test_cases": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}DELETE Detach Knowledge Base from an Agent
/v2/gen-ai/agents/{agent_uuid}/knowledge_bases/{knowledge_base_uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To detach a knowledge base from an agent, send a DELETE request to /v2/gen-ai/agents/{agent_uuid}/knowledge_bases/{knowledge_base_uuid}.
Path Parameters
agent_uuid
required
"123e4567-e89b-12d3-a456-426614174000"Agent id
knowledge_base_uuid
required
"123e4567-e89b-12d3-a456-426614174000"Knowledge base id
Request: /v2/gen-ai/agents/{agent_uuid}/knowledge_bases/{knowledge_base_uuid}
curl -X DELETE \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/knowledge_bases/9a6e3975-b0c6-11ef-bf8f-4e013e2ddde4/data_sources/bd2a2db5-b8b0-11ef-bf8f-4e013e2ddde4"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
agent
optional
An Agent
Show child properties
anthropic_api_key
optional
Anthropic API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_key_infos
optional
Api key infos
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_keys
optional
Api keys
Show child properties
api_key
optional
example stringApi key
chatbot
optional
A Chatbot
Show child properties
allowed_domains
optional
["example string"]button_background_color
optional
example stringlogo
optional
example stringname
optional
example nameName of chatbot
primary_color
optional
example stringsecondary_color
optional
example stringstarting_message
optional
example stringchatbot_identifiers
optional
Chatbot identifiers
Show child properties
agent_chatbot_identifier
optional
123e4567-e89b-12d3-a456-426614174000Agent chatbot identifier
child_agents
optional
Child agents
conversation_logs_enabled
optional
trueWhether conversation logs are enabled for the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
deployment
optional
Description of deployment
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date / time
name
optional
example nameName
status
optional
STATUS_UNKNOWNupdated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your deployed agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
visibility
optional
VISIBILITY_UNKNOWN- VISIBILITY_UNKNOWN: The status of the deployment is unknown
- VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests
- VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state
- VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet
- VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys
description
optional
example stringDescription of agent
functions
optional
Show child properties
api_key
optional
example stringApi key
created_at
optional
2023-01-01T00:00:00ZCreation date / time
created_by
optional
12345Created by user id from DO
description
optional
example stringAgent description
faas_name
optional
example namefaas_namespace
optional
example nameinput_schema
optional
name
optional
example nameName
output_schema
optional
updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringDownload your agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
guardrails
optional
The guardrails the agent is attached to
Show child properties
agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000created_at
optional
2023-01-01T00:00:00Zdefault_response
optional
example stringdescription
optional
example stringguardrail_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_attached
optional
trueis_default
optional
truemetadata
optional
name
optional
example namepriority
optional
123type
optional
GUARDRAIL_TYPE_UNKNOWNupdated_at
optional
2023-01-01T00:00:00Zuuid
optional
123e4567-e89b-12d3-a456-426614174000if_case
optional
example stringinstruction
optional
example stringAgent instruction. Instructions help your agent to perform its job effectively. See Write Effective Agent Instructions for best practices.
k
optional
123knowledge_bases
optional
Knowledge bases
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
Show child properties
completed_datasources
optional
123Number of datasources indexed completed
created_at
optional
2023-01-01T00:00:00ZCreation date / time
data_source_jobs
optional
Details on Data Sources included in the Indexing Job
data_source_uuids
optional
["example string"]finished_at
optional
2023-01-01T00:00:00Zis_report_available
optional
trueBoolean value to determine if the indexing job details are available
knowledge_base_uuid
optional
123e4567-e89b-12d3-a456-426614174000Knowledge base id
phase
optional
BATCH_JOB_PHASE_UNKNOWNstarted_at
optional
2023-01-01T00:00:00Zstatus
optional
INDEX_JOB_STATUS_UNKNOWNtokens
optional
123Number of tokens [This field is deprecated]
total_datasources
optional
123Number of datasources being indexed
total_tokens
optional
12345Total Tokens Consumed By the Indexing Job
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
Show child properties
enabled
optional
trueWhether reranking is enabled for retrieval
model
optional
"bge-reranker-v2-m3"Reranker model internal name
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
logging_config
optional
Show child properties
galileo_project_id
optional
123e4567-e89b-12d3-a456-426614174000Galileo project identifier
galileo_project_name
optional
example nameName of the Galileo project
insights_enabled
optional
trueWhether insights are enabled
insights_enabled_at
optional
2023-01-01T00:00:00ZTimestamp when insights were enabled
log_stream_id
optional
123e4567-e89b-12d3-a456-426614174000Identifier for the log stream
log_stream_name
optional
example nameName of the log stream
max_tokens
optional
123mcp_servers
optional
MCP (Model Context Protocol) servers attached to this agent
Show child properties
allowed_tools
optional
["example string"]Optional list of allowed tool names to expose from this server
authorization
optional
example stringOptional authorization header value for the MCP server
headers
optional
Optional additional headers to send to the MCP server
server_label
optional
example stringA label identifying this MCP server
server_url
optional
example stringThe URL of the MCP server
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
Show child properties
description
optional
example stringname
optional
example nameurl
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
Show child properties
capabilities
optional
["example string"]Capabilities supported by this endpoint (e.g. input_text, output_text, input_image)
endpoint
optional
/chat/responsesThe endpoint path (e.g. /chat/responses)
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
Show child properties
input
optional
["example string"]output
optional
["example string"]name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
Show child properties
default_string
optional
example stringString default value (for type="dropdown", e.g. "medium")
default_value
optional
0.7Numeric default value (for type="number")
max
optional
1Maximum allowed value (for type="number")
min
optional
0Minimum allowed value (for type="number")
name
optional
temperatureSetting key name (e.g. "max_tokens", "temperature", "resolution")
options
optional
["example string"]Allowed values for dropdown selections (for type="dropdown")
step
optional
123Step increment for numeric settings (for type="number")
type
optional
numberSetting value type: "number" or "dropdown"
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
Show child properties
major
optional
123Major version number
minor
optional
123Minor version number
patch
optional
123Patch version number
model_provider_key
optional
Show child properties
api_key_uuid
optional
123e4567-e89b-12d3-a456-426614174000API key ID
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the key
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_at
optional
2023-01-01T00:00:00ZKey last updated date
model_router
optional
Model router
Show child properties
config
optional
Show child properties
fallback_models
optional
["example string"]Router-level fallback models
policies
optional
Task routing policies
created_at
optional
2023-01-01T00:00:00ZCreation date / time
description
optional
example stringDescription
name
optional
example nameName of the model router
regions
optional
["example string"]Target regions for the router
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameAgent name
openai_api_key
optional
OpenAI API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
parent_agents
optional
Parent agents
project_id
optional
123e4567-e89b-12d3-a456-426614174000provide_citations
optional
trueWhether the agent should provide in-response citations
reasoning_effort
optional
example stringThe reasoning effort for the agent
region
optional
example stringRegion code
retrieval_method
optional
RETRIEVAL_METHOD_UNKNOWN- RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown
- RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite
- RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back
- RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries
- RETRIEVAL_METHOD_NONE: The retrieval method is none
route_created_at
optional
2023-01-01T00:00:00ZCreation of route date / time
route_created_by
optional
12345route_name
optional
example nameRoute name
route_uuid
optional
123e4567-e89b-12d3-a456-426614174000tags
optional
["example string"]Agent tag to organize related resources
temperature
optional
123template
optional
Represents an AgentTemplate entity
Show child properties
created_at
optional
2023-01-01T00:00:00ZThe agent template's creation date
description
optional
example stringDeprecated - Use summary instead
guardrails
optional
List of guardrails associated with the agent template
Show child properties
priority
optional
123Priority of the guardrail
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the guardrail
instruction
optional
example stringInstructions for the agent template
k
optional
123The 'k' value for the agent template
knowledge_bases
optional
List of knowledge bases associated with the agent template
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
long_description
optional
The long description of the agent template
max_tokens
optional
123The max_tokens setting for the agent template
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the agent template
short_description
optional
The short description of the agent template
summary
optional
example stringThe summary of the agent template
tags
optional
["example string"]List of tags associated with the agent template
temperature
optional
123The temperature setting for the agent template
template_type
optional
AGENT_TEMPLATE_TYPE_STANDARD- AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template
- AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template
top_p
optional
123The top_p setting for the agent template
updated_at
optional
2023-01-01T00:00:00ZThe agent template's last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
thinking_token_budget
optional
123The thinking token budget for Anthropic extended thinking (0 = disabled)
top_p
optional
123updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your agent under this url
user_id
optional
12345Id of user that created the agent
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique agent id
version_hash
optional
example stringThe latest version of the agent
vpc_egress_ips
optional
["example string"]VPC Egress IPs
vpc_uuid
optional
"12345678-1234-1234-1234-123456789012"workspace
optional
Show child properties
agents
optional
Agents
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345The id of user who created this workspace
created_by_email
optional
[email protected]The email of the user who created this workspace
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
description
optional
example stringDescription of the workspace
evaluation_test_cases
optional
Evaluations
Show child properties
archived_at
optional
2023-01-01T00:00:00Zcreated_at
optional
2023-01-01T00:00:00Zcreated_by_user_email
optional
[email protected]created_by_user_id
optional
12345dataset
optional
dataset_name
optional
example namedataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000description
optional
example stringlatest_version_number_of_runs
optional
123metrics
optional
name
optional
example namestar_metric
optional
test_case_uuid
optional
123e4567-e89b-12d3-a456-426614174000total_runs
optional
123updated_at
optional
2023-01-01T00:00:00Zupdated_by_user_email
optional
[email protected]updated_by_user_id
optional
12345version
optional
123name
optional
example nameName of the workspace
updated_at
optional
2023-01-01T00:00:00ZUpdate date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"agent": {
"anthropic_api_key": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"api_key_infos": [],
"api_keys": [],
"chatbot": {
"allowed_domains": [
"example string"
],
"button_background_color": "example string",
"logo": "example string",
"name": "example name",
"primary_color": "example string",
"secondary_color": "example string",
"starting_message": "example string"
},
"chatbot_identifiers": [],
"child_agents": [],
"conversation_logs_enabled": true,
"created_at": "2023-01-01T00:00:00Z",
"deployment": {
"created_at": "2023-01-01T00:00:00Z",
"name": "example name",
"status": "STATUS_UNKNOWN",
"updated_at": "2023-01-01T00:00:00Z",
"url": "example string",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"visibility": "VISIBILITY_UNKNOWN"
},
"description": "example string",
"functions": [],
"guardrails": [],
"if_case": "example string",
"instruction": "example string",
"k": 123,
"knowledge_bases": [],
"logging_config": {
"galileo_project_id": "123e4567-e89b-12d3-a456-426614174000",
"galileo_project_name": "example name",
"insights_enabled": true,
"insights_enabled_at": "2023-01-01T00:00:00Z",
"log_stream_id": "123e4567-e89b-12d3-a456-426614174000",
"log_stream_name": "example name"
},
"max_tokens": 123,
"mcp_servers": [],
"model": {
"capabilities": [
"example string"
],
"context_window": "12345",
"created_at": "2023-01-01T00:00:00Z",
"endpoints": [],
"inference_name": "example name",
"inference_version": "example string",
"is_foundational": true,
"kb_default_chunk_size": 123,
"kb_max_chunk_size": 123,
"kb_min_chunk_size": 123,
"lifecycle_status": "example string",
"name": "example name",
"parameter_count": 123,
"parent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"reasoning_efforts": [
"example string"
],
"settings": [],
"thinking": true,
"type": "example string",
"updated_at": "2023-01-01T00:00:00Z",
"upload_complete": true,
"url": "example string",
"usecases": [
"MODEL_USECASE_AGENT",
"MODEL_USECASE_GUARDRAIL"
],
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"model_provider_key": {
"api_key_uuid": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [],
"name": "example name",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"updated_at": "2023-01-01T00:00:00Z"
},
"model_router": {
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"name": "example name",
"regions": [
"example string"
],
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"name": "example name",
"openai_api_key": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"parent_agents": [],
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"provide_citations": true,
"reasoning_effort": "example string",
"region": "example string",
"retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",
"route_created_at": "2023-01-01T00:00:00Z",
"route_created_by": "12345",
"route_name": "example name",
"route_uuid": "123e4567-e89b-12d3-a456-426614174000",
"tags": [
"example string"
],
"temperature": 123,
"template": {
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"guardrails": [],
"instruction": "example string",
"k": 123,
"knowledge_bases": [],
"long_description": "\"Enhance your customer service with an AI agent designed to provide consistent, helpful, and accurate support across multiple channels. This template creates an agent that can answer product questions, troubleshoot common issues, process simple requests, and maintain a friendly, on-brand voice throughout customer interactions. Reduce response times, handle routine inquiries efficiently, and ensure your customers feel heard and helped.\"",
"max_tokens": 123,
"name": "example name",
"short_description": "\"This template has been designed with question-answer and conversational use cases in mind. It comes with validated agent instructions, fine-tuned model settings, and preconfigured guardrails defined for customer support-related use cases.\"",
"summary": "example string",
"tags": [
"example string"
],
"temperature": 123,
"template_type": "AGENT_TEMPLATE_TYPE_STANDARD",
"top_p": 123,
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"thinking_token_budget": 123,
"top_p": 123,
"updated_at": "2023-01-01T00:00:00Z",
"url": "example string",
"user_id": "12345",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"version_hash": "example string",
"vpc_egress_ips": [
"example string"
],
"vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"workspace": {
"agents": [],
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"created_by_email": "[email protected]",
"deleted_at": "2023-01-01T00:00:00Z",
"description": "example string",
"evaluation_test_cases": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}POST Add Agent Route to an Agent
/v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To add an agent route to an agent, send a POST request to /v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}.
Path Parameters
parent_agent_uuid
required
"123e4567-e89b-12d3-a456-426614174000"A unique identifier for the parent agent.
child_agent_uuid
required
"123e4567-e89b-12d3-a456-426614174000"Routed agent id
Request Body: application/json
child_agent_uuid
optional
"12345678-1234-1234-1234-123456789012"Routed agent id
if_case
optional
"use this to get weather information"parent_agent_uuid
optional
"12345678-1234-1234-1234-123456789012"A unique identifier for the parent agent.
route_name
optional
"weather_route"Name of route
Request: /v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}
{
"child_agent_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"if_case": "\"use this to get weather information\"",
"parent_agent_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"route_name": "\"weather_route\""
}curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/agents/1b418231-b7d6-11ef-bf8f-4e013e2ddde4/child_agents/6a09d603-b68d-11ef-bf8f-4e013e2ddde4" \
-d '{
"parent_agent_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4",
"child_agent_uuid": "6a09d603-b68d-11ef-bf8f-4e013e2ddde4",
"route_name": "route-token-stat",
"if_case": "for any token related statistics, use this route"
}'
Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
child_agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Routed agent id
parent_agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000A unique identifier for the parent agent.
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"child_agent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"parent_agent_uuid": "123e4567-e89b-12d3-a456-426614174000"
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}PUT Update Agent Route for an Agent
/v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To update an agent route for an agent, send a PUT request to /v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}.
Path Parameters
parent_agent_uuid
required
"123e4567-e89b-12d3-a456-426614174000"A unique identifier for the parent agent.
child_agent_uuid
required
"123e4567-e89b-12d3-a456-426614174000"Routed agent id
Request Body: application/json
child_agent_uuid
optional
"12345678-1234-1234-1234-123456789012"Routed agent id
if_case
optional
"use this to get weather information"Describes the case in which the child agent should be used
parent_agent_uuid
optional
"12345678-1234-1234-1234-123456789012"A unique identifier for the parent agent.
route_name
optional
"weather_route"Route name
uuid
optional
"12345678-1234-1234-1234-123456789012"Unique id of linkage
Request: /v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}
{
"child_agent_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"if_case": "\"use this to get weather information\"",
"parent_agent_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"route_name": "\"weather_route\"",
"uuid": "\"12345678-1234-1234-1234-123456789012\""
}curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/agents/1b418231-b7d6-11ef-bf8f-4e013e2ddde4/child_agents/18c4c90c-cc40-11ef-bf8f-4e013e2ddde4" \
-d '{
"parent_agent_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4",
"child_agent_uuid": "18c4c90c-cc40-11ef-bf8f-4e013e2ddde4",
"route_name": "route-rename-api",
"if_case": "if any token related statistics, use this route only",
"uuid":"a22d2004-bbaa-11ef-bf8f-4e013e2ddde4"
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
child_agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Routed agent id
parent_agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000A unique identifier for the parent agent.
rollback
optional
trueuuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of linkage
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"child_agent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"parent_agent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"rollback": true,
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}DELETE Delete Agent Route for an Agent
/v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To delete an agent route from a parent agent, send a DELETE request to /v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}.
Path Parameters
parent_agent_uuid
required
"123e4567-e89b-12d3-a456-426614174000"Pagent agent id
child_agent_uuid
required
"123e4567-e89b-12d3-a456-426614174000"Routed agent id
Request: /v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}
curl -X DELETE \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/agents/ff47f5b7-96e5-11ef-bf8f-4e013e2ddde4/child_agents/c441bf77-81d6-11ef-bf8f-4e013e2ddde4"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
child_agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Routed agent id
parent_agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Pagent agent id
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"child_agent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"parent_agent_uuid": "123e4567-e89b-12d3-a456-426614174000"
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET Retrieve an Existing Agent
/v2/gen-ai/agents/{uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To retrieve details of an agent, GET request to /v2/gen-ai/agents/{uuid}. The response body is a JSON object containing the agent.
Path Parameters
uuid
required
"123e4567-e89b-12d3-a456-426614174000"Unique agent id
Request: /v2/gen-ai/agents/{uuid}
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/agents/c441bf77-81d6-11ef-bf8f-4e013e2ddde4"
Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
agent
optional
An Agent
Show child properties
anthropic_api_key
optional
Anthropic API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_key_infos
optional
Api key infos
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_keys
optional
Api keys
Show child properties
api_key
optional
example stringApi key
chatbot
optional
A Chatbot
Show child properties
allowed_domains
optional
["example string"]button_background_color
optional
example stringlogo
optional
example stringname
optional
example nameName of chatbot
primary_color
optional
example stringsecondary_color
optional
example stringstarting_message
optional
example stringchatbot_identifiers
optional
Chatbot identifiers
Show child properties
agent_chatbot_identifier
optional
123e4567-e89b-12d3-a456-426614174000Agent chatbot identifier
child_agents
optional
Child agents
conversation_logs_enabled
optional
trueWhether conversation logs are enabled for the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
deployment
optional
Description of deployment
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date / time
name
optional
example nameName
status
optional
STATUS_UNKNOWNupdated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your deployed agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
visibility
optional
VISIBILITY_UNKNOWN- VISIBILITY_UNKNOWN: The status of the deployment is unknown
- VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests
- VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state
- VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet
- VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys
description
optional
example stringDescription of agent
functions
optional
Show child properties
api_key
optional
example stringApi key
created_at
optional
2023-01-01T00:00:00ZCreation date / time
created_by
optional
12345Created by user id from DO
description
optional
example stringAgent description
faas_name
optional
example namefaas_namespace
optional
example nameinput_schema
optional
name
optional
example nameName
output_schema
optional
updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringDownload your agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
guardrails
optional
The guardrails the agent is attached to
Show child properties
agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000created_at
optional
2023-01-01T00:00:00Zdefault_response
optional
example stringdescription
optional
example stringguardrail_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_attached
optional
trueis_default
optional
truemetadata
optional
name
optional
example namepriority
optional
123type
optional
GUARDRAIL_TYPE_UNKNOWNupdated_at
optional
2023-01-01T00:00:00Zuuid
optional
123e4567-e89b-12d3-a456-426614174000if_case
optional
example stringinstruction
optional
example stringAgent instruction. Instructions help your agent to perform its job effectively. See Write Effective Agent Instructions for best practices.
k
optional
123knowledge_bases
optional
Knowledge bases
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
Show child properties
completed_datasources
optional
123Number of datasources indexed completed
created_at
optional
2023-01-01T00:00:00ZCreation date / time
data_source_jobs
optional
Details on Data Sources included in the Indexing Job
data_source_uuids
optional
["example string"]finished_at
optional
2023-01-01T00:00:00Zis_report_available
optional
trueBoolean value to determine if the indexing job details are available
knowledge_base_uuid
optional
123e4567-e89b-12d3-a456-426614174000Knowledge base id
phase
optional
BATCH_JOB_PHASE_UNKNOWNstarted_at
optional
2023-01-01T00:00:00Zstatus
optional
INDEX_JOB_STATUS_UNKNOWNtokens
optional
123Number of tokens [This field is deprecated]
total_datasources
optional
123Number of datasources being indexed
total_tokens
optional
12345Total Tokens Consumed By the Indexing Job
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
Show child properties
enabled
optional
trueWhether reranking is enabled for retrieval
model
optional
"bge-reranker-v2-m3"Reranker model internal name
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
logging_config
optional
Show child properties
galileo_project_id
optional
123e4567-e89b-12d3-a456-426614174000Galileo project identifier
galileo_project_name
optional
example nameName of the Galileo project
insights_enabled
optional
trueWhether insights are enabled
insights_enabled_at
optional
2023-01-01T00:00:00ZTimestamp when insights were enabled
log_stream_id
optional
123e4567-e89b-12d3-a456-426614174000Identifier for the log stream
log_stream_name
optional
example nameName of the log stream
max_tokens
optional
123mcp_servers
optional
MCP (Model Context Protocol) servers attached to this agent
Show child properties
allowed_tools
optional
["example string"]Optional list of allowed tool names to expose from this server
authorization
optional
example stringOptional authorization header value for the MCP server
headers
optional
Optional additional headers to send to the MCP server
server_label
optional
example stringA label identifying this MCP server
server_url
optional
example stringThe URL of the MCP server
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
Show child properties
description
optional
example stringname
optional
example nameurl
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
Show child properties
capabilities
optional
["example string"]Capabilities supported by this endpoint (e.g. input_text, output_text, input_image)
endpoint
optional
/chat/responsesThe endpoint path (e.g. /chat/responses)
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
Show child properties
input
optional
["example string"]output
optional
["example string"]name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
Show child properties
default_string
optional
example stringString default value (for type="dropdown", e.g. "medium")
default_value
optional
0.7Numeric default value (for type="number")
max
optional
1Maximum allowed value (for type="number")
min
optional
0Minimum allowed value (for type="number")
name
optional
temperatureSetting key name (e.g. "max_tokens", "temperature", "resolution")
options
optional
["example string"]Allowed values for dropdown selections (for type="dropdown")
step
optional
123Step increment for numeric settings (for type="number")
type
optional
numberSetting value type: "number" or "dropdown"
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
Show child properties
major
optional
123Major version number
minor
optional
123Minor version number
patch
optional
123Patch version number
model_provider_key
optional
Show child properties
api_key_uuid
optional
123e4567-e89b-12d3-a456-426614174000API key ID
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the key
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_at
optional
2023-01-01T00:00:00ZKey last updated date
model_router
optional
Model router
Show child properties
config
optional
Show child properties
fallback_models
optional
["example string"]Router-level fallback models
policies
optional
Task routing policies
created_at
optional
2023-01-01T00:00:00ZCreation date / time
description
optional
example stringDescription
name
optional
example nameName of the model router
regions
optional
["example string"]Target regions for the router
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameAgent name
openai_api_key
optional
OpenAI API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
parent_agents
optional
Parent agents
project_id
optional
123e4567-e89b-12d3-a456-426614174000provide_citations
optional
trueWhether the agent should provide in-response citations
reasoning_effort
optional
example stringThe reasoning effort for the agent
region
optional
example stringRegion code
retrieval_method
optional
RETRIEVAL_METHOD_UNKNOWN- RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown
- RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite
- RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back
- RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries
- RETRIEVAL_METHOD_NONE: The retrieval method is none
route_created_at
optional
2023-01-01T00:00:00ZCreation of route date / time
route_created_by
optional
12345route_name
optional
example nameRoute name
route_uuid
optional
123e4567-e89b-12d3-a456-426614174000tags
optional
["example string"]Agent tag to organize related resources
temperature
optional
123template
optional
Represents an AgentTemplate entity
Show child properties
created_at
optional
2023-01-01T00:00:00ZThe agent template's creation date
description
optional
example stringDeprecated - Use summary instead
guardrails
optional
List of guardrails associated with the agent template
Show child properties
priority
optional
123Priority of the guardrail
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the guardrail
instruction
optional
example stringInstructions for the agent template
k
optional
123The 'k' value for the agent template
knowledge_bases
optional
List of knowledge bases associated with the agent template
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
long_description
optional
The long description of the agent template
max_tokens
optional
123The max_tokens setting for the agent template
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the agent template
short_description
optional
The short description of the agent template
summary
optional
example stringThe summary of the agent template
tags
optional
["example string"]List of tags associated with the agent template
temperature
optional
123The temperature setting for the agent template
template_type
optional
AGENT_TEMPLATE_TYPE_STANDARD- AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template
- AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template
top_p
optional
123The top_p setting for the agent template
updated_at
optional
2023-01-01T00:00:00ZThe agent template's last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
thinking_token_budget
optional
123The thinking token budget for Anthropic extended thinking (0 = disabled)
top_p
optional
123updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your agent under this url
user_id
optional
12345Id of user that created the agent
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique agent id
version_hash
optional
example stringThe latest version of the agent
vpc_egress_ips
optional
["example string"]VPC Egress IPs
vpc_uuid
optional
"12345678-1234-1234-1234-123456789012"workspace
optional
Show child properties
agents
optional
Agents
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345The id of user who created this workspace
created_by_email
optional
[email protected]The email of the user who created this workspace
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
description
optional
example stringDescription of the workspace
evaluation_test_cases
optional
Evaluations
Show child properties
archived_at
optional
2023-01-01T00:00:00Zcreated_at
optional
2023-01-01T00:00:00Zcreated_by_user_email
optional
[email protected]created_by_user_id
optional
12345dataset
optional
dataset_name
optional
example namedataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000description
optional
example stringlatest_version_number_of_runs
optional
123metrics
optional
name
optional
example namestar_metric
optional
test_case_uuid
optional
123e4567-e89b-12d3-a456-426614174000total_runs
optional
123updated_at
optional
2023-01-01T00:00:00Zupdated_by_user_email
optional
[email protected]updated_by_user_id
optional
12345version
optional
123name
optional
example nameName of the workspace
updated_at
optional
2023-01-01T00:00:00ZUpdate date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"agent": {
"anthropic_api_key": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"api_key_infos": [],
"api_keys": [],
"chatbot": {
"allowed_domains": [
"example string"
],
"button_background_color": "example string",
"logo": "example string",
"name": "example name",
"primary_color": "example string",
"secondary_color": "example string",
"starting_message": "example string"
},
"chatbot_identifiers": [],
"child_agents": [],
"conversation_logs_enabled": true,
"created_at": "2023-01-01T00:00:00Z",
"deployment": {
"created_at": "2023-01-01T00:00:00Z",
"name": "example name",
"status": "STATUS_UNKNOWN",
"updated_at": "2023-01-01T00:00:00Z",
"url": "example string",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"visibility": "VISIBILITY_UNKNOWN"
},
"description": "example string",
"functions": [],
"guardrails": [],
"if_case": "example string",
"instruction": "example string",
"k": 123,
"knowledge_bases": [],
"logging_config": {
"galileo_project_id": "123e4567-e89b-12d3-a456-426614174000",
"galileo_project_name": "example name",
"insights_enabled": true,
"insights_enabled_at": "2023-01-01T00:00:00Z",
"log_stream_id": "123e4567-e89b-12d3-a456-426614174000",
"log_stream_name": "example name"
},
"max_tokens": 123,
"mcp_servers": [],
"model": {
"capabilities": [
"example string"
],
"context_window": "12345",
"created_at": "2023-01-01T00:00:00Z",
"endpoints": [],
"inference_name": "example name",
"inference_version": "example string",
"is_foundational": true,
"kb_default_chunk_size": 123,
"kb_max_chunk_size": 123,
"kb_min_chunk_size": 123,
"lifecycle_status": "example string",
"name": "example name",
"parameter_count": 123,
"parent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"reasoning_efforts": [
"example string"
],
"settings": [],
"thinking": true,
"type": "example string",
"updated_at": "2023-01-01T00:00:00Z",
"upload_complete": true,
"url": "example string",
"usecases": [
"MODEL_USECASE_AGENT",
"MODEL_USECASE_GUARDRAIL"
],
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"model_provider_key": {
"api_key_uuid": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [],
"name": "example name",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"updated_at": "2023-01-01T00:00:00Z"
},
"model_router": {
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"name": "example name",
"regions": [
"example string"
],
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"name": "example name",
"openai_api_key": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"parent_agents": [],
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"provide_citations": true,
"reasoning_effort": "example string",
"region": "example string",
"retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",
"route_created_at": "2023-01-01T00:00:00Z",
"route_created_by": "12345",
"route_name": "example name",
"route_uuid": "123e4567-e89b-12d3-a456-426614174000",
"tags": [
"example string"
],
"temperature": 123,
"template": {
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"guardrails": [],
"instruction": "example string",
"k": 123,
"knowledge_bases": [],
"long_description": "\"Enhance your customer service with an AI agent designed to provide consistent, helpful, and accurate support across multiple channels. This template creates an agent that can answer product questions, troubleshoot common issues, process simple requests, and maintain a friendly, on-brand voice throughout customer interactions. Reduce response times, handle routine inquiries efficiently, and ensure your customers feel heard and helped.\"",
"max_tokens": 123,
"name": "example name",
"short_description": "\"This template has been designed with question-answer and conversational use cases in mind. It comes with validated agent instructions, fine-tuned model settings, and preconfigured guardrails defined for customer support-related use cases.\"",
"summary": "example string",
"tags": [
"example string"
],
"temperature": 123,
"template_type": "AGENT_TEMPLATE_TYPE_STANDARD",
"top_p": 123,
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"thinking_token_budget": 123,
"top_p": 123,
"updated_at": "2023-01-01T00:00:00Z",
"url": "example string",
"user_id": "12345",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"version_hash": "example string",
"vpc_egress_ips": [
"example string"
],
"vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"workspace": {
"agents": [],
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"created_by_email": "[email protected]",
"deleted_at": "2023-01-01T00:00:00Z",
"description": "example string",
"evaluation_test_cases": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}PUT Update an Agent
/v2/gen-ai/agents/{uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To update an agent, send a PUT request to /v2/gen-ai/agents/{uuid}. The response body is a JSON object containing the agent.
Path Parameters
uuid
required
"123e4567-e89b-12d3-a456-426614174000"Unique agent id
Request Body: application/json
agent_log_insights_enabled
optional
trueallowed_domains
optional
["example string"]Optional list of allowed domains for the chatbot - Must use fully qualified domain name (FQDN) such as https://example.com
anthropic_key_uuid
optional
"12345678-1234-1234-1234-123456789012"Optional anthropic key uuid for use with anthropic models
clear_mcp_servers
optional
trueWhen true, removes all MCP servers from the agent. Use this instead of sending an empty mcp_servers array.
conversation_logs_enabled
optional
trueOptional update of conversation logs enabled
description
optional
"My Agent Description"Agent description
instruction
optional
"You are an agent who thinks deeply about the world"Agent instruction. Instructions help your agent to perform its job effectively. See Write Effective Agent Instructions for best practices.
k
optional
5How many results should be considered from an attached knowledge base
max_tokens
optional
100Specifies the maximum number of tokens the model can process in a single input or output, set as a number between 1 and 512. This determines the length of each response.
mcp_servers
optional
MCP (Model Context Protocol) servers to attach to the agent
Show child properties
allowed_tools
optional
["example string"]Optional list of allowed tool names to expose from this server
authorization
optional
example stringOptional authorization header value for the MCP server
headers
optional
Optional additional headers to send to the MCP server
server_label
optional
example stringA label identifying this MCP server
server_url
optional
example stringThe URL of the MCP server
model_provider_key_uuid
optional
"12345678-1234-1234-1234-123456789012"Optional Model Provider uuid for use with provider models
model_router_uuid
optional
"12345678-1234-1234-1234-123456789012"model_uuid
optional
"12345678-1234-1234-1234-123456789012"Identifier for the foundation model.
name
optional
"My New Agent Name"Agent name
open_ai_key_uuid
optional
"12345678-1234-1234-1234-123456789012"Optional OpenAI key uuid for use with OpenAI models
project_id
optional
"12345678-1234-1234-1234-123456789012"The id of the DigitalOcean project this agent will belong to
provide_citations
optional
truereasoning_effort
optional
"low"retrieval_method
optional
RETRIEVAL_METHOD_UNKNOWN- RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown
- RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite
- RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back
- RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries
- RETRIEVAL_METHOD_NONE: The retrieval method is none
router_preset_slug
optional
"general"tags
optional
["example string"]A set of abitrary tags to organize your agent
temperature
optional
0.7Controls the model’s creativity, specified as a number between 0 and 1. Lower values produce more predictable and conservative responses, while higher values encourage creativity and variation.
thinking_token_budget
optional
123top_p
optional
0.9Defines the cumulative probability threshold for word selection, specified as a number between 0 and 1. Higher values allow for more diverse outputs, while lower values ensure focused and coherent responses.
uuid
optional
"12345678-1234-1234-1234-123456789012"Unique agent id
Request: /v2/gen-ai/agents/{uuid}
{
"agent_log_insights_enabled": true,
"allowed_domains": [
"example string"
],
"anthropic_key_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"clear_mcp_servers": true,
"conversation_logs_enabled": true,
"description": "\"My Agent Description\"",
"instruction": "\"You are an agent who thinks deeply about the world\"",
"k": 5,
"max_tokens": 100,
"mcp_servers": [
{
"allowed_tools": [
"example string"
],
"authorization": "example string",
"server_label": "example string",
"server_url": "example string"
}
],
"model_provider_key_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"model_router_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"model_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"name": "\"My New Agent Name\"",
"open_ai_key_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"project_id": "\"12345678-1234-1234-1234-123456789012\"",
"provide_citations": true,
"reasoning_effort": "\"low\"",
"retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",
"router_preset_slug": "\"general\"",
"tags": [
"example string"
],
"temperature": 0.7,
"thinking_token_budget": 123,
"top_p": 0.9,
"uuid": "\"12345678-1234-1234-1234-123456789012\""
}curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/agents/1b418231-b7d6-11ef-bf8f-4e013e2ddde4" \
-d '{
"uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4",
"name": "rename-agent-api",
"instruction": "be a weather reporter and act like you are a pro",
"description": "weather-agent2",
"model_uuid": "95ea6652-75ed-11ef-bf8f-4e013e2ddde4",
"project_id": "37455431-84bd-4fa2-94cf-e8486f8f8c5e",
"tags": [
"tag2"
],
"k": 5,
"temperature": 1,
"top_p": 1,
"max_tokens": 250
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
agent
optional
An Agent
Show child properties
anthropic_api_key
optional
Anthropic API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_key_infos
optional
Api key infos
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_keys
optional
Api keys
Show child properties
api_key
optional
example stringApi key
chatbot
optional
A Chatbot
Show child properties
allowed_domains
optional
["example string"]button_background_color
optional
example stringlogo
optional
example stringname
optional
example nameName of chatbot
primary_color
optional
example stringsecondary_color
optional
example stringstarting_message
optional
example stringchatbot_identifiers
optional
Chatbot identifiers
Show child properties
agent_chatbot_identifier
optional
123e4567-e89b-12d3-a456-426614174000Agent chatbot identifier
child_agents
optional
Child agents
conversation_logs_enabled
optional
trueWhether conversation logs are enabled for the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
deployment
optional
Description of deployment
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date / time
name
optional
example nameName
status
optional
STATUS_UNKNOWNupdated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your deployed agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
visibility
optional
VISIBILITY_UNKNOWN- VISIBILITY_UNKNOWN: The status of the deployment is unknown
- VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests
- VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state
- VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet
- VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys
description
optional
example stringDescription of agent
functions
optional
Show child properties
api_key
optional
example stringApi key
created_at
optional
2023-01-01T00:00:00ZCreation date / time
created_by
optional
12345Created by user id from DO
description
optional
example stringAgent description
faas_name
optional
example namefaas_namespace
optional
example nameinput_schema
optional
name
optional
example nameName
output_schema
optional
updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringDownload your agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
guardrails
optional
The guardrails the agent is attached to
Show child properties
agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000created_at
optional
2023-01-01T00:00:00Zdefault_response
optional
example stringdescription
optional
example stringguardrail_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_attached
optional
trueis_default
optional
truemetadata
optional
name
optional
example namepriority
optional
123type
optional
GUARDRAIL_TYPE_UNKNOWNupdated_at
optional
2023-01-01T00:00:00Zuuid
optional
123e4567-e89b-12d3-a456-426614174000if_case
optional
example stringinstruction
optional
example stringAgent instruction. Instructions help your agent to perform its job effectively. See Write Effective Agent Instructions for best practices.
k
optional
123knowledge_bases
optional
Knowledge bases
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
Show child properties
completed_datasources
optional
123Number of datasources indexed completed
created_at
optional
2023-01-01T00:00:00ZCreation date / time
data_source_jobs
optional
Details on Data Sources included in the Indexing Job
data_source_uuids
optional
["example string"]finished_at
optional
2023-01-01T00:00:00Zis_report_available
optional
trueBoolean value to determine if the indexing job details are available
knowledge_base_uuid
optional
123e4567-e89b-12d3-a456-426614174000Knowledge base id
phase
optional
BATCH_JOB_PHASE_UNKNOWNstarted_at
optional
2023-01-01T00:00:00Zstatus
optional
INDEX_JOB_STATUS_UNKNOWNtokens
optional
123Number of tokens [This field is deprecated]
total_datasources
optional
123Number of datasources being indexed
total_tokens
optional
12345Total Tokens Consumed By the Indexing Job
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
Show child properties
enabled
optional
trueWhether reranking is enabled for retrieval
model
optional
"bge-reranker-v2-m3"Reranker model internal name
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
logging_config
optional
Show child properties
galileo_project_id
optional
123e4567-e89b-12d3-a456-426614174000Galileo project identifier
galileo_project_name
optional
example nameName of the Galileo project
insights_enabled
optional
trueWhether insights are enabled
insights_enabled_at
optional
2023-01-01T00:00:00ZTimestamp when insights were enabled
log_stream_id
optional
123e4567-e89b-12d3-a456-426614174000Identifier for the log stream
log_stream_name
optional
example nameName of the log stream
max_tokens
optional
123mcp_servers
optional
MCP (Model Context Protocol) servers attached to this agent
Show child properties
allowed_tools
optional
["example string"]Optional list of allowed tool names to expose from this server
authorization
optional
example stringOptional authorization header value for the MCP server
headers
optional
Optional additional headers to send to the MCP server
server_label
optional
example stringA label identifying this MCP server
server_url
optional
example stringThe URL of the MCP server
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
Show child properties
description
optional
example stringname
optional
example nameurl
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
Show child properties
capabilities
optional
["example string"]Capabilities supported by this endpoint (e.g. input_text, output_text, input_image)
endpoint
optional
/chat/responsesThe endpoint path (e.g. /chat/responses)
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
Show child properties
input
optional
["example string"]output
optional
["example string"]name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
Show child properties
default_string
optional
example stringString default value (for type="dropdown", e.g. "medium")
default_value
optional
0.7Numeric default value (for type="number")
max
optional
1Maximum allowed value (for type="number")
min
optional
0Minimum allowed value (for type="number")
name
optional
temperatureSetting key name (e.g. "max_tokens", "temperature", "resolution")
options
optional
["example string"]Allowed values for dropdown selections (for type="dropdown")
step
optional
123Step increment for numeric settings (for type="number")
type
optional
numberSetting value type: "number" or "dropdown"
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
Show child properties
major
optional
123Major version number
minor
optional
123Minor version number
patch
optional
123Patch version number
model_provider_key
optional
Show child properties
api_key_uuid
optional
123e4567-e89b-12d3-a456-426614174000API key ID
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the key
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_at
optional
2023-01-01T00:00:00ZKey last updated date
model_router
optional
Model router
Show child properties
config
optional
Show child properties
fallback_models
optional
["example string"]Router-level fallback models
policies
optional
Task routing policies
created_at
optional
2023-01-01T00:00:00ZCreation date / time
description
optional
example stringDescription
name
optional
example nameName of the model router
regions
optional
["example string"]Target regions for the router
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameAgent name
openai_api_key
optional
OpenAI API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
parent_agents
optional
Parent agents
project_id
optional
123e4567-e89b-12d3-a456-426614174000provide_citations
optional
trueWhether the agent should provide in-response citations
reasoning_effort
optional
example stringThe reasoning effort for the agent
region
optional
example stringRegion code
retrieval_method
optional
RETRIEVAL_METHOD_UNKNOWN- RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown
- RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite
- RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back
- RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries
- RETRIEVAL_METHOD_NONE: The retrieval method is none
route_created_at
optional
2023-01-01T00:00:00ZCreation of route date / time
route_created_by
optional
12345route_name
optional
example nameRoute name
route_uuid
optional
123e4567-e89b-12d3-a456-426614174000tags
optional
["example string"]Agent tag to organize related resources
temperature
optional
123template
optional
Represents an AgentTemplate entity
Show child properties
created_at
optional
2023-01-01T00:00:00ZThe agent template's creation date
description
optional
example stringDeprecated - Use summary instead
guardrails
optional
List of guardrails associated with the agent template
Show child properties
priority
optional
123Priority of the guardrail
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the guardrail
instruction
optional
example stringInstructions for the agent template
k
optional
123The 'k' value for the agent template
knowledge_bases
optional
List of knowledge bases associated with the agent template
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
long_description
optional
The long description of the agent template
max_tokens
optional
123The max_tokens setting for the agent template
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the agent template
short_description
optional
The short description of the agent template
summary
optional
example stringThe summary of the agent template
tags
optional
["example string"]List of tags associated with the agent template
temperature
optional
123The temperature setting for the agent template
template_type
optional
AGENT_TEMPLATE_TYPE_STANDARD- AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template
- AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template
top_p
optional
123The top_p setting for the agent template
updated_at
optional
2023-01-01T00:00:00ZThe agent template's last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
thinking_token_budget
optional
123The thinking token budget for Anthropic extended thinking (0 = disabled)
top_p
optional
123updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your agent under this url
user_id
optional
12345Id of user that created the agent
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique agent id
version_hash
optional
example stringThe latest version of the agent
vpc_egress_ips
optional
["example string"]VPC Egress IPs
vpc_uuid
optional
"12345678-1234-1234-1234-123456789012"workspace
optional
Show child properties
agents
optional
Agents
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345The id of user who created this workspace
created_by_email
optional
[email protected]The email of the user who created this workspace
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
description
optional
example stringDescription of the workspace
evaluation_test_cases
optional
Evaluations
Show child properties
archived_at
optional
2023-01-01T00:00:00Zcreated_at
optional
2023-01-01T00:00:00Zcreated_by_user_email
optional
[email protected]created_by_user_id
optional
12345dataset
optional
dataset_name
optional
example namedataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000description
optional
example stringlatest_version_number_of_runs
optional
123metrics
optional
name
optional
example namestar_metric
optional
test_case_uuid
optional
123e4567-e89b-12d3-a456-426614174000total_runs
optional
123updated_at
optional
2023-01-01T00:00:00Zupdated_by_user_email
optional
[email protected]updated_by_user_id
optional
12345version
optional
123name
optional
example nameName of the workspace
updated_at
optional
2023-01-01T00:00:00ZUpdate date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"agent": {
"anthropic_api_key": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"api_key_infos": [],
"api_keys": [],
"chatbot": {
"allowed_domains": [
"example string"
],
"button_background_color": "example string",
"logo": "example string",
"name": "example name",
"primary_color": "example string",
"secondary_color": "example string",
"starting_message": "example string"
},
"chatbot_identifiers": [],
"child_agents": [],
"conversation_logs_enabled": true,
"created_at": "2023-01-01T00:00:00Z",
"deployment": {
"created_at": "2023-01-01T00:00:00Z",
"name": "example name",
"status": "STATUS_UNKNOWN",
"updated_at": "2023-01-01T00:00:00Z",
"url": "example string",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"visibility": "VISIBILITY_UNKNOWN"
},
"description": "example string",
"functions": [],
"guardrails": [],
"if_case": "example string",
"instruction": "example string",
"k": 123,
"knowledge_bases": [],
"logging_config": {
"galileo_project_id": "123e4567-e89b-12d3-a456-426614174000",
"galileo_project_name": "example name",
"insights_enabled": true,
"insights_enabled_at": "2023-01-01T00:00:00Z",
"log_stream_id": "123e4567-e89b-12d3-a456-426614174000",
"log_stream_name": "example name"
},
"max_tokens": 123,
"mcp_servers": [],
"model": {
"capabilities": [
"example string"
],
"context_window": "12345",
"created_at": "2023-01-01T00:00:00Z",
"endpoints": [],
"inference_name": "example name",
"inference_version": "example string",
"is_foundational": true,
"kb_default_chunk_size": 123,
"kb_max_chunk_size": 123,
"kb_min_chunk_size": 123,
"lifecycle_status": "example string",
"name": "example name",
"parameter_count": 123,
"parent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"reasoning_efforts": [
"example string"
],
"settings": [],
"thinking": true,
"type": "example string",
"updated_at": "2023-01-01T00:00:00Z",
"upload_complete": true,
"url": "example string",
"usecases": [
"MODEL_USECASE_AGENT",
"MODEL_USECASE_GUARDRAIL"
],
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"model_provider_key": {
"api_key_uuid": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [],
"name": "example name",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"updated_at": "2023-01-01T00:00:00Z"
},
"model_router": {
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"name": "example name",
"regions": [
"example string"
],
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"name": "example name",
"openai_api_key": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"parent_agents": [],
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"provide_citations": true,
"reasoning_effort": "example string",
"region": "example string",
"retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",
"route_created_at": "2023-01-01T00:00:00Z",
"route_created_by": "12345",
"route_name": "example name",
"route_uuid": "123e4567-e89b-12d3-a456-426614174000",
"tags": [
"example string"
],
"temperature": 123,
"template": {
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"guardrails": [],
"instruction": "example string",
"k": 123,
"knowledge_bases": [],
"long_description": "\"Enhance your customer service with an AI agent designed to provide consistent, helpful, and accurate support across multiple channels. This template creates an agent that can answer product questions, troubleshoot common issues, process simple requests, and maintain a friendly, on-brand voice throughout customer interactions. Reduce response times, handle routine inquiries efficiently, and ensure your customers feel heard and helped.\"",
"max_tokens": 123,
"name": "example name",
"short_description": "\"This template has been designed with question-answer and conversational use cases in mind. It comes with validated agent instructions, fine-tuned model settings, and preconfigured guardrails defined for customer support-related use cases.\"",
"summary": "example string",
"tags": [
"example string"
],
"temperature": 123,
"template_type": "AGENT_TEMPLATE_TYPE_STANDARD",
"top_p": 123,
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"thinking_token_budget": 123,
"top_p": 123,
"updated_at": "2023-01-01T00:00:00Z",
"url": "example string",
"user_id": "12345",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"version_hash": "example string",
"vpc_egress_ips": [
"example string"
],
"vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"workspace": {
"agents": [],
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"created_by_email": "[email protected]",
"deleted_at": "2023-01-01T00:00:00Z",
"description": "example string",
"evaluation_test_cases": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}DELETE Delete an Agent
/v2/gen-ai/agents/{uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To delete an agent, send a DELETE request to /v2/gen-ai/agents/{uuid}.
Path Parameters
uuid
required
"123e4567-e89b-12d3-a456-426614174000"Unique agent id
Request: /v2/gen-ai/agents/{uuid}
curl -X DELETE \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/agent/5581a586-a745-11ef-bf8f-4e013e2ddde4"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
agent
optional
An Agent
Show child properties
anthropic_api_key
optional
Anthropic API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_key_infos
optional
Api key infos
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_keys
optional
Api keys
Show child properties
api_key
optional
example stringApi key
chatbot
optional
A Chatbot
Show child properties
allowed_domains
optional
["example string"]button_background_color
optional
example stringlogo
optional
example stringname
optional
example nameName of chatbot
primary_color
optional
example stringsecondary_color
optional
example stringstarting_message
optional
example stringchatbot_identifiers
optional
Chatbot identifiers
Show child properties
agent_chatbot_identifier
optional
123e4567-e89b-12d3-a456-426614174000Agent chatbot identifier
child_agents
optional
Child agents
conversation_logs_enabled
optional
trueWhether conversation logs are enabled for the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
deployment
optional
Description of deployment
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date / time
name
optional
example nameName
status
optional
STATUS_UNKNOWNupdated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your deployed agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
visibility
optional
VISIBILITY_UNKNOWN- VISIBILITY_UNKNOWN: The status of the deployment is unknown
- VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests
- VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state
- VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet
- VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys
description
optional
example stringDescription of agent
functions
optional
Show child properties
api_key
optional
example stringApi key
created_at
optional
2023-01-01T00:00:00ZCreation date / time
created_by
optional
12345Created by user id from DO
description
optional
example stringAgent description
faas_name
optional
example namefaas_namespace
optional
example nameinput_schema
optional
name
optional
example nameName
output_schema
optional
updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringDownload your agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
guardrails
optional
The guardrails the agent is attached to
Show child properties
agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000created_at
optional
2023-01-01T00:00:00Zdefault_response
optional
example stringdescription
optional
example stringguardrail_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_attached
optional
trueis_default
optional
truemetadata
optional
name
optional
example namepriority
optional
123type
optional
GUARDRAIL_TYPE_UNKNOWNupdated_at
optional
2023-01-01T00:00:00Zuuid
optional
123e4567-e89b-12d3-a456-426614174000if_case
optional
example stringinstruction
optional
example stringAgent instruction. Instructions help your agent to perform its job effectively. See Write Effective Agent Instructions for best practices.
k
optional
123knowledge_bases
optional
Knowledge bases
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
Show child properties
completed_datasources
optional
123Number of datasources indexed completed
created_at
optional
2023-01-01T00:00:00ZCreation date / time
data_source_jobs
optional
Details on Data Sources included in the Indexing Job
data_source_uuids
optional
["example string"]finished_at
optional
2023-01-01T00:00:00Zis_report_available
optional
trueBoolean value to determine if the indexing job details are available
knowledge_base_uuid
optional
123e4567-e89b-12d3-a456-426614174000Knowledge base id
phase
optional
BATCH_JOB_PHASE_UNKNOWNstarted_at
optional
2023-01-01T00:00:00Zstatus
optional
INDEX_JOB_STATUS_UNKNOWNtokens
optional
123Number of tokens [This field is deprecated]
total_datasources
optional
123Number of datasources being indexed
total_tokens
optional
12345Total Tokens Consumed By the Indexing Job
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
Show child properties
enabled
optional
trueWhether reranking is enabled for retrieval
model
optional
"bge-reranker-v2-m3"Reranker model internal name
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
logging_config
optional
Show child properties
galileo_project_id
optional
123e4567-e89b-12d3-a456-426614174000Galileo project identifier
galileo_project_name
optional
example nameName of the Galileo project
insights_enabled
optional
trueWhether insights are enabled
insights_enabled_at
optional
2023-01-01T00:00:00ZTimestamp when insights were enabled
log_stream_id
optional
123e4567-e89b-12d3-a456-426614174000Identifier for the log stream
log_stream_name
optional
example nameName of the log stream
max_tokens
optional
123mcp_servers
optional
MCP (Model Context Protocol) servers attached to this agent
Show child properties
allowed_tools
optional
["example string"]Optional list of allowed tool names to expose from this server
authorization
optional
example stringOptional authorization header value for the MCP server
headers
optional
Optional additional headers to send to the MCP server
server_label
optional
example stringA label identifying this MCP server
server_url
optional
example stringThe URL of the MCP server
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
Show child properties
description
optional
example stringname
optional
example nameurl
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
Show child properties
capabilities
optional
["example string"]Capabilities supported by this endpoint (e.g. input_text, output_text, input_image)
endpoint
optional
/chat/responsesThe endpoint path (e.g. /chat/responses)
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
Show child properties
input
optional
["example string"]output
optional
["example string"]name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
Show child properties
default_string
optional
example stringString default value (for type="dropdown", e.g. "medium")
default_value
optional
0.7Numeric default value (for type="number")
max
optional
1Maximum allowed value (for type="number")
min
optional
0Minimum allowed value (for type="number")
name
optional
temperatureSetting key name (e.g. "max_tokens", "temperature", "resolution")
options
optional
["example string"]Allowed values for dropdown selections (for type="dropdown")
step
optional
123Step increment for numeric settings (for type="number")
type
optional
numberSetting value type: "number" or "dropdown"
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
Show child properties
major
optional
123Major version number
minor
optional
123Minor version number
patch
optional
123Patch version number
model_provider_key
optional
Show child properties
api_key_uuid
optional
123e4567-e89b-12d3-a456-426614174000API key ID
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the key
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_at
optional
2023-01-01T00:00:00ZKey last updated date
model_router
optional
Model router
Show child properties
config
optional
Show child properties
fallback_models
optional
["example string"]Router-level fallback models
policies
optional
Task routing policies
created_at
optional
2023-01-01T00:00:00ZCreation date / time
description
optional
example stringDescription
name
optional
example nameName of the model router
regions
optional
["example string"]Target regions for the router
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameAgent name
openai_api_key
optional
OpenAI API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
parent_agents
optional
Parent agents
project_id
optional
123e4567-e89b-12d3-a456-426614174000provide_citations
optional
trueWhether the agent should provide in-response citations
reasoning_effort
optional
example stringThe reasoning effort for the agent
region
optional
example stringRegion code
retrieval_method
optional
RETRIEVAL_METHOD_UNKNOWN- RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown
- RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite
- RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back
- RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries
- RETRIEVAL_METHOD_NONE: The retrieval method is none
route_created_at
optional
2023-01-01T00:00:00ZCreation of route date / time
route_created_by
optional
12345route_name
optional
example nameRoute name
route_uuid
optional
123e4567-e89b-12d3-a456-426614174000tags
optional
["example string"]Agent tag to organize related resources
temperature
optional
123template
optional
Represents an AgentTemplate entity
Show child properties
created_at
optional
2023-01-01T00:00:00ZThe agent template's creation date
description
optional
example stringDeprecated - Use summary instead
guardrails
optional
List of guardrails associated with the agent template
Show child properties
priority
optional
123Priority of the guardrail
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the guardrail
instruction
optional
example stringInstructions for the agent template
k
optional
123The 'k' value for the agent template
knowledge_bases
optional
List of knowledge bases associated with the agent template
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
long_description
optional
The long description of the agent template
max_tokens
optional
123The max_tokens setting for the agent template
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the agent template
short_description
optional
The short description of the agent template
summary
optional
example stringThe summary of the agent template
tags
optional
["example string"]List of tags associated with the agent template
temperature
optional
123The temperature setting for the agent template
template_type
optional
AGENT_TEMPLATE_TYPE_STANDARD- AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template
- AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template
top_p
optional
123The top_p setting for the agent template
updated_at
optional
2023-01-01T00:00:00ZThe agent template's last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
thinking_token_budget
optional
123The thinking token budget for Anthropic extended thinking (0 = disabled)
top_p
optional
123updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your agent under this url
user_id
optional
12345Id of user that created the agent
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique agent id
version_hash
optional
example stringThe latest version of the agent
vpc_egress_ips
optional
["example string"]VPC Egress IPs
vpc_uuid
optional
"12345678-1234-1234-1234-123456789012"workspace
optional
Show child properties
agents
optional
Agents
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345The id of user who created this workspace
created_by_email
optional
[email protected]The email of the user who created this workspace
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
description
optional
example stringDescription of the workspace
evaluation_test_cases
optional
Evaluations
Show child properties
archived_at
optional
2023-01-01T00:00:00Zcreated_at
optional
2023-01-01T00:00:00Zcreated_by_user_email
optional
[email protected]created_by_user_id
optional
12345dataset
optional
dataset_name
optional
example namedataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000description
optional
example stringlatest_version_number_of_runs
optional
123metrics
optional
name
optional
example namestar_metric
optional
test_case_uuid
optional
123e4567-e89b-12d3-a456-426614174000total_runs
optional
123updated_at
optional
2023-01-01T00:00:00Zupdated_by_user_email
optional
[email protected]updated_by_user_id
optional
12345version
optional
123name
optional
example nameName of the workspace
updated_at
optional
2023-01-01T00:00:00ZUpdate date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"agent": {
"anthropic_api_key": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"api_key_infos": [],
"api_keys": [],
"chatbot": {
"allowed_domains": [
"example string"
],
"button_background_color": "example string",
"logo": "example string",
"name": "example name",
"primary_color": "example string",
"secondary_color": "example string",
"starting_message": "example string"
},
"chatbot_identifiers": [],
"child_agents": [],
"conversation_logs_enabled": true,
"created_at": "2023-01-01T00:00:00Z",
"deployment": {
"created_at": "2023-01-01T00:00:00Z",
"name": "example name",
"status": "STATUS_UNKNOWN",
"updated_at": "2023-01-01T00:00:00Z",
"url": "example string",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"visibility": "VISIBILITY_UNKNOWN"
},
"description": "example string",
"functions": [],
"guardrails": [],
"if_case": "example string",
"instruction": "example string",
"k": 123,
"knowledge_bases": [],
"logging_config": {
"galileo_project_id": "123e4567-e89b-12d3-a456-426614174000",
"galileo_project_name": "example name",
"insights_enabled": true,
"insights_enabled_at": "2023-01-01T00:00:00Z",
"log_stream_id": "123e4567-e89b-12d3-a456-426614174000",
"log_stream_name": "example name"
},
"max_tokens": 123,
"mcp_servers": [],
"model": {
"capabilities": [
"example string"
],
"context_window": "12345",
"created_at": "2023-01-01T00:00:00Z",
"endpoints": [],
"inference_name": "example name",
"inference_version": "example string",
"is_foundational": true,
"kb_default_chunk_size": 123,
"kb_max_chunk_size": 123,
"kb_min_chunk_size": 123,
"lifecycle_status": "example string",
"name": "example name",
"parameter_count": 123,
"parent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"reasoning_efforts": [
"example string"
],
"settings": [],
"thinking": true,
"type": "example string",
"updated_at": "2023-01-01T00:00:00Z",
"upload_complete": true,
"url": "example string",
"usecases": [
"MODEL_USECASE_AGENT",
"MODEL_USECASE_GUARDRAIL"
],
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"model_provider_key": {
"api_key_uuid": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [],
"name": "example name",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"updated_at": "2023-01-01T00:00:00Z"
},
"model_router": {
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"name": "example name",
"regions": [
"example string"
],
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"name": "example name",
"openai_api_key": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"parent_agents": [],
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"provide_citations": true,
"reasoning_effort": "example string",
"region": "example string",
"retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",
"route_created_at": "2023-01-01T00:00:00Z",
"route_created_by": "12345",
"route_name": "example name",
"route_uuid": "123e4567-e89b-12d3-a456-426614174000",
"tags": [
"example string"
],
"temperature": 123,
"template": {
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"guardrails": [],
"instruction": "example string",
"k": 123,
"knowledge_bases": [],
"long_description": "\"Enhance your customer service with an AI agent designed to provide consistent, helpful, and accurate support across multiple channels. This template creates an agent that can answer product questions, troubleshoot common issues, process simple requests, and maintain a friendly, on-brand voice throughout customer interactions. Reduce response times, handle routine inquiries efficiently, and ensure your customers feel heard and helped.\"",
"max_tokens": 123,
"name": "example name",
"short_description": "\"This template has been designed with question-answer and conversational use cases in mind. It comes with validated agent instructions, fine-tuned model settings, and preconfigured guardrails defined for customer support-related use cases.\"",
"summary": "example string",
"tags": [
"example string"
],
"temperature": 123,
"template_type": "AGENT_TEMPLATE_TYPE_STANDARD",
"top_p": 123,
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"thinking_token_budget": 123,
"top_p": 123,
"updated_at": "2023-01-01T00:00:00Z",
"url": "example string",
"user_id": "12345",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"version_hash": "example string",
"vpc_egress_ips": [
"example string"
],
"vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"workspace": {
"agents": [],
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"created_by_email": "[email protected]",
"deleted_at": "2023-01-01T00:00:00Z",
"description": "example string",
"evaluation_test_cases": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET View Agent Routes
/v2/gen-ai/agents/{uuid}/child_agents
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To view agent routes for an agent, send a GET requtest to /v2/gen-ai/agents/{uuid}/child_agents.
Path Parameters
uuid
required
"123e4567-e89b-12d3-a456-426614174000"Agent id
Request: /v2/gen-ai/agents/{uuid}/child_agents
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/agents/c441bf77-81d6-11ef-bf8f-4e013e2ddde4/child_agents"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
children
optional
Child agents
Show child properties
anthropic_api_key
optional
Anthropic API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_key_infos
optional
Api key infos
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_keys
optional
Api keys
Show child properties
api_key
optional
example stringApi key
chatbot
optional
A Chatbot
Show child properties
allowed_domains
optional
["example string"]button_background_color
optional
example stringlogo
optional
example stringname
optional
example nameName of chatbot
primary_color
optional
example stringsecondary_color
optional
example stringstarting_message
optional
example stringchatbot_identifiers
optional
Chatbot identifiers
Show child properties
agent_chatbot_identifier
optional
123e4567-e89b-12d3-a456-426614174000Agent chatbot identifier
child_agents
optional
Child agents
conversation_logs_enabled
optional
trueWhether conversation logs are enabled for the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
deployment
optional
Description of deployment
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date / time
name
optional
example nameName
status
optional
STATUS_UNKNOWNupdated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your deployed agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
visibility
optional
VISIBILITY_UNKNOWN- VISIBILITY_UNKNOWN: The status of the deployment is unknown
- VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests
- VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state
- VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet
- VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys
description
optional
example stringDescription of agent
functions
optional
Show child properties
api_key
optional
example stringApi key
created_at
optional
2023-01-01T00:00:00ZCreation date / time
created_by
optional
12345Created by user id from DO
description
optional
example stringAgent description
faas_name
optional
example namefaas_namespace
optional
example nameinput_schema
optional
name
optional
example nameName
output_schema
optional
updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringDownload your agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
guardrails
optional
The guardrails the agent is attached to
Show child properties
agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000created_at
optional
2023-01-01T00:00:00Zdefault_response
optional
example stringdescription
optional
example stringguardrail_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_attached
optional
trueis_default
optional
truemetadata
optional
name
optional
example namepriority
optional
123type
optional
GUARDRAIL_TYPE_UNKNOWNupdated_at
optional
2023-01-01T00:00:00Zuuid
optional
123e4567-e89b-12d3-a456-426614174000if_case
optional
example stringinstruction
optional
example stringAgent instruction. Instructions help your agent to perform its job effectively. See Write Effective Agent Instructions for best practices.
k
optional
123knowledge_bases
optional
Knowledge bases
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
Show child properties
completed_datasources
optional
123Number of datasources indexed completed
created_at
optional
2023-01-01T00:00:00ZCreation date / time
data_source_jobs
optional
Details on Data Sources included in the Indexing Job
data_source_uuids
optional
["example string"]finished_at
optional
2023-01-01T00:00:00Zis_report_available
optional
trueBoolean value to determine if the indexing job details are available
knowledge_base_uuid
optional
123e4567-e89b-12d3-a456-426614174000Knowledge base id
phase
optional
BATCH_JOB_PHASE_UNKNOWNstarted_at
optional
2023-01-01T00:00:00Zstatus
optional
INDEX_JOB_STATUS_UNKNOWNtokens
optional
123Number of tokens [This field is deprecated]
total_datasources
optional
123Number of datasources being indexed
total_tokens
optional
12345Total Tokens Consumed By the Indexing Job
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
Show child properties
enabled
optional
trueWhether reranking is enabled for retrieval
model
optional
"bge-reranker-v2-m3"Reranker model internal name
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
logging_config
optional
Show child properties
galileo_project_id
optional
123e4567-e89b-12d3-a456-426614174000Galileo project identifier
galileo_project_name
optional
example nameName of the Galileo project
insights_enabled
optional
trueWhether insights are enabled
insights_enabled_at
optional
2023-01-01T00:00:00ZTimestamp when insights were enabled
log_stream_id
optional
123e4567-e89b-12d3-a456-426614174000Identifier for the log stream
log_stream_name
optional
example nameName of the log stream
max_tokens
optional
123mcp_servers
optional
MCP (Model Context Protocol) servers attached to this agent
Show child properties
allowed_tools
optional
["example string"]Optional list of allowed tool names to expose from this server
authorization
optional
example stringOptional authorization header value for the MCP server
headers
optional
Optional additional headers to send to the MCP server
server_label
optional
example stringA label identifying this MCP server
server_url
optional
example stringThe URL of the MCP server
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
Show child properties
description
optional
example stringname
optional
example nameurl
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
Show child properties
capabilities
optional
["example string"]Capabilities supported by this endpoint (e.g. input_text, output_text, input_image)
endpoint
optional
/chat/responsesThe endpoint path (e.g. /chat/responses)
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
Show child properties
input
optional
["example string"]output
optional
["example string"]name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
Show child properties
default_string
optional
example stringString default value (for type="dropdown", e.g. "medium")
default_value
optional
0.7Numeric default value (for type="number")
max
optional
1Maximum allowed value (for type="number")
min
optional
0Minimum allowed value (for type="number")
name
optional
temperatureSetting key name (e.g. "max_tokens", "temperature", "resolution")
options
optional
["example string"]Allowed values for dropdown selections (for type="dropdown")
step
optional
123Step increment for numeric settings (for type="number")
type
optional
numberSetting value type: "number" or "dropdown"
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
Show child properties
major
optional
123Major version number
minor
optional
123Minor version number
patch
optional
123Patch version number
model_provider_key
optional
Show child properties
api_key_uuid
optional
123e4567-e89b-12d3-a456-426614174000API key ID
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the key
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_at
optional
2023-01-01T00:00:00ZKey last updated date
model_router
optional
Model router
Show child properties
config
optional
Show child properties
fallback_models
optional
["example string"]Router-level fallback models
policies
optional
Task routing policies
created_at
optional
2023-01-01T00:00:00ZCreation date / time
description
optional
example stringDescription
name
optional
example nameName of the model router
regions
optional
["example string"]Target regions for the router
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameAgent name
openai_api_key
optional
OpenAI API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
parent_agents
optional
Parent agents
project_id
optional
123e4567-e89b-12d3-a456-426614174000provide_citations
optional
trueWhether the agent should provide in-response citations
reasoning_effort
optional
example stringThe reasoning effort for the agent
region
optional
example stringRegion code
retrieval_method
optional
RETRIEVAL_METHOD_UNKNOWN- RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown
- RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite
- RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back
- RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries
- RETRIEVAL_METHOD_NONE: The retrieval method is none
route_created_at
optional
2023-01-01T00:00:00ZCreation of route date / time
route_created_by
optional
12345route_name
optional
example nameRoute name
route_uuid
optional
123e4567-e89b-12d3-a456-426614174000tags
optional
["example string"]Agent tag to organize related resources
temperature
optional
123template
optional
Represents an AgentTemplate entity
Show child properties
created_at
optional
2023-01-01T00:00:00ZThe agent template's creation date
description
optional
example stringDeprecated - Use summary instead
guardrails
optional
List of guardrails associated with the agent template
Show child properties
priority
optional
123Priority of the guardrail
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the guardrail
instruction
optional
example stringInstructions for the agent template
k
optional
123The 'k' value for the agent template
knowledge_bases
optional
List of knowledge bases associated with the agent template
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
long_description
optional
The long description of the agent template
max_tokens
optional
123The max_tokens setting for the agent template
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the agent template
short_description
optional
The short description of the agent template
summary
optional
example stringThe summary of the agent template
tags
optional
["example string"]List of tags associated with the agent template
temperature
optional
123The temperature setting for the agent template
template_type
optional
AGENT_TEMPLATE_TYPE_STANDARD- AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template
- AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template
top_p
optional
123The top_p setting for the agent template
updated_at
optional
2023-01-01T00:00:00ZThe agent template's last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
thinking_token_budget
optional
123The thinking token budget for Anthropic extended thinking (0 = disabled)
top_p
optional
123updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your agent under this url
user_id
optional
12345Id of user that created the agent
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique agent id
version_hash
optional
example stringThe latest version of the agent
vpc_egress_ips
optional
["example string"]VPC Egress IPs
vpc_uuid
optional
"12345678-1234-1234-1234-123456789012"workspace
optional
Show child properties
agents
optional
Agents
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345The id of user who created this workspace
created_by_email
optional
[email protected]The email of the user who created this workspace
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
description
optional
example stringDescription of the workspace
evaluation_test_cases
optional
Evaluations
Show child properties
archived_at
optional
2023-01-01T00:00:00Zcreated_at
optional
2023-01-01T00:00:00Zcreated_by_user_email
optional
[email protected]created_by_user_id
optional
12345dataset
optional
dataset_name
optional
example namedataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000description
optional
example stringlatest_version_number_of_runs
optional
123metrics
optional
name
optional
example namestar_metric
optional
test_case_uuid
optional
123e4567-e89b-12d3-a456-426614174000total_runs
optional
123updated_at
optional
2023-01-01T00:00:00Zupdated_by_user_email
optional
[email protected]updated_by_user_id
optional
12345version
optional
123name
optional
example nameName of the workspace
updated_at
optional
2023-01-01T00:00:00ZUpdate date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"children": [
{
"api_key_infos": [],
"api_keys": [],
"chatbot_identifiers": [],
"child_agents": [],
"conversation_logs_enabled": true,
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"functions": [],
"guardrails": [],
"if_case": "example string",
"instruction": "example string",
"k": 123,
"knowledge_bases": [],
"max_tokens": 123,
"mcp_servers": [],
"name": "example name",
"parent_agents": [],
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"provide_citations": true,
"reasoning_effort": "example string",
"region": "example string",
"retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",
"route_created_at": "2023-01-01T00:00:00Z",
"route_created_by": "12345",
"route_name": "example name",
"route_uuid": "123e4567-e89b-12d3-a456-426614174000",
"tags": [
"example string"
],
"temperature": 123,
"thinking_token_budget": 123,
"top_p": 123,
"updated_at": "2023-01-01T00:00:00Z",
"url": "example string",
"user_id": "12345",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"version_hash": "example string",
"vpc_egress_ips": [
"example string"
],
"vpc_uuid": "\"12345678-1234-1234-1234-123456789012\""
}
]
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}PUT Update Agent Status
/v2/gen-ai/agents/{uuid}/deployment_visibility
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
Check whether an agent is public or private. To update the agent status, send a PUT request to /v2/gen-ai/agents/{uuid}/deployment_visibility.
Path Parameters
uuid
required
"123e4567-e89b-12d3-a456-426614174000"Unique id
Request Body: application/json
uuid
optional
"12345678-1234-1234-1234-123456789012"Unique id
visibility
optional
VISIBILITY_UNKNOWN- VISIBILITY_UNKNOWN: The status of the deployment is unknown
- VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests
- VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state
- VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet
- VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys
Request: /v2/gen-ai/agents/{uuid}/deployment_visibility
{
"uuid": "\"12345678-1234-1234-1234-123456789012\"",
"visibility": "VISIBILITY_UNKNOWN"
}curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/agents/1b418231-b7d6-11ef-bf8f-4e013e2ddde4/deployment_visibility" \
-d '{
"uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4",
"visibility": "VISIBILITY_PUBLIC"
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
agent
optional
An Agent
Show child properties
anthropic_api_key
optional
Anthropic API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_key_infos
optional
Api key infos
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_keys
optional
Api keys
Show child properties
api_key
optional
example stringApi key
chatbot
optional
A Chatbot
Show child properties
allowed_domains
optional
["example string"]button_background_color
optional
example stringlogo
optional
example stringname
optional
example nameName of chatbot
primary_color
optional
example stringsecondary_color
optional
example stringstarting_message
optional
example stringchatbot_identifiers
optional
Chatbot identifiers
Show child properties
agent_chatbot_identifier
optional
123e4567-e89b-12d3-a456-426614174000Agent chatbot identifier
child_agents
optional
Child agents
conversation_logs_enabled
optional
trueWhether conversation logs are enabled for the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
deployment
optional
Description of deployment
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date / time
name
optional
example nameName
status
optional
STATUS_UNKNOWNupdated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your deployed agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
visibility
optional
VISIBILITY_UNKNOWN- VISIBILITY_UNKNOWN: The status of the deployment is unknown
- VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests
- VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state
- VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet
- VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys
description
optional
example stringDescription of agent
functions
optional
Show child properties
api_key
optional
example stringApi key
created_at
optional
2023-01-01T00:00:00ZCreation date / time
created_by
optional
12345Created by user id from DO
description
optional
example stringAgent description
faas_name
optional
example namefaas_namespace
optional
example nameinput_schema
optional
name
optional
example nameName
output_schema
optional
updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringDownload your agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
guardrails
optional
The guardrails the agent is attached to
Show child properties
agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000created_at
optional
2023-01-01T00:00:00Zdefault_response
optional
example stringdescription
optional
example stringguardrail_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_attached
optional
trueis_default
optional
truemetadata
optional
name
optional
example namepriority
optional
123type
optional
GUARDRAIL_TYPE_UNKNOWNupdated_at
optional
2023-01-01T00:00:00Zuuid
optional
123e4567-e89b-12d3-a456-426614174000if_case
optional
example stringinstruction
optional
example stringAgent instruction. Instructions help your agent to perform its job effectively. See Write Effective Agent Instructions for best practices.
k
optional
123knowledge_bases
optional
Knowledge bases
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
Show child properties
completed_datasources
optional
123Number of datasources indexed completed
created_at
optional
2023-01-01T00:00:00ZCreation date / time
data_source_jobs
optional
Details on Data Sources included in the Indexing Job
data_source_uuids
optional
["example string"]finished_at
optional
2023-01-01T00:00:00Zis_report_available
optional
trueBoolean value to determine if the indexing job details are available
knowledge_base_uuid
optional
123e4567-e89b-12d3-a456-426614174000Knowledge base id
phase
optional
BATCH_JOB_PHASE_UNKNOWNstarted_at
optional
2023-01-01T00:00:00Zstatus
optional
INDEX_JOB_STATUS_UNKNOWNtokens
optional
123Number of tokens [This field is deprecated]
total_datasources
optional
123Number of datasources being indexed
total_tokens
optional
12345Total Tokens Consumed By the Indexing Job
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
Show child properties
enabled
optional
trueWhether reranking is enabled for retrieval
model
optional
"bge-reranker-v2-m3"Reranker model internal name
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
logging_config
optional
Show child properties
galileo_project_id
optional
123e4567-e89b-12d3-a456-426614174000Galileo project identifier
galileo_project_name
optional
example nameName of the Galileo project
insights_enabled
optional
trueWhether insights are enabled
insights_enabled_at
optional
2023-01-01T00:00:00ZTimestamp when insights were enabled
log_stream_id
optional
123e4567-e89b-12d3-a456-426614174000Identifier for the log stream
log_stream_name
optional
example nameName of the log stream
max_tokens
optional
123mcp_servers
optional
MCP (Model Context Protocol) servers attached to this agent
Show child properties
allowed_tools
optional
["example string"]Optional list of allowed tool names to expose from this server
authorization
optional
example stringOptional authorization header value for the MCP server
headers
optional
Optional additional headers to send to the MCP server
server_label
optional
example stringA label identifying this MCP server
server_url
optional
example stringThe URL of the MCP server
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
Show child properties
description
optional
example stringname
optional
example nameurl
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
Show child properties
capabilities
optional
["example string"]Capabilities supported by this endpoint (e.g. input_text, output_text, input_image)
endpoint
optional
/chat/responsesThe endpoint path (e.g. /chat/responses)
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
Show child properties
input
optional
["example string"]output
optional
["example string"]name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
Show child properties
default_string
optional
example stringString default value (for type="dropdown", e.g. "medium")
default_value
optional
0.7Numeric default value (for type="number")
max
optional
1Maximum allowed value (for type="number")
min
optional
0Minimum allowed value (for type="number")
name
optional
temperatureSetting key name (e.g. "max_tokens", "temperature", "resolution")
options
optional
["example string"]Allowed values for dropdown selections (for type="dropdown")
step
optional
123Step increment for numeric settings (for type="number")
type
optional
numberSetting value type: "number" or "dropdown"
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
Show child properties
major
optional
123Major version number
minor
optional
123Minor version number
patch
optional
123Patch version number
model_provider_key
optional
Show child properties
api_key_uuid
optional
123e4567-e89b-12d3-a456-426614174000API key ID
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the key
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_at
optional
2023-01-01T00:00:00ZKey last updated date
model_router
optional
Model router
Show child properties
config
optional
Show child properties
fallback_models
optional
["example string"]Router-level fallback models
policies
optional
Task routing policies
created_at
optional
2023-01-01T00:00:00ZCreation date / time
description
optional
example stringDescription
name
optional
example nameName of the model router
regions
optional
["example string"]Target regions for the router
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameAgent name
openai_api_key
optional
OpenAI API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
parent_agents
optional
Parent agents
project_id
optional
123e4567-e89b-12d3-a456-426614174000provide_citations
optional
trueWhether the agent should provide in-response citations
reasoning_effort
optional
example stringThe reasoning effort for the agent
region
optional
example stringRegion code
retrieval_method
optional
RETRIEVAL_METHOD_UNKNOWN- RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown
- RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite
- RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back
- RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries
- RETRIEVAL_METHOD_NONE: The retrieval method is none
route_created_at
optional
2023-01-01T00:00:00ZCreation of route date / time
route_created_by
optional
12345route_name
optional
example nameRoute name
route_uuid
optional
123e4567-e89b-12d3-a456-426614174000tags
optional
["example string"]Agent tag to organize related resources
temperature
optional
123template
optional
Represents an AgentTemplate entity
Show child properties
created_at
optional
2023-01-01T00:00:00ZThe agent template's creation date
description
optional
example stringDeprecated - Use summary instead
guardrails
optional
List of guardrails associated with the agent template
Show child properties
priority
optional
123Priority of the guardrail
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the guardrail
instruction
optional
example stringInstructions for the agent template
k
optional
123The 'k' value for the agent template
knowledge_bases
optional
List of knowledge bases associated with the agent template
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
long_description
optional
The long description of the agent template
max_tokens
optional
123The max_tokens setting for the agent template
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the agent template
short_description
optional
The short description of the agent template
summary
optional
example stringThe summary of the agent template
tags
optional
["example string"]List of tags associated with the agent template
temperature
optional
123The temperature setting for the agent template
template_type
optional
AGENT_TEMPLATE_TYPE_STANDARD- AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template
- AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template
top_p
optional
123The top_p setting for the agent template
updated_at
optional
2023-01-01T00:00:00ZThe agent template's last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
thinking_token_budget
optional
123The thinking token budget for Anthropic extended thinking (0 = disabled)
top_p
optional
123updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your agent under this url
user_id
optional
12345Id of user that created the agent
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique agent id
version_hash
optional
example stringThe latest version of the agent
vpc_egress_ips
optional
["example string"]VPC Egress IPs
vpc_uuid
optional
"12345678-1234-1234-1234-123456789012"workspace
optional
Show child properties
agents
optional
Agents
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345The id of user who created this workspace
created_by_email
optional
[email protected]The email of the user who created this workspace
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
description
optional
example stringDescription of the workspace
evaluation_test_cases
optional
Evaluations
Show child properties
archived_at
optional
2023-01-01T00:00:00Zcreated_at
optional
2023-01-01T00:00:00Zcreated_by_user_email
optional
[email protected]created_by_user_id
optional
12345dataset
optional
dataset_name
optional
example namedataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000description
optional
example stringlatest_version_number_of_runs
optional
123metrics
optional
name
optional
example namestar_metric
optional
test_case_uuid
optional
123e4567-e89b-12d3-a456-426614174000total_runs
optional
123updated_at
optional
2023-01-01T00:00:00Zupdated_by_user_email
optional
[email protected]updated_by_user_id
optional
12345version
optional
123name
optional
example nameName of the workspace
updated_at
optional
2023-01-01T00:00:00ZUpdate date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"agent": {
"anthropic_api_key": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"api_key_infos": [],
"api_keys": [],
"chatbot": {
"allowed_domains": [
"example string"
],
"button_background_color": "example string",
"logo": "example string",
"name": "example name",
"primary_color": "example string",
"secondary_color": "example string",
"starting_message": "example string"
},
"chatbot_identifiers": [],
"child_agents": [],
"conversation_logs_enabled": true,
"created_at": "2023-01-01T00:00:00Z",
"deployment": {
"created_at": "2023-01-01T00:00:00Z",
"name": "example name",
"status": "STATUS_UNKNOWN",
"updated_at": "2023-01-01T00:00:00Z",
"url": "example string",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"visibility": "VISIBILITY_UNKNOWN"
},
"description": "example string",
"functions": [],
"guardrails": [],
"if_case": "example string",
"instruction": "example string",
"k": 123,
"knowledge_bases": [],
"logging_config": {
"galileo_project_id": "123e4567-e89b-12d3-a456-426614174000",
"galileo_project_name": "example name",
"insights_enabled": true,
"insights_enabled_at": "2023-01-01T00:00:00Z",
"log_stream_id": "123e4567-e89b-12d3-a456-426614174000",
"log_stream_name": "example name"
},
"max_tokens": 123,
"mcp_servers": [],
"model": {
"capabilities": [
"example string"
],
"context_window": "12345",
"created_at": "2023-01-01T00:00:00Z",
"endpoints": [],
"inference_name": "example name",
"inference_version": "example string",
"is_foundational": true,
"kb_default_chunk_size": 123,
"kb_max_chunk_size": 123,
"kb_min_chunk_size": 123,
"lifecycle_status": "example string",
"name": "example name",
"parameter_count": 123,
"parent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"reasoning_efforts": [
"example string"
],
"settings": [],
"thinking": true,
"type": "example string",
"updated_at": "2023-01-01T00:00:00Z",
"upload_complete": true,
"url": "example string",
"usecases": [
"MODEL_USECASE_AGENT",
"MODEL_USECASE_GUARDRAIL"
],
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"model_provider_key": {
"api_key_uuid": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [],
"name": "example name",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"updated_at": "2023-01-01T00:00:00Z"
},
"model_router": {
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"name": "example name",
"regions": [
"example string"
],
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"name": "example name",
"openai_api_key": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"parent_agents": [],
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"provide_citations": true,
"reasoning_effort": "example string",
"region": "example string",
"retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",
"route_created_at": "2023-01-01T00:00:00Z",
"route_created_by": "12345",
"route_name": "example name",
"route_uuid": "123e4567-e89b-12d3-a456-426614174000",
"tags": [
"example string"
],
"temperature": 123,
"template": {
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"guardrails": [],
"instruction": "example string",
"k": 123,
"knowledge_bases": [],
"long_description": "\"Enhance your customer service with an AI agent designed to provide consistent, helpful, and accurate support across multiple channels. This template creates an agent that can answer product questions, troubleshoot common issues, process simple requests, and maintain a friendly, on-brand voice throughout customer interactions. Reduce response times, handle routine inquiries efficiently, and ensure your customers feel heard and helped.\"",
"max_tokens": 123,
"name": "example name",
"short_description": "\"This template has been designed with question-answer and conversational use cases in mind. It comes with validated agent instructions, fine-tuned model settings, and preconfigured guardrails defined for customer support-related use cases.\"",
"summary": "example string",
"tags": [
"example string"
],
"temperature": 123,
"template_type": "AGENT_TEMPLATE_TYPE_STANDARD",
"top_p": 123,
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"thinking_token_budget": 123,
"top_p": 123,
"updated_at": "2023-01-01T00:00:00Z",
"url": "example string",
"user_id": "12345",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"version_hash": "example string",
"vpc_egress_ips": [
"example string"
],
"vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"workspace": {
"agents": [],
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"created_by_email": "[email protected]",
"deleted_at": "2023-01-01T00:00:00Z",
"description": "example string",
"evaluation_test_cases": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET Get Agent Usage
/v2/gen-ai/agents/{uuid}/usage
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To get agent usage, send a GET request to /v2/gen-ai/agents/{uuid}/usage. Returns usage metrics for the specified agent within the provided time range.
Path Parameters
uuid
required
"123e4567-e89b-12d3-a456-426614174000"Agent id
Query Parameters
start
optional
"example string"Return all usage data from this date.
stop
optional
"example string"Return all usage data up to this date, if omitted, will return up to the current date.
Request: /v2/gen-ai/agents/{uuid}/usage
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/genai/agents/c441bf77-81d6-11ef-bf8f-4e013e2ddde4/usage?start=2024-01-01T00:00:00Z&stop=2024-01-31T23:59:59Z"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
log_insights_usage
optional
Resource Usage Description
Show child properties
measurements
optional
Show child properties
tokens
optional
123usage_type
optional
example stringresource_uuid
optional
123e4567-e89b-12d3-a456-426614174000start
optional
2023-01-01T00:00:00Zstop
optional
2023-01-01T00:00:00Zusage
optional
Resource Usage Description
Show child properties
measurements
optional
Show child properties
tokens
optional
123usage_type
optional
example stringresource_uuid
optional
123e4567-e89b-12d3-a456-426614174000start
optional
2023-01-01T00:00:00Zstop
optional
2023-01-01T00:00:00Z
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"log_insights_usage": {
"measurements": [],
"resource_uuid": "123e4567-e89b-12d3-a456-426614174000",
"start": "2023-01-01T00:00:00Z",
"stop": "2023-01-01T00:00:00Z"
},
"usage": {
"measurements": [],
"resource_uuid": "123e4567-e89b-12d3-a456-426614174000",
"start": "2023-01-01T00:00:00Z",
"stop": "2023-01-01T00:00:00Z"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET List Agent Versions
/v2/gen-ai/agents/{uuid}/versions
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To list all agent versions, send a GET request to /v2/gen-ai/agents/{uuid}/versions.
Path Parameters
uuid
required
"123e4567-e89b-12d3-a456-426614174000"Agent uuid
Query Parameters
page
optional
1Page number.
per_page
optional
1Items per page.
Request: /v2/gen-ai/agents/{uuid}/versions
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/agents/c441bf77-81d6-11ef-bf8f-4e013e2ddde4/versions"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
agent_versions
optional
Agents
Show child properties
agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the agent this version belongs to
attached_child_agents
optional
List of child agent relationships
Show child properties
agent_name
optional
example nameName of the child agent
child_agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Child agent unique identifier
if_case
optional
example stringIf case
is_deleted
optional
trueChild agent is deleted
route_name
optional
example nameRoute name
attached_functions
optional
List of function versions
Show child properties
description
optional
example stringDescription of the function
faas_name
optional
example nameFaaS name of the function
faas_namespace
optional
example nameFaaS namespace of the function
is_deleted
optional
trueWhether the function is deleted
name
optional
example nameName of the function
attached_guardrails
optional
List of guardrail version
Show child properties
is_deleted
optional
trueWhether the guardrail is deleted
name
optional
example nameGuardrail Name
priority
optional
123Guardrail Priority
uuid
optional
123e4567-e89b-12d3-a456-426614174000Guardrail UUID
attached_knowledgebases
optional
List of knowledge base agent versions
Show child properties
is_deleted
optional
trueDeletet at date / time
name
optional
example nameName of the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the knowledge base
can_rollback
optional
trueWhether the version is able to be rolled back to
created_at
optional
2023-01-01T00:00:00ZCreation date
currently_applied
optional
trueWhether this is the currently applied configuration
description
optional
example stringDescription of the agent
id
optional
12345Unique identifier
instruction
optional
example stringInstruction for the agent
k
optional
123K value for the agent's configuration
max_tokens
optional
123Max tokens setting for the agent
model_name
optional
example nameName of model associated to the agent version
name
optional
example nameName of the agent
provide_citations
optional
trueWhether the agent should provide in-response citations
retrieval_method
optional
RETRIEVAL_METHOD_UNKNOWN- RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown
- RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite
- RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back
- RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries
- RETRIEVAL_METHOD_NONE: The retrieval method is none
tags
optional
["example string"]Tags associated with the agent
temperature
optional
123Temperature setting for the agent
top_p
optional
123Top_p setting for the agent
trigger_action
optional
example stringAction triggering the configuration update
version_hash
optional
example stringVersion hash
links
optional
Links to other pages
Show child properties
pages
optional
Information about how to reach other pages
Show child properties
first
optional
example stringFirst page
last
optional
example stringLast page
next
optional
example stringNext page
previous
optional
example stringPrevious page
meta
optional
Meta information about the data set
Show child properties
page
optional
123The current page
pages
optional
123Total number of pages
total
optional
123Total amount of items over all pages
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"agent_versions": [
{
"agent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"attached_child_agents": [],
"attached_functions": [],
"attached_guardrails": [],
"attached_knowledgebases": [],
"can_rollback": true,
"created_at": "2023-01-01T00:00:00Z",
"created_by_email": "[email protected]",
"currently_applied": true,
"description": "example string",
"id": "12345",
"instruction": "example string",
"k": 123,
"max_tokens": 123,
"model_name": "example name",
"name": "example name",
"provide_citations": true,
"retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",
"tags": [
"example string"
],
"temperature": 123,
"top_p": 123,
"trigger_action": "example string",
"version_hash": "example string"
}
],
"links": {
"pages": {
"first": "example string",
"last": "example string",
"next": "example string",
"previous": "example string"
}
},
"meta": {
"page": 123,
"pages": 123,
"total": 123
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}PUT Rollback to Agent Version
/v2/gen-ai/agents/{uuid}/versions
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To update to a specific agent version, send a PUT request to /v2/gen-ai/agents/{uuid}/versions.
Path Parameters
uuid
required
"123e4567-e89b-12d3-a456-426614174000"Agent unique identifier
Request Body: application/json
uuid
optional
"12345678-1234-1234-1234-123456789012"Agent unique identifier
version_hash
optional
c3658d8b5c05494cd03ce042926ef08157889ed54b1b74b5ee0b3d66dcee4b73Unique identifier
Request: /v2/gen-ai/agents/{uuid}/versions
{
"uuid": "\"12345678-1234-1234-1234-123456789012\"",
"version_hash": "c3658d8b5c05494cd03ce042926ef08157889ed54b1b74b5ee0b3d66dcee4b73"
}curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/agents/1b418231-b7d6-11ef-bf8f-4e013e2ddde4/versions" \
-d '{
"uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4",
"version_hash": "c3658d8b5c05494cd03ce042926ef08157889ed54b1b74b5ee0b3d66dcee4b73"
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
audit_header
optional
An alternative way to provide auth information. for internal use only.
Show child properties
actor_id
optional
12345actor_ip
optional
example stringactor_uuid
optional
123e4567-e89b-12d3-a456-426614174000context_urn
optional
example stringorigin_application
optional
example stringuser_id
optional
12345user_uuid
optional
123e4567-e89b-12d3-a456-426614174000version_hash
optional
example stringUnique identifier
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"audit_header": {
"actor_id": "12345",
"actor_ip": "example string",
"actor_uuid": "123e4567-e89b-12d3-a456-426614174000",
"context_urn": "example string",
"origin_application": "example string",
"user_id": "12345",
"user_uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"version_hash": "example string"
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET List Anthropic API Keys
/v2/gen-ai/anthropic/keys
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To list all Anthropic API keys, send a GET request to /v2/gen-ai/anthropic/keys.
Query Parameters
page
optional
1Page number.
per_page
optional
1Items per page.
Request: /v2/gen-ai/anthropic/keys
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/anthropic/keys"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
api_key_infos
optional
Api key infos
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
links
optional
Links to other pages
Show child properties
pages
optional
Information about how to reach other pages
Show child properties
first
optional
example stringFirst page
last
optional
example stringLast page
next
optional
example stringNext page
previous
optional
example stringPrevious page
meta
optional
Meta information about the data set
Show child properties
page
optional
123The current page
pages
optional
123Total number of pages
total
optional
123Total amount of items over all pages
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"api_key_infos": [
{
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
],
"links": {
"pages": {
"first": "example string",
"last": "example string",
"next": "example string",
"previous": "example string"
}
},
"meta": {
"page": 123,
"pages": 123,
"total": 123
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}POST Create Anthropic API Key
/v2/gen-ai/anthropic/keys
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To create an Anthropic API key, send a POST request to /v2/gen-ai/anthropic/keys.
Request Body: application/json
api_key
optional
"sk-ant-12345678901234567890123456789012"Anthropic API key
name
optional
"Production Key"Name of the key
Request: /v2/gen-ai/anthropic/keys
{
"api_key": "\"sk-ant-12345678901234567890123456789012\"",
"name": "\"Production Key\""
}curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/anthropic/keys" \
-d '{
"api_key": "sk-ant-12345678901234567890123456789012",
"name": "test-key"
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
api_key_info
optional
Anthropic API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"api_key_info": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET Get Anthropic API Key
/v2/gen-ai/anthropic/keys/{api_key_uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To retrieve details of an Anthropic API key, send a GET request to /v2/gen-ai/anthropic/keys/{api_key_uuid}.
Path Parameters
api_key_uuid
required
"123e4567-e89b-12d3-a456-426614174000"API key ID
Request: /v2/gen-ai/anthropic/keys/{api_key_uuid}
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/anthropic/keys/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
api_key_info
optional
Anthropic API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"api_key_info": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}PUT Update Anthropic API Key
/v2/gen-ai/anthropic/keys/{api_key_uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To update an Anthropic API key, send a PUT request to /v2/gen-ai/anthropic/keys/{api_key_uuid}.
Path Parameters
api_key_uuid
required
"123e4567-e89b-12d3-a456-426614174000"API key ID
Request Body: application/json
api_key
optional
"sk-ant-12345678901234567890123456789012"Anthropic API key
api_key_uuid
optional
"12345678-1234-1234-1234-123456789012"API key ID
name
optional
"Production Key"Name of the key
Request: /v2/gen-ai/anthropic/keys/{api_key_uuid}
{
"api_key": "\"sk-ant-12345678901234567890123456789012\"",
"api_key_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"name": "\"Production Key\""
}curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/anthropic/keys/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4" \
-d '{
"api_key_uuid": "11efb7d6-cdb5-6388-bf8f-4e013e2ddde4",
"name": "test-key2"
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
api_key_info
optional
Anthropic API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"api_key_info": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}DELETE Delete Anthropic API Key
/v2/gen-ai/anthropic/keys/{api_key_uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To delete an Anthropic API key, send a DELETE request to /v2/gen-ai/anthropic/keys/{api_key_uuid}.
Path Parameters
api_key_uuid
required
"123e4567-e89b-12d3-a456-426614174000"API key ID
Request: /v2/gen-ai/anthropic/keys/{api_key_uuid}
curl -X DELETE \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/anthropic/keys/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
api_key_info
optional
Anthropic API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"api_key_info": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET List agents by Anthropic key
/v2/gen-ai/anthropic/keys/{uuid}/agents
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
List Agents by Anthropic Key.
Path Parameters
uuid
required
"123e4567-e89b-12d3-a456-426614174000"Unique ID of Anthropic key
Query Parameters
page
optional
1Page number.
per_page
optional
1Items per page.
Request: /v2/gen-ai/anthropic/keys/{uuid}/agents
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/anthropic/keys/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4/agents"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
agents
optional
Show child properties
anthropic_api_key
optional
Anthropic API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_key_infos
optional
Api key infos
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_keys
optional
Api keys
Show child properties
api_key
optional
example stringApi key
chatbot
optional
A Chatbot
Show child properties
allowed_domains
optional
["example string"]button_background_color
optional
example stringlogo
optional
example stringname
optional
example nameName of chatbot
primary_color
optional
example stringsecondary_color
optional
example stringstarting_message
optional
example stringchatbot_identifiers
optional
Chatbot identifiers
Show child properties
agent_chatbot_identifier
optional
123e4567-e89b-12d3-a456-426614174000Agent chatbot identifier
child_agents
optional
Child agents
conversation_logs_enabled
optional
trueWhether conversation logs are enabled for the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
deployment
optional
Description of deployment
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date / time
name
optional
example nameName
status
optional
STATUS_UNKNOWNupdated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your deployed agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
visibility
optional
VISIBILITY_UNKNOWN- VISIBILITY_UNKNOWN: The status of the deployment is unknown
- VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests
- VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state
- VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet
- VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys
description
optional
example stringDescription of agent
functions
optional
Show child properties
api_key
optional
example stringApi key
created_at
optional
2023-01-01T00:00:00ZCreation date / time
created_by
optional
12345Created by user id from DO
description
optional
example stringAgent description
faas_name
optional
example namefaas_namespace
optional
example nameinput_schema
optional
name
optional
example nameName
output_schema
optional
updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringDownload your agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
guardrails
optional
The guardrails the agent is attached to
Show child properties
agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000created_at
optional
2023-01-01T00:00:00Zdefault_response
optional
example stringdescription
optional
example stringguardrail_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_attached
optional
trueis_default
optional
truemetadata
optional
name
optional
example namepriority
optional
123type
optional
GUARDRAIL_TYPE_UNKNOWNupdated_at
optional
2023-01-01T00:00:00Zuuid
optional
123e4567-e89b-12d3-a456-426614174000if_case
optional
example stringinstruction
optional
example stringAgent instruction. Instructions help your agent to perform its job effectively. See Write Effective Agent Instructions for best practices.
k
optional
123knowledge_bases
optional
Knowledge bases
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
Show child properties
completed_datasources
optional
123Number of datasources indexed completed
created_at
optional
2023-01-01T00:00:00ZCreation date / time
data_source_jobs
optional
Details on Data Sources included in the Indexing Job
data_source_uuids
optional
["example string"]finished_at
optional
2023-01-01T00:00:00Zis_report_available
optional
trueBoolean value to determine if the indexing job details are available
knowledge_base_uuid
optional
123e4567-e89b-12d3-a456-426614174000Knowledge base id
phase
optional
BATCH_JOB_PHASE_UNKNOWNstarted_at
optional
2023-01-01T00:00:00Zstatus
optional
INDEX_JOB_STATUS_UNKNOWNtokens
optional
123Number of tokens [This field is deprecated]
total_datasources
optional
123Number of datasources being indexed
total_tokens
optional
12345Total Tokens Consumed By the Indexing Job
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
Show child properties
enabled
optional
trueWhether reranking is enabled for retrieval
model
optional
"bge-reranker-v2-m3"Reranker model internal name
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
logging_config
optional
Show child properties
galileo_project_id
optional
123e4567-e89b-12d3-a456-426614174000Galileo project identifier
galileo_project_name
optional
example nameName of the Galileo project
insights_enabled
optional
trueWhether insights are enabled
insights_enabled_at
optional
2023-01-01T00:00:00ZTimestamp when insights were enabled
log_stream_id
optional
123e4567-e89b-12d3-a456-426614174000Identifier for the log stream
log_stream_name
optional
example nameName of the log stream
max_tokens
optional
123mcp_servers
optional
MCP (Model Context Protocol) servers attached to this agent
Show child properties
allowed_tools
optional
["example string"]Optional list of allowed tool names to expose from this server
authorization
optional
example stringOptional authorization header value for the MCP server
headers
optional
Optional additional headers to send to the MCP server
server_label
optional
example stringA label identifying this MCP server
server_url
optional
example stringThe URL of the MCP server
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
Show child properties
description
optional
example stringname
optional
example nameurl
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
Show child properties
capabilities
optional
["example string"]Capabilities supported by this endpoint (e.g. input_text, output_text, input_image)
endpoint
optional
/chat/responsesThe endpoint path (e.g. /chat/responses)
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
Show child properties
input
optional
["example string"]output
optional
["example string"]name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
Show child properties
default_string
optional
example stringString default value (for type="dropdown", e.g. "medium")
default_value
optional
0.7Numeric default value (for type="number")
max
optional
1Maximum allowed value (for type="number")
min
optional
0Minimum allowed value (for type="number")
name
optional
temperatureSetting key name (e.g. "max_tokens", "temperature", "resolution")
options
optional
["example string"]Allowed values for dropdown selections (for type="dropdown")
step
optional
123Step increment for numeric settings (for type="number")
type
optional
numberSetting value type: "number" or "dropdown"
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
Show child properties
major
optional
123Major version number
minor
optional
123Minor version number
patch
optional
123Patch version number
model_provider_key
optional
Show child properties
api_key_uuid
optional
123e4567-e89b-12d3-a456-426614174000API key ID
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the key
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_at
optional
2023-01-01T00:00:00ZKey last updated date
model_router
optional
Model router
Show child properties
config
optional
Show child properties
fallback_models
optional
["example string"]Router-level fallback models
policies
optional
Task routing policies
created_at
optional
2023-01-01T00:00:00ZCreation date / time
description
optional
example stringDescription
name
optional
example nameName of the model router
regions
optional
["example string"]Target regions for the router
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameAgent name
openai_api_key
optional
OpenAI API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
parent_agents
optional
Parent agents
project_id
optional
123e4567-e89b-12d3-a456-426614174000provide_citations
optional
trueWhether the agent should provide in-response citations
reasoning_effort
optional
example stringThe reasoning effort for the agent
region
optional
example stringRegion code
retrieval_method
optional
RETRIEVAL_METHOD_UNKNOWN- RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown
- RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite
- RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back
- RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries
- RETRIEVAL_METHOD_NONE: The retrieval method is none
route_created_at
optional
2023-01-01T00:00:00ZCreation of route date / time
route_created_by
optional
12345route_name
optional
example nameRoute name
route_uuid
optional
123e4567-e89b-12d3-a456-426614174000tags
optional
["example string"]Agent tag to organize related resources
temperature
optional
123template
optional
Represents an AgentTemplate entity
Show child properties
created_at
optional
2023-01-01T00:00:00ZThe agent template's creation date
description
optional
example stringDeprecated - Use summary instead
guardrails
optional
List of guardrails associated with the agent template
Show child properties
priority
optional
123Priority of the guardrail
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the guardrail
instruction
optional
example stringInstructions for the agent template
k
optional
123The 'k' value for the agent template
knowledge_bases
optional
List of knowledge bases associated with the agent template
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
long_description
optional
The long description of the agent template
max_tokens
optional
123The max_tokens setting for the agent template
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the agent template
short_description
optional
The short description of the agent template
summary
optional
example stringThe summary of the agent template
tags
optional
["example string"]List of tags associated with the agent template
temperature
optional
123The temperature setting for the agent template
template_type
optional
AGENT_TEMPLATE_TYPE_STANDARD- AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template
- AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template
top_p
optional
123The top_p setting for the agent template
updated_at
optional
2023-01-01T00:00:00ZThe agent template's last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
thinking_token_budget
optional
123The thinking token budget for Anthropic extended thinking (0 = disabled)
top_p
optional
123updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your agent under this url
user_id
optional
12345Id of user that created the agent
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique agent id
version_hash
optional
example stringThe latest version of the agent
vpc_egress_ips
optional
["example string"]VPC Egress IPs
vpc_uuid
optional
"12345678-1234-1234-1234-123456789012"workspace
optional
Show child properties
agents
optional
Agents
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345The id of user who created this workspace
created_by_email
optional
[email protected]The email of the user who created this workspace
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
description
optional
example stringDescription of the workspace
evaluation_test_cases
optional
Evaluations
Show child properties
archived_at
optional
2023-01-01T00:00:00Zcreated_at
optional
2023-01-01T00:00:00Zcreated_by_user_email
optional
[email protected]created_by_user_id
optional
12345dataset
optional
dataset_name
optional
example namedataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000description
optional
example stringlatest_version_number_of_runs
optional
123metrics
optional
name
optional
example namestar_metric
optional
test_case_uuid
optional
123e4567-e89b-12d3-a456-426614174000total_runs
optional
123updated_at
optional
2023-01-01T00:00:00Zupdated_by_user_email
optional
[email protected]updated_by_user_id
optional
12345version
optional
123name
optional
example nameName of the workspace
updated_at
optional
2023-01-01T00:00:00ZUpdate date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
links
optional
Links to other pages
Show child properties
pages
optional
Information about how to reach other pages
Show child properties
first
optional
example stringFirst page
last
optional
example stringLast page
next
optional
example stringNext page
previous
optional
example stringPrevious page
meta
optional
Meta information about the data set
Show child properties
page
optional
123The current page
pages
optional
123Total number of pages
total
optional
123Total amount of items over all pages
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"agents": [
{
"api_key_infos": [],
"api_keys": [],
"chatbot_identifiers": [],
"child_agents": [],
"conversation_logs_enabled": true,
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"functions": [],
"guardrails": [],
"if_case": "example string",
"instruction": "example string",
"k": 123,
"knowledge_bases": [],
"max_tokens": 123,
"mcp_servers": [],
"name": "example name",
"parent_agents": [],
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"provide_citations": true,
"reasoning_effort": "example string",
"region": "example string",
"retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",
"route_created_at": "2023-01-01T00:00:00Z",
"route_created_by": "12345",
"route_name": "example name",
"route_uuid": "123e4567-e89b-12d3-a456-426614174000",
"tags": [
"example string"
],
"temperature": 123,
"thinking_token_budget": 123,
"top_p": 123,
"updated_at": "2023-01-01T00:00:00Z",
"url": "example string",
"user_id": "12345",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"version_hash": "example string",
"vpc_egress_ips": [
"example string"
],
"vpc_uuid": "\"12345678-1234-1234-1234-123456789012\""
}
],
"links": {
"pages": {
"first": "example string",
"last": "example string",
"next": "example string",
"previous": "example string"
}
},
"meta": {
"page": 123,
"pages": 123,
"total": 123
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET List Custom Models
/v2/gen-ai/custom_models
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To list custom models, send a GET request to /v2/gen-ai/custom_models.
Query Parameters
page
optional
1Page number for pagination.
per_page
optional
1Number of items per page.
status
optional
STATUS_UNSPECIFIEDFilter by model status.
Default:STATUS_UNSPECIFIEDRequest: /v2/gen-ai/custom_models
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/custom_models" \Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
links
optional
Links to other pages
Show child properties
pages
optional
Information about how to reach other pages
Show child properties
first
optional
example stringFirst page
last
optional
example stringLast page
next
optional
example stringNext page
previous
optional
example stringPrevious page
max_threshold
optional
123Maximum number of custom models allowed for this team's tier
meta
optional
Meta information about the data set
Show child properties
page
optional
123The current page
pages
optional
123Total number of pages
total
optional
123Total amount of items over all pages
models
optional
List of custom models
Show child properties
active_deployments
optional
List of active deployments using this model
Show child properties
created_at
optional
example stringRFC 3339 timestamp indicating when the dedicated inference deployment was created
endpoints
optional
Endpoint URLs for a dedicated inference deployment associated with a custom model.
Show child properties
private_endpoint_fqdn
optional
example stringPrivate FQDN for the deployment
public_endpoint_fqdn
optional
example stringPublic FQDN for the deployment
id
optional
example stringUnique identifier (UUID) of the dedicated inference deployment
name
optional
example nameHuman-readable name of the dedicated inference deployment
region_slug
optional
example stringSlug of the region where the dedicated inference deployment is running (e.g. "atl1")
state
optional
example stringCurrent lifecycle state of the dedicated inference deployment (e.g. "ACTIVE", "PROVISIONING")
updated_at
optional
2023-01-01RFC 3339 timestamp indicating when the dedicated inference deployment was last updated
architecture
optional
example stringModel architecture type (free-form string from config.json)
config_json
optional
Raw config.json contents from the model repository
context_length
optional
123Maximum context length supported by the model
cost_estimate_per_month
optional
123Estimated monthly cost in dollars for hosting
created_at
optional
2023-01-01T00:00:00ZTimestamp when the model was created
description
optional
example stringDescription of the custom model
file_count
optional
123Number of files in the model
input_modalities
optional
["example string"]Input modalities supported (e.g., text, image)
license
optional
example stringLicense under which the model is distributed
name
optional
example nameName of the custom model
output_modalities
optional
["example string"]Output modalities supported (e.g., text, image)
parameters
optional
12345Number of parameters in the model
source_ref
optional
Reference to the original source of the model
Show child properties
access_type
optional
ACCESS_TYPE_UNSPECIFIEDAccess level required for the model repository
bucket
optional
example stringSpaces bucket name
commit_sha
optional
example stringGit commit SHA of the model version
hf_token
optional
example stringUser-provided HuggingFace token for gated/private models (not persisted in source_ref)
prefix
optional
example stringObject prefix path in the bucket
region
optional
example stringSpaces bucket region
repo_id
optional
123e4567-e89b-12d3-a456-426614174000Huggingface repository identifier
source_type
optional
SOURCE_TYPE_UNSPECIFIEDSource from which the model was imported
status
optional
STATUS_UNSPECIFIEDImport and deployment status of the custom model
storage_region
optional
example stringRegion of the Spaces bucket where model files are stored
tags
optional
User-defined tags for organizing models
Show child properties
tags
optional
["example string"]List of tag strings
team_id
optional
12345Team that owns the model
total_size_bytes
optional
12345Total size of model files in bytes
updated_at
optional
2023-01-01T00:00:00ZTimestamp when the model was last updated
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique identifier for the custom model
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"links": {
"pages": {
"first": "example string",
"last": "example string",
"next": "example string",
"previous": "example string"
}
},
"max_threshold": 123,
"meta": {
"page": 123,
"pages": 123,
"total": 123
},
"models": [
{
"active_deployments": [],
"architecture": "example string",
"context_length": 123,
"cost_estimate_per_month": 123,
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"file_count": 123,
"input_modalities": [
"example string"
],
"license": "example string",
"name": "example name",
"output_modalities": [
"example string"
],
"parameters": "12345",
"source_type": "SOURCE_TYPE_UNSPECIFIED",
"status": "STATUS_UNSPECIFIED",
"storage_region": "example string",
"team_id": "12345",
"total_size_bytes": "12345",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
]
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}POST Import Custom Model
/v2/gen-ai/custom_models/import
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To import a custom model, send a POST request to /v2/gen-ai/custom_models/import.
Request Body: application/json
accept_terms_and_conditions
optional
trueWhether the caller accepts the terms and conditions for importing this model
description
optional
Production model for customer supportDescription of the model
name
optional
my-mistral-7bName for the imported model
preferred_gpu_region
optional
nyc3Preferred GPU region for deployment
source_ref
optional
Reference to the original source of the model
Show child properties
access_type
optional
ACCESS_TYPE_UNSPECIFIEDAccess level required for the model repository
bucket
optional
example stringSpaces bucket name
commit_sha
optional
example stringGit commit SHA of the model version
hf_token
optional
example stringUser-provided HuggingFace token for gated/private models (not persisted in source_ref)
prefix
optional
example stringObject prefix path in the bucket
region
optional
example stringSpaces bucket region
repo_id
optional
123e4567-e89b-12d3-a456-426614174000Huggingface repository identifier
source_type
optional
SOURCE_TYPE_UNSPECIFIEDSource from which the model was imported
tags
optional
User-defined tags for organizing models
Show child properties
tags
optional
["example string"]List of tag strings
Request: /v2/gen-ai/custom_models/import
{
"accept_terms_and_conditions": true,
"description": "Production model for customer support",
"name": "my-mistral-7b",
"preferred_gpu_region": "nyc3",
"source_ref": {
"access_type": "ACCESS_TYPE_UNSPECIFIED",
"bucket": "example string",
"commit_sha": "example string",
"hf_token": "example string",
"prefix": "example string",
"region": "example string",
"repo_id": "123e4567-e89b-12d3-a456-426614174000"
},
"source_type": "SOURCE_TYPE_UNSPECIFIED",
"tags": {
"tags": [
"example string"
]
}
}curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/custom_models/import" \
-d '{
"name": "mymodelssss",
"source_type": "SOURCE_TYPE_HUGGINGFACE",
"source_ref": {
"repo_id": "Qwen/Qwen3-1.7B",
"access_type": "ACCESS_TYPE_PUBLIC"
},
"description": "qwen base model",
"preferred_gpu_region": null,
"accept_terms_and_conditions": true,
"tags": {
"tags": ["base-model"]
}
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
error
optional
example stringimport_job
optional
Import job tracking for a custom model
Show child properties
bytes_done
optional
12345Bytes imported so far
bytes_total
optional
12345Total bytes to import
completed_at
optional
2023-01-01T00:00:00ZTimestamp when the import completed
created_at
optional
2023-01-01T00:00:00ZTimestamp when the job was created
error_message
optional
example stringError message if import failed
error_step
optional
example stringStep at which the error occurred
files_done
optional
123Number of files imported so far
files_total
optional
123Total number of files to import
started_at
optional
2023-01-01T00:00:00ZTimestamp when the import started
status
optional
example stringCurrent status of the import job
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique identifier for the import job
model
optional
Custom model - user-imported model from HuggingFace, Spaces, etc.
Show child properties
active_deployments
optional
List of active deployments using this model
Show child properties
created_at
optional
example stringRFC 3339 timestamp indicating when the dedicated inference deployment was created
endpoints
optional
Endpoint URLs for a dedicated inference deployment associated with a custom model.
Show child properties
private_endpoint_fqdn
optional
example stringPrivate FQDN for the deployment
public_endpoint_fqdn
optional
example stringPublic FQDN for the deployment
id
optional
example stringUnique identifier (UUID) of the dedicated inference deployment
name
optional
example nameHuman-readable name of the dedicated inference deployment
region_slug
optional
example stringSlug of the region where the dedicated inference deployment is running (e.g. "atl1")
state
optional
example stringCurrent lifecycle state of the dedicated inference deployment (e.g. "ACTIVE", "PROVISIONING")
updated_at
optional
2023-01-01RFC 3339 timestamp indicating when the dedicated inference deployment was last updated
architecture
optional
example stringModel architecture type (free-form string from config.json)
config_json
optional
Raw config.json contents from the model repository
context_length
optional
123Maximum context length supported by the model
cost_estimate_per_month
optional
123Estimated monthly cost in dollars for hosting
created_at
optional
2023-01-01T00:00:00ZTimestamp when the model was created
description
optional
example stringDescription of the custom model
file_count
optional
123Number of files in the model
input_modalities
optional
["example string"]Input modalities supported (e.g., text, image)
license
optional
example stringLicense under which the model is distributed
name
optional
example nameName of the custom model
output_modalities
optional
["example string"]Output modalities supported (e.g., text, image)
parameters
optional
12345Number of parameters in the model
source_ref
optional
Reference to the original source of the model
Show child properties
access_type
optional
ACCESS_TYPE_UNSPECIFIEDAccess level required for the model repository
bucket
optional
example stringSpaces bucket name
commit_sha
optional
example stringGit commit SHA of the model version
hf_token
optional
example stringUser-provided HuggingFace token for gated/private models (not persisted in source_ref)
prefix
optional
example stringObject prefix path in the bucket
region
optional
example stringSpaces bucket region
repo_id
optional
123e4567-e89b-12d3-a456-426614174000Huggingface repository identifier
source_type
optional
SOURCE_TYPE_UNSPECIFIEDSource from which the model was imported
status
optional
STATUS_UNSPECIFIEDImport and deployment status of the custom model
storage_region
optional
example stringRegion of the Spaces bucket where model files are stored
tags
optional
User-defined tags for organizing models
Show child properties
tags
optional
["example string"]List of tag strings
team_id
optional
12345Team that owns the model
total_size_bytes
optional
12345Total size of model files in bytes
updated_at
optional
2023-01-01T00:00:00ZTimestamp when the model was last updated
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique identifier for the custom model
validation_steps
optional
Validation steps performed during import
Show child properties
error
optional
example stringError message if validation failed
name
optional
example nameName of the validation step
passed
optional
trueWhether the validation step passed
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"error": "example string",
"import_job": {
"bytes_done": "12345",
"bytes_total": "12345",
"completed_at": "2023-01-01T00:00:00Z",
"created_at": "2023-01-01T00:00:00Z",
"error_message": "example string",
"error_step": "example string",
"files_done": 123,
"files_total": 123,
"started_at": "2023-01-01T00:00:00Z",
"status": "example string",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"model": {
"active_deployments": [],
"architecture": "example string",
"context_length": 123,
"cost_estimate_per_month": 123,
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"file_count": 123,
"input_modalities": [
"example string"
],
"license": "example string",
"name": "example name",
"output_modalities": [
"example string"
],
"parameters": "12345",
"source_ref": {
"access_type": "ACCESS_TYPE_UNSPECIFIED",
"bucket": "example string",
"commit_sha": "example string",
"hf_token": "example string",
"prefix": "example string",
"region": "example string",
"repo_id": "123e4567-e89b-12d3-a456-426614174000"
},
"source_type": "SOURCE_TYPE_UNSPECIFIED",
"status": "STATUS_UNSPECIFIED",
"storage_region": "example string",
"tags": {
"tags": [
"example string"
]
},
"team_id": "12345",
"total_size_bytes": "12345",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"validation_steps": [
{
"error": "example string",
"name": "example name",
"passed": true
}
]
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET Get Custom Model
/v2/gen-ai/custom_models/{uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To retrieve details of a custom model, send a GET request to /v2/gen-ai/custom_models/{uuid}.
Path Parameters
uuid
required
"123e4567-e89b-12d3-a456-426614174000"UUID of the custom model to retrieve
Request: /v2/gen-ai/custom_models/{uuid}
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/custom_models/11f13e07-1e4f-1325-b542-ca68c578b04b"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
model
optional
Custom model - user-imported model from HuggingFace, Spaces, etc.
Show child properties
active_deployments
optional
List of active deployments using this model
Show child properties
created_at
optional
example stringRFC 3339 timestamp indicating when the dedicated inference deployment was created
endpoints
optional
Endpoint URLs for a dedicated inference deployment associated with a custom model.
Show child properties
private_endpoint_fqdn
optional
example stringPrivate FQDN for the deployment
public_endpoint_fqdn
optional
example stringPublic FQDN for the deployment
id
optional
example stringUnique identifier (UUID) of the dedicated inference deployment
name
optional
example nameHuman-readable name of the dedicated inference deployment
region_slug
optional
example stringSlug of the region where the dedicated inference deployment is running (e.g. "atl1")
state
optional
example stringCurrent lifecycle state of the dedicated inference deployment (e.g. "ACTIVE", "PROVISIONING")
updated_at
optional
2023-01-01RFC 3339 timestamp indicating when the dedicated inference deployment was last updated
architecture
optional
example stringModel architecture type (free-form string from config.json)
config_json
optional
Raw config.json contents from the model repository
context_length
optional
123Maximum context length supported by the model
cost_estimate_per_month
optional
123Estimated monthly cost in dollars for hosting
created_at
optional
2023-01-01T00:00:00ZTimestamp when the model was created
description
optional
example stringDescription of the custom model
file_count
optional
123Number of files in the model
input_modalities
optional
["example string"]Input modalities supported (e.g., text, image)
license
optional
example stringLicense under which the model is distributed
name
optional
example nameName of the custom model
output_modalities
optional
["example string"]Output modalities supported (e.g., text, image)
parameters
optional
12345Number of parameters in the model
source_ref
optional
Reference to the original source of the model
Show child properties
access_type
optional
ACCESS_TYPE_UNSPECIFIEDAccess level required for the model repository
bucket
optional
example stringSpaces bucket name
commit_sha
optional
example stringGit commit SHA of the model version
hf_token
optional
example stringUser-provided HuggingFace token for gated/private models (not persisted in source_ref)
prefix
optional
example stringObject prefix path in the bucket
region
optional
example stringSpaces bucket region
repo_id
optional
123e4567-e89b-12d3-a456-426614174000Huggingface repository identifier
source_type
optional
SOURCE_TYPE_UNSPECIFIEDSource from which the model was imported
status
optional
STATUS_UNSPECIFIEDImport and deployment status of the custom model
storage_region
optional
example stringRegion of the Spaces bucket where model files are stored
tags
optional
User-defined tags for organizing models
Show child properties
tags
optional
["example string"]List of tag strings
team_id
optional
12345Team that owns the model
total_size_bytes
optional
12345Total size of model files in bytes
updated_at
optional
2023-01-01T00:00:00ZTimestamp when the model was last updated
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique identifier for the custom model
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"model": {
"active_deployments": [],
"architecture": "example string",
"context_length": 123,
"cost_estimate_per_month": 123,
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"file_count": 123,
"input_modalities": [
"example string"
],
"license": "example string",
"name": "example name",
"output_modalities": [
"example string"
],
"parameters": "12345",
"source_ref": {
"access_type": "ACCESS_TYPE_UNSPECIFIED",
"bucket": "example string",
"commit_sha": "example string",
"hf_token": "example string",
"prefix": "example string",
"region": "example string",
"repo_id": "123e4567-e89b-12d3-a456-426614174000"
},
"source_type": "SOURCE_TYPE_UNSPECIFIED",
"status": "STATUS_UNSPECIFIED",
"storage_region": "example string",
"tags": {
"tags": [
"example string"
]
},
"team_id": "12345",
"total_size_bytes": "12345",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}DELETE Delete Custom Model
/v2/gen-ai/custom_models/{uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To delete a custom model, send a DELETE request to /v2/genai/custom_models/{uuid}.
Path Parameters
uuid
required
"123e4567-e89b-12d3-a456-426614174000"UUID of the custom model to delete
Request: /v2/gen-ai/custom_models/{uuid}
curl -X DELETE \
--header "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/custom_models/11f13e07-1e4f-1325-b542-ca68c578b04b"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
error
optional
example stringError message if deletion failed
status
optional
DELETE_CUSTOM_MODEL_STATUS_UNSPECIFIEDStatus of delete operation
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"error": "example string",
"status": "DELETE_CUSTOM_MODEL_STATUS_UNSPECIFIED"
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}PATCH Update Custom Model Metadata
/v2/gen-ai/custom_models/{uuid}/metadata
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To update custom model metadata, send a PATCH request to /v2/gen-ai/custom_models/{uuid}/metadata.
Path Parameters
uuid
required
"123e4567-e89b-12d3-a456-426614174000"UUID of the custom model to update
Request Body: application/json
description
optional
example stringname
optional
example nametags
optional
User-defined tags for organizing models
Show child properties
tags
optional
["example string"]List of tag strings
uuid
optional
a1b2c3d4-...UUID of the custom model to update
Request: /v2/gen-ai/custom_models/{uuid}/metadata
{
"description": "example string",
"name": "example name",
"tags": {
"tags": [
"example string"
]
},
"uuid": "a1b2c3d4-..."
}curl -X PATCH \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/custom_models/11f13d93-a879-c342-b542-ca68c578b04b/metadata" \
-d '{
"description": "finetuned model with olympiad math data",
"tags": {
"tags": ["finetuned", "new"]
}
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
model
optional
Custom model - user-imported model from HuggingFace, Spaces, etc.
Show child properties
active_deployments
optional
List of active deployments using this model
Show child properties
created_at
optional
example stringRFC 3339 timestamp indicating when the dedicated inference deployment was created
endpoints
optional
Endpoint URLs for a dedicated inference deployment associated with a custom model.
Show child properties
private_endpoint_fqdn
optional
example stringPrivate FQDN for the deployment
public_endpoint_fqdn
optional
example stringPublic FQDN for the deployment
id
optional
example stringUnique identifier (UUID) of the dedicated inference deployment
name
optional
example nameHuman-readable name of the dedicated inference deployment
region_slug
optional
example stringSlug of the region where the dedicated inference deployment is running (e.g. "atl1")
state
optional
example stringCurrent lifecycle state of the dedicated inference deployment (e.g. "ACTIVE", "PROVISIONING")
updated_at
optional
2023-01-01RFC 3339 timestamp indicating when the dedicated inference deployment was last updated
architecture
optional
example stringModel architecture type (free-form string from config.json)
config_json
optional
Raw config.json contents from the model repository
context_length
optional
123Maximum context length supported by the model
cost_estimate_per_month
optional
123Estimated monthly cost in dollars for hosting
created_at
optional
2023-01-01T00:00:00ZTimestamp when the model was created
description
optional
example stringDescription of the custom model
file_count
optional
123Number of files in the model
input_modalities
optional
["example string"]Input modalities supported (e.g., text, image)
license
optional
example stringLicense under which the model is distributed
name
optional
example nameName of the custom model
output_modalities
optional
["example string"]Output modalities supported (e.g., text, image)
parameters
optional
12345Number of parameters in the model
source_ref
optional
Reference to the original source of the model
Show child properties
access_type
optional
ACCESS_TYPE_UNSPECIFIEDAccess level required for the model repository
bucket
optional
example stringSpaces bucket name
commit_sha
optional
example stringGit commit SHA of the model version
hf_token
optional
example stringUser-provided HuggingFace token for gated/private models (not persisted in source_ref)
prefix
optional
example stringObject prefix path in the bucket
region
optional
example stringSpaces bucket region
repo_id
optional
123e4567-e89b-12d3-a456-426614174000Huggingface repository identifier
source_type
optional
SOURCE_TYPE_UNSPECIFIEDSource from which the model was imported
status
optional
STATUS_UNSPECIFIEDImport and deployment status of the custom model
storage_region
optional
example stringRegion of the Spaces bucket where model files are stored
tags
optional
User-defined tags for organizing models
Show child properties
tags
optional
["example string"]List of tag strings
team_id
optional
12345Team that owns the model
total_size_bytes
optional
12345Total size of model files in bytes
updated_at
optional
2023-01-01T00:00:00ZTimestamp when the model was last updated
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique identifier for the custom model
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"model": {
"active_deployments": [],
"architecture": "example string",
"context_length": 123,
"cost_estimate_per_month": 123,
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"file_count": 123,
"input_modalities": [
"example string"
],
"license": "example string",
"name": "example name",
"output_modalities": [
"example string"
],
"parameters": "12345",
"source_ref": {
"access_type": "ACCESS_TYPE_UNSPECIFIED",
"bucket": "example string",
"commit_sha": "example string",
"hf_token": "example string",
"prefix": "example string",
"region": "example string",
"repo_id": "123e4567-e89b-12d3-a456-426614174000"
},
"source_type": "SOURCE_TYPE_UNSPECIFIED",
"status": "STATUS_UNSPECIFIED",
"storage_region": "example string",
"tags": {
"tags": [
"example string"
]
},
"team_id": "12345",
"total_size_bytes": "12345",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}POST Create Evaluation Dataset
/v2/gen-ai/evaluation_datasets
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To create an evaluation dataset, send a POST request to /v2/gen-ai/evaluation_datasets.
Request Body: application/json
dataset_type
optional
EVALUATION_DATASET_TYPE_UNKNOWNfile_upload_dataset
optional
File to upload as data source for knowledge base.
Show child properties
original_file_name
optional
example nameThe original file name
size_in_bytes
optional
12345The size of the file in bytes
stored_object_key
optional
example stringThe object key the file was stored as
name
optional
example nameThe name of the agent evaluation dataset.
Request: /v2/gen-ai/evaluation_datasets
{
"dataset_type": "EVALUATION_DATASET_TYPE_UNKNOWN",
"file_upload_dataset": {
"original_file_name": "example name",
"size_in_bytes": "12345",
"stored_object_key": "example string"
},
"name": "example name"
}curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/evaluation_datasets" \
-d '{
"name": "dataset.csv",
"file_upload_dataset": {
"original_file_name": "dataset.csv",
"stored_object_key": "123abc",
"size_in_bytes": 255
}
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
evaluation_dataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000Evaluation dataset uuid.
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"evaluation_dataset_uuid": "123e4567-e89b-12d3-a456-426614174000"
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}POST Create Presigned URLs for Evaluation Dataset File Upload
/v2/gen-ai/evaluation_datasets/file_upload_presigned_urls
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To create presigned URLs for evaluation dataset file upload, send a POST request to /v2/gen-ai/evaluation_datasets/file_upload_presigned_urls.
Request Body: application/json
files
optional
A list of files to generate presigned URLs for.
Show child properties
file_name
optional
example nameLocal filename
file_size
optional
12345The size of the file in bytes.
Request: /v2/gen-ai/evaluation_datasets/file_upload_presigned_urls
{
"files": [
{
"file_name": "example name",
"file_size": "12345"
}
]
}curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/evaluation_datasets/file_upload_presigned_urls" \
-d '{
"files": [{
"file_name": "dataset.csv",
"file_size": 2048
}]
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
request_id
optional
123e4567-e89b-12d3-a456-426614174000The ID generated for the request for Presigned URLs.
uploads
optional
A list of generated presigned URLs and object keys, one per file.
Show child properties
expires_at
optional
2023-01-01T00:00:00ZThe time the url expires at.
object_key
optional
example stringThe unique object key to store the file as.
original_file_name
optional
example nameThe original file name.
presigned_url
optional
example stringThe actual presigned URL the client can use to upload the file directly.
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"request_id": "123e4567-e89b-12d3-a456-426614174000",
"uploads": [
{
"expires_at": "2023-01-01T00:00:00Z",
"object_key": "example string",
"original_file_name": "example name",
"presigned_url": "example string"
}
]
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET Get Download URL for Evaluation Dataset
/v2/gen-ai/evaluation_datasets/{dataset_uuid}/download_url
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To get a presigned download URL for an evaluation dataset, send a GET request to /v2/genai/evaluation_datasets/{dataset_uuid}/download_url.
Path Parameters
dataset_uuid
required
"123e4567-e89b-12d3-a456-426614174000"UUID of the evaluation dataset.
Request: /v2/gen-ai/evaluation_datasets/{dataset_uuid}/download_url
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/evaluation_datasets/123e4567-e89b-12d3-a456-426614174000/download_url"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
download_url
optional
example stringThe presigned URL to download the dataset file.
expires_at
optional
2023-01-01T00:00:00ZThe time the URL expires at.
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"download_url": "example string",
"expires_at": "2023-01-01T00:00:00Z"
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET List Evaluation Metrics
/v2/gen-ai/evaluation_metrics
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To list all evaluation metrics, send a GET request to /v2/gen-ai/evaluation_metrics.
Request: /v2/gen-ai/evaluation_metrics
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/evaluation_metrics"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
metrics
optional
Show child properties
category
optional
METRIC_CATEGORY_UNSPECIFIEDdescription
optional
example stringevaluation_scope
optional
EVALUATION_SCOPE_UNSPECIFIEDScope that determines whether a metric belongs to agent evaluation or model evaluation. For backwards compatibility, UNSPECIFIED defaults to agent metrics only in list operations.
inverted
optional
trueIf true, the metric is inverted, meaning that a lower value is better.
is_metric_goal
optional
truemetric_name
optional
example namemetric_rank
optional
123metric_type
optional
METRIC_TYPE_UNSPECIFIEDmetric_uuid
optional
123e4567-e89b-12d3-a456-426614174000metric_value_type
optional
METRIC_VALUE_TYPE_UNSPECIFIEDrange_max
optional
123The maximum value for the metric.
range_min
optional
123The minimum value for the metric.
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"metrics": [
{
"category": "METRIC_CATEGORY_UNSPECIFIED",
"description": "example string",
"evaluation_scope": "EVALUATION_SCOPE_UNSPECIFIED",
"inverted": true,
"is_metric_goal": true,
"metric_name": "example name",
"metric_rank": 123,
"metric_type": "METRIC_TYPE_UNSPECIFIED",
"metric_uuid": "123e4567-e89b-12d3-a456-426614174000",
"metric_value_type": "METRIC_VALUE_TYPE_UNSPECIFIED",
"range_max": 123,
"range_min": 123
}
]
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}POST Run an Evaluation Test Case
/v2/gen-ai/evaluation_runs
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To run an evaluation test case, send a POST request to /v2/gen-ai/evaluation_runs.
Request Body: application/json
agent_deployment_names
optional
["example string"]Agent deployment names to run the test case against (ADK agent workspaces).
agent_uuids
optional
["example string"]Agent UUIDs to run the test case against (legacy agents).
run_name
optional
Evaluation Run NameThe name of the run.
test_case_uuid
optional
"12345678-1234-1234-1234-123456789012"Test-case UUID to run
Request: /v2/gen-ai/evaluation_runs
{
"agent_deployment_names": [
"example string"
],
"agent_uuids": [
"example string"
],
"run_name": "Evaluation Run Name",
"test_case_uuid": "\"12345678-1234-1234-1234-123456789012\""
}curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/evaluation_runs" \
-d '{
"test_case_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4",
"agent_uuids": ["1b418231-b7d6-11ef-bf8f-4e013e2ddde4", "2b418231-b7d6-11ef-bf8f-4e013e2ddde4"],
"run_name": "My Evaluation Run",
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
evaluation_run_uuids
optional
["example string"]
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"evaluation_run_uuids": [
"example string"
]
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET Retrieve Information About an Existing Evaluation Run
/v2/gen-ai/evaluation_runs/{evaluation_run_uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To retrive information about an existing evaluation run, send a GET request to /v2/gen-ai/evaluation_runs/{evaluation_run_uuid}.
Path Parameters
evaluation_run_uuid
required
"123e4567-e89b-12d3-a456-426614174000"Evaluation run UUID.
Request: /v2/gen-ai/evaluation_runs/{evaluation_run_uuid}
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/evaluation_runs/9758a232-b351-11ef-bf8f-4e013e2ddde4"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
evaluation_run
optional
Show child properties
agent_deleted
optional
trueWhether agent is deleted
agent_deployment_name
optional
example nameThe agent deployment name
agent_name
optional
example nameAgent name
agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Agent UUID.
agent_version_hash
optional
example stringVersion hash
agent_workspace_uuid
optional
123e4567-e89b-12d3-a456-426614174000Agent workspace uuid
created_by_user_email
optional
[email protected]created_by_user_id
optional
12345error_description
optional
example stringThe error description
evaluation_run_uuid
optional
123e4567-e89b-12d3-a456-426614174000Evaluation run UUID.
evaluation_test_case_workspace_uuid
optional
123e4567-e89b-12d3-a456-426614174000Evaluation test case workspace uuid
finished_at
optional
2023-01-01T00:00:00ZRun end time.
pass_status
optional
trueThe pass status of the evaluation run based on the star metric.
queued_at
optional
2023-01-01T00:00:00ZRun queued time.
run_level_metric_results
optional
Show child properties
error_description
optional
example stringError description if the metric could not be calculated.
metric_name
optional
example nameMetric name
metric_value_type
optional
METRIC_VALUE_TYPE_UNSPECIFIEDnumber_value
optional
123The value of the metric as a number.
reasoning
optional
example stringReasoning of the metric result.
string_value
optional
example stringThe value of the metric as a string.
run_name
optional
example nameRun name.
star_metric_result
optional
Show child properties
error_description
optional
example stringError description if the metric could not be calculated.
metric_name
optional
example nameMetric name
metric_value_type
optional
METRIC_VALUE_TYPE_UNSPECIFIEDnumber_value
optional
123The value of the metric as a number.
reasoning
optional
example stringReasoning of the metric result.
string_value
optional
example stringThe value of the metric as a string.
started_at
optional
2023-01-01T00:00:00ZRun start time.
status
optional
EVALUATION_RUN_STATUS_UNSPECIFIEDEvaluation Run Statuses
test_case_description
optional
example stringTest case description.
test_case_name
optional
example nameTest case name.
test_case_uuid
optional
123e4567-e89b-12d3-a456-426614174000Test-case UUID.
test_case_version
optional
123Test-case-version.
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"evaluation_run": {
"agent_deleted": true,
"agent_deployment_name": "example name",
"agent_name": "example name",
"agent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"agent_version_hash": "example string",
"agent_workspace_uuid": "123e4567-e89b-12d3-a456-426614174000",
"created_by_user_email": "[email protected]",
"created_by_user_id": "12345",
"error_description": "example string",
"evaluation_run_uuid": "123e4567-e89b-12d3-a456-426614174000",
"evaluation_test_case_workspace_uuid": "123e4567-e89b-12d3-a456-426614174000",
"finished_at": "2023-01-01T00:00:00Z",
"pass_status": true,
"queued_at": "2023-01-01T00:00:00Z",
"run_level_metric_results": [],
"run_name": "example name",
"star_metric_result": {
"error_description": "example string",
"metric_name": "example name",
"metric_value_type": "METRIC_VALUE_TYPE_UNSPECIFIED",
"number_value": 123,
"reasoning": "example string",
"string_value": "example string"
},
"started_at": "2023-01-01T00:00:00Z",
"status": "EVALUATION_RUN_STATUS_UNSPECIFIED",
"test_case_description": "example string",
"test_case_name": "example name",
"test_case_uuid": "123e4567-e89b-12d3-a456-426614174000",
"test_case_version": 123
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET Retrieve Results of an Evaluation Run
/v2/gen-ai/evaluation_runs/{evaluation_run_uuid}/results
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To retrieve results of an evaluation run, send a GET request to /v2/gen-ai/evaluation_runs/{evaluation_run_uuid}/results.
Path Parameters
evaluation_run_uuid
required
"123e4567-e89b-12d3-a456-426614174000"Evaluation run UUID.
Query Parameters
page
optional
1Page number.
per_page
optional
1Items per page.
Request: /v2/gen-ai/evaluation_runs/{evaluation_run_uuid}/results
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/evaluation_runs/9758a232-b351-11ef-bf8f-4e013e2ddde4/results"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
evaluation_run
optional
Show child properties
agent_deleted
optional
trueWhether agent is deleted
agent_deployment_name
optional
example nameThe agent deployment name
agent_name
optional
example nameAgent name
agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Agent UUID.
agent_version_hash
optional
example stringVersion hash
agent_workspace_uuid
optional
123e4567-e89b-12d3-a456-426614174000Agent workspace uuid
created_by_user_email
optional
[email protected]created_by_user_id
optional
12345error_description
optional
example stringThe error description
evaluation_run_uuid
optional
123e4567-e89b-12d3-a456-426614174000Evaluation run UUID.
evaluation_test_case_workspace_uuid
optional
123e4567-e89b-12d3-a456-426614174000Evaluation test case workspace uuid
finished_at
optional
2023-01-01T00:00:00ZRun end time.
pass_status
optional
trueThe pass status of the evaluation run based on the star metric.
queued_at
optional
2023-01-01T00:00:00ZRun queued time.
run_level_metric_results
optional
Show child properties
error_description
optional
example stringError description if the metric could not be calculated.
metric_name
optional
example nameMetric name
metric_value_type
optional
METRIC_VALUE_TYPE_UNSPECIFIEDnumber_value
optional
123The value of the metric as a number.
reasoning
optional
example stringReasoning of the metric result.
string_value
optional
example stringThe value of the metric as a string.
run_name
optional
example nameRun name.
star_metric_result
optional
Show child properties
error_description
optional
example stringError description if the metric could not be calculated.
metric_name
optional
example nameMetric name
metric_value_type
optional
METRIC_VALUE_TYPE_UNSPECIFIEDnumber_value
optional
123The value of the metric as a number.
reasoning
optional
example stringReasoning of the metric result.
string_value
optional
example stringThe value of the metric as a string.
started_at
optional
2023-01-01T00:00:00ZRun start time.
status
optional
EVALUATION_RUN_STATUS_UNSPECIFIEDEvaluation Run Statuses
test_case_description
optional
example stringTest case description.
test_case_name
optional
example nameTest case name.
test_case_uuid
optional
123e4567-e89b-12d3-a456-426614174000Test-case UUID.
test_case_version
optional
123Test-case-version.
links
optional
Links to other pages
Show child properties
pages
optional
Information about how to reach other pages
Show child properties
first
optional
example stringFirst page
last
optional
example stringLast page
next
optional
example stringNext page
previous
optional
example stringPrevious page
meta
optional
Meta information about the data set
Show child properties
page
optional
123The current page
pages
optional
123Total number of pages
total
optional
123Total amount of items over all pages
prompts
optional
The prompt level results.
Show child properties
evaluation_trace_spans
optional
The evaluated trace spans.
Show child properties
created_at
optional
2023-01-01T00:00:00ZWhen the span was created
input
optional
Input data for the span (flexible structure - can be messages array, string, etc.)
name
optional
example nameName/identifier for the span
output
optional
Output data from the span (flexible structure - can be message, string, etc.)
retriever_chunks
optional
Any retriever span chunks that were included as part of the span.
Show child properties
chunk_usage_pct
optional
123The usage percentage of the chunk.
chunk_used
optional
trueIndicates if the chunk was used in the prompt.
index_uuid
optional
123e4567-e89b-12d3-a456-426614174000The index uuid (Knowledge Base) of the chunk.
source_name
optional
example nameThe source name for the chunk, e.g., the file name or document title.
text
optional
example stringText content of the chunk.
span_level_metric_results
optional
The span-level metric results.
Show child properties
error_description
optional
example stringError description if the metric could not be calculated.
metric_name
optional
example nameMetric name
metric_value_type
optional
METRIC_VALUE_TYPE_UNSPECIFIEDnumber_value
optional
123The value of the metric as a number.
reasoning
optional
example stringReasoning of the metric result.
string_value
optional
example stringThe value of the metric as a string.
spans
optional
Child spans - must contain between 1 and 999 spans Allowed types: agent, llm, tool, retriever (not workflow)
Show child properties
agent
optional
created_at
optional
2023-01-01T00:00:00ZWhen the span was created
input
optional
Input data for the span (flexible structure - can be messages array, string, etc.)
llm
optional
LLM span
name
optional
example nameName/identifier for the span
output
optional
Output data from the span (flexible structure - can be message, string, etc.)
retriever
optional
Retriever span
tool
optional
Tool span
type
optional
TRACE_SPAN_TYPE_UNKNOWNTypes of spans in a trace
workflow
optional
Workflow span - can contain child spans (agent, llm, tool, retriever)
type
optional
TRACE_SPAN_TYPE_UNKNOWNTypes of spans in a trace
ground_truth
optional
example stringThe ground truth for the prompt.
input
optional
example stringinput_tokens
optional
12345The number of input tokens used in the prompt.
output
optional
example stringoutput_tokens
optional
12345The number of output tokens used in the prompt.
prompt_chunks
optional
The list of prompt chunks.
Show child properties
chunk_usage_pct
optional
123The usage percentage of the chunk.
chunk_used
optional
trueIndicates if the chunk was used in the prompt.
index_uuid
optional
123e4567-e89b-12d3-a456-426614174000The index uuid (Knowledge Base) of the chunk.
source_name
optional
example nameThe source name for the chunk, e.g., the file name or document title.
text
optional
example stringText content of the chunk.
prompt_id
optional
123Prompt ID
prompt_level_metric_results
optional
The metric results for the prompt.
Show child properties
error_description
optional
example stringError description if the metric could not be calculated.
metric_name
optional
example nameMetric name
metric_value_type
optional
METRIC_VALUE_TYPE_UNSPECIFIEDnumber_value
optional
123The value of the metric as a number.
reasoning
optional
example stringReasoning of the metric result.
string_value
optional
example stringThe value of the metric as a string.
trace_id
optional
123e4567-e89b-12d3-a456-426614174000The trace id for the prompt.
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"evaluation_run": {
"agent_deleted": true,
"agent_deployment_name": "example name",
"agent_name": "example name",
"agent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"agent_version_hash": "example string",
"agent_workspace_uuid": "123e4567-e89b-12d3-a456-426614174000",
"created_by_user_email": "[email protected]",
"created_by_user_id": "12345",
"error_description": "example string",
"evaluation_run_uuid": "123e4567-e89b-12d3-a456-426614174000",
"evaluation_test_case_workspace_uuid": "123e4567-e89b-12d3-a456-426614174000",
"finished_at": "2023-01-01T00:00:00Z",
"pass_status": true,
"queued_at": "2023-01-01T00:00:00Z",
"run_level_metric_results": [],
"run_name": "example name",
"star_metric_result": {
"error_description": "example string",
"metric_name": "example name",
"metric_value_type": "METRIC_VALUE_TYPE_UNSPECIFIED",
"number_value": 123,
"reasoning": "example string",
"string_value": "example string"
},
"started_at": "2023-01-01T00:00:00Z",
"status": "EVALUATION_RUN_STATUS_UNSPECIFIED",
"test_case_description": "example string",
"test_case_name": "example name",
"test_case_uuid": "123e4567-e89b-12d3-a456-426614174000",
"test_case_version": 123
},
"links": {
"pages": {
"first": "example string",
"last": "example string",
"next": "example string",
"previous": "example string"
}
},
"meta": {
"page": 123,
"pages": 123,
"total": 123
},
"prompts": [
{
"evaluation_trace_spans": [],
"ground_truth": "example string",
"input": "example string",
"input_tokens": "12345",
"output": "example string",
"output_tokens": "12345",
"prompt_chunks": [],
"prompt_id": 123,
"prompt_level_metric_results": [],
"trace_id": "123e4567-e89b-12d3-a456-426614174000"
}
]
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET Retrieve Results of an Evaluation Run Prompt
/v2/gen-ai/evaluation_runs/{evaluation_run_uuid}/results/{prompt_id}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To retrieve results of an evaluation run, send a GET request to /v2/gen-ai/evaluation_runs/{evaluation_run_uuid}/results/{prompt_id}.
Path Parameters
evaluation_run_uuid
required
"123e4567-e89b-12d3-a456-426614174000"Evaluation run UUID.
prompt_id
required
1Prompt ID to get results for.
Request: /v2/gen-ai/evaluation_runs/{evaluation_run_uuid}/results/{prompt_id}
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/evaluation_runs/9758a232-b351-11ef-bf8f-4e013e2ddde4/results/c441bf77-81d6-11ef-bf8f-4e013e2ddde4"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
prompt
optional
Show child properties
evaluation_trace_spans
optional
The evaluated trace spans.
Show child properties
created_at
optional
2023-01-01T00:00:00ZWhen the span was created
input
optional
Input data for the span (flexible structure - can be messages array, string, etc.)
name
optional
example nameName/identifier for the span
output
optional
Output data from the span (flexible structure - can be message, string, etc.)
retriever_chunks
optional
Any retriever span chunks that were included as part of the span.
Show child properties
chunk_usage_pct
optional
123The usage percentage of the chunk.
chunk_used
optional
trueIndicates if the chunk was used in the prompt.
index_uuid
optional
123e4567-e89b-12d3-a456-426614174000The index uuid (Knowledge Base) of the chunk.
source_name
optional
example nameThe source name for the chunk, e.g., the file name or document title.
text
optional
example stringText content of the chunk.
span_level_metric_results
optional
The span-level metric results.
Show child properties
error_description
optional
example stringError description if the metric could not be calculated.
metric_name
optional
example nameMetric name
metric_value_type
optional
METRIC_VALUE_TYPE_UNSPECIFIEDnumber_value
optional
123The value of the metric as a number.
reasoning
optional
example stringReasoning of the metric result.
string_value
optional
example stringThe value of the metric as a string.
spans
optional
Child spans - must contain between 1 and 999 spans Allowed types: agent, llm, tool, retriever (not workflow)
Show child properties
agent
optional
created_at
optional
2023-01-01T00:00:00ZWhen the span was created
input
optional
Input data for the span (flexible structure - can be messages array, string, etc.)
llm
optional
LLM span
name
optional
example nameName/identifier for the span
output
optional
Output data from the span (flexible structure - can be message, string, etc.)
retriever
optional
Retriever span
tool
optional
Tool span
type
optional
TRACE_SPAN_TYPE_UNKNOWNTypes of spans in a trace
workflow
optional
Workflow span - can contain child spans (agent, llm, tool, retriever)
type
optional
TRACE_SPAN_TYPE_UNKNOWNTypes of spans in a trace
ground_truth
optional
example stringThe ground truth for the prompt.
input
optional
example stringinput_tokens
optional
12345The number of input tokens used in the prompt.
output
optional
example stringoutput_tokens
optional
12345The number of output tokens used in the prompt.
prompt_chunks
optional
The list of prompt chunks.
Show child properties
chunk_usage_pct
optional
123The usage percentage of the chunk.
chunk_used
optional
trueIndicates if the chunk was used in the prompt.
index_uuid
optional
123e4567-e89b-12d3-a456-426614174000The index uuid (Knowledge Base) of the chunk.
source_name
optional
example nameThe source name for the chunk, e.g., the file name or document title.
text
optional
example stringText content of the chunk.
prompt_id
optional
123Prompt ID
prompt_level_metric_results
optional
The metric results for the prompt.
Show child properties
error_description
optional
example stringError description if the metric could not be calculated.
metric_name
optional
example nameMetric name
metric_value_type
optional
METRIC_VALUE_TYPE_UNSPECIFIEDnumber_value
optional
123The value of the metric as a number.
reasoning
optional
example stringReasoning of the metric result.
string_value
optional
example stringThe value of the metric as a string.
trace_id
optional
123e4567-e89b-12d3-a456-426614174000The trace id for the prompt.
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"prompt": {
"evaluation_trace_spans": [],
"ground_truth": "example string",
"input": "example string",
"input_tokens": "12345",
"output": "example string",
"output_tokens": "12345",
"prompt_chunks": [],
"prompt_id": 123,
"prompt_level_metric_results": [],
"trace_id": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET List Evaluation Test Cases
/v2/gen-ai/evaluation_test_cases
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To list all evaluation test cases, send a GET request to /v2/gen-ai/evaluation_test_cases.
Request: /v2/gen-ai/evaluation_test_cases
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/evaluation_test_cases"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
evaluation_test_cases
optional
Alternative way of authentication for internal usage only - should not be exposed to public api
Show child properties
archived_at
optional
2023-01-01T00:00:00Zcreated_at
optional
2023-01-01T00:00:00Zcreated_by_user_email
optional
[email protected]created_by_user_id
optional
12345dataset
optional
Show child properties
created_at
optional
2023-01-01T00:00:00ZTime created at.
dataset_name
optional
example nameName of the dataset.
dataset_type
optional
EVALUATION_DATASET_TYPE_UNKNOWNdataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000UUID of the dataset.
file_size
optional
12345The size of the dataset uploaded file in bytes.
has_ground_truth
optional
trueDoes the dataset have a ground truth column?
row_count
optional
123Number of rows in the dataset.
dataset_name
optional
example namedataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000description
optional
example stringlatest_version_number_of_runs
optional
123metrics
optional
Show child properties
category
optional
METRIC_CATEGORY_UNSPECIFIEDdescription
optional
example stringevaluation_scope
optional
EVALUATION_SCOPE_UNSPECIFIEDScope that determines whether a metric belongs to agent evaluation or model evaluation. For backwards compatibility, UNSPECIFIED defaults to agent metrics only in list operations.
inverted
optional
trueIf true, the metric is inverted, meaning that a lower value is better.
is_metric_goal
optional
truemetric_name
optional
example namemetric_rank
optional
123metric_type
optional
METRIC_TYPE_UNSPECIFIEDmetric_uuid
optional
123e4567-e89b-12d3-a456-426614174000metric_value_type
optional
METRIC_VALUE_TYPE_UNSPECIFIEDrange_max
optional
123The maximum value for the metric.
range_min
optional
123The minimum value for the metric.
name
optional
example namestar_metric
optional
Show child properties
metric_uuid
optional
123e4567-e89b-12d3-a456-426614174000name
optional
example namesuccess_threshold
optional
123The success threshold for the star metric. This is a value that the metric must reach to be considered successful.
success_threshold_pct
optional
123The success threshold for the star metric. This is a percentage value between 0 and 100.
test_case_uuid
optional
123e4567-e89b-12d3-a456-426614174000total_runs
optional
123updated_at
optional
2023-01-01T00:00:00Zupdated_by_user_email
optional
[email protected]updated_by_user_id
optional
12345version
optional
123
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"evaluation_test_cases": [
{
"archived_at": "2023-01-01T00:00:00Z",
"created_at": "2023-01-01T00:00:00Z",
"created_by_user_email": "[email protected]",
"created_by_user_id": "12345",
"dataset_name": "example name",
"dataset_uuid": "123e4567-e89b-12d3-a456-426614174000",
"description": "example string",
"latest_version_number_of_runs": 123,
"metrics": [],
"name": "example name",
"test_case_uuid": "123e4567-e89b-12d3-a456-426614174000",
"total_runs": 123,
"updated_at": "2023-01-01T00:00:00Z",
"updated_by_user_email": "[email protected]",
"updated_by_user_id": "12345",
"version": 123
}
]
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}POST Create Evaluation Test Case.
/v2/gen-ai/evaluation_test_cases
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To create an evaluation test-case send a POST request to /v2/gen-ai/evaluation_test_cases.
Request Body: application/json
agent_workspace_name
optional
example namedataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000Dataset against which the test‑case is executed.
description
optional
example stringDescription of the test case.
metrics
optional
["example string"]Full metric list to use for evaluation test case.
name
optional
example nameName of the test case.
star_metric
optional
Show child properties
metric_uuid
optional
123e4567-e89b-12d3-a456-426614174000name
optional
example namesuccess_threshold
optional
123The success threshold for the star metric. This is a value that the metric must reach to be considered successful.
success_threshold_pct
optional
123The success threshold for the star metric. This is a percentage value between 0 and 100.
workspace_uuid
optional
123e4567-e89b-12d3-a456-426614174000The workspace uuid.
Request: /v2/gen-ai/evaluation_test_cases
{
"agent_workspace_name": "example name",
"dataset_uuid": "123e4567-e89b-12d3-a456-426614174000",
"description": "example string",
"metrics": [
"example string"
],
"name": "example name",
"star_metric": {
"metric_uuid": "123e4567-e89b-12d3-a456-426614174000",
"name": "example name",
"success_threshold": 123,
"success_threshold_pct": 123
},
"workspace_uuid": "123e4567-e89b-12d3-a456-426614174000"
}curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/evaluation_test_cases" \
-d '{
"name": "Test Case",
"description": "Description of the test case",
"dataset_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4",
"metrics": ["1b418231-b7d6-11ef-bf8f-4e013e2ddde4", "2b418231-b7d6-11ef-bf8f-4e013e2ddde4"],
"star_metric": {
"metric_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4",
"name": "Retrieved chunk usage",
"success_threshold_pct": 80
},
"workspace_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4"
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
test_case_uuid
optional
123e4567-e89b-12d3-a456-426614174000Test‑case UUID.
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"test_case_uuid": "123e4567-e89b-12d3-a456-426614174000"
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET List Evaluation Runs by Test Case
/v2/gen-ai/evaluation_test_cases/{evaluation_test_case_uuid}/evaluation_runs
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To list all evaluation runs by test case, send a GET request to /v2/gen-ai/evaluation_test_cases/{evaluation_test_case_uuid}/evaluation_runs.
Path Parameters
evaluation_test_case_uuid
required
"123e4567-e89b-12d3-a456-426614174000"Evaluation run UUID.
Query Parameters
evaluation_test_case_version
optional
1Version of the test case.
Request: /v2/gen-ai/evaluation_test_cases/{evaluation_test_case_uuid}/evaluation_runs
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/evaluation_test_cases/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4/evaluation_runs"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
evaluation_runs
optional
List of evaluation runs.
Show child properties
agent_deleted
optional
trueWhether agent is deleted
agent_deployment_name
optional
example nameThe agent deployment name
agent_name
optional
example nameAgent name
agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Agent UUID.
agent_version_hash
optional
example stringVersion hash
agent_workspace_uuid
optional
123e4567-e89b-12d3-a456-426614174000Agent workspace uuid
created_by_user_email
optional
[email protected]created_by_user_id
optional
12345error_description
optional
example stringThe error description
evaluation_run_uuid
optional
123e4567-e89b-12d3-a456-426614174000Evaluation run UUID.
evaluation_test_case_workspace_uuid
optional
123e4567-e89b-12d3-a456-426614174000Evaluation test case workspace uuid
finished_at
optional
2023-01-01T00:00:00ZRun end time.
pass_status
optional
trueThe pass status of the evaluation run based on the star metric.
queued_at
optional
2023-01-01T00:00:00ZRun queued time.
run_level_metric_results
optional
Show child properties
error_description
optional
example stringError description if the metric could not be calculated.
metric_name
optional
example nameMetric name
metric_value_type
optional
METRIC_VALUE_TYPE_UNSPECIFIEDnumber_value
optional
123The value of the metric as a number.
reasoning
optional
example stringReasoning of the metric result.
string_value
optional
example stringThe value of the metric as a string.
run_name
optional
example nameRun name.
star_metric_result
optional
Show child properties
error_description
optional
example stringError description if the metric could not be calculated.
metric_name
optional
example nameMetric name
metric_value_type
optional
METRIC_VALUE_TYPE_UNSPECIFIEDnumber_value
optional
123The value of the metric as a number.
reasoning
optional
example stringReasoning of the metric result.
string_value
optional
example stringThe value of the metric as a string.
started_at
optional
2023-01-01T00:00:00ZRun start time.
status
optional
EVALUATION_RUN_STATUS_UNSPECIFIEDEvaluation Run Statuses
test_case_description
optional
example stringTest case description.
test_case_name
optional
example nameTest case name.
test_case_uuid
optional
123e4567-e89b-12d3-a456-426614174000Test-case UUID.
test_case_version
optional
123Test-case-version.
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"evaluation_runs": [
{
"agent_deleted": true,
"agent_deployment_name": "example name",
"agent_name": "example name",
"agent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"agent_version_hash": "example string",
"agent_workspace_uuid": "123e4567-e89b-12d3-a456-426614174000",
"created_by_user_email": "[email protected]",
"created_by_user_id": "12345",
"error_description": "example string",
"evaluation_run_uuid": "123e4567-e89b-12d3-a456-426614174000",
"evaluation_test_case_workspace_uuid": "123e4567-e89b-12d3-a456-426614174000",
"finished_at": "2023-01-01T00:00:00Z",
"pass_status": true,
"queued_at": "2023-01-01T00:00:00Z",
"run_level_metric_results": [],
"run_name": "example name",
"started_at": "2023-01-01T00:00:00Z",
"status": "EVALUATION_RUN_STATUS_UNSPECIFIED",
"test_case_description": "example string",
"test_case_name": "example name",
"test_case_uuid": "123e4567-e89b-12d3-a456-426614174000",
"test_case_version": 123
}
]
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET Retrieve Information About an Existing Evaluation Test Case
/v2/gen-ai/evaluation_test_cases/{test_case_uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To retrive information about an existing evaluation test case, send a GET request to /v2/gen-ai/evaluation_test_case/{test_case_uuid}.
Path Parameters
test_case_uuid
required
"123e4567-e89b-12d3-a456-426614174000"The test case uuid to retrieve.
Query Parameters
evaluation_test_case_version
optional
1Version of the test case.
Request: /v2/gen-ai/evaluation_test_cases/{test_case_uuid}
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/evaluation_test_cases/9758a232-b351-11ef-bf8f-4e013e2ddde4"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
evaluation_test_case
optional
Show child properties
archived_at
optional
2023-01-01T00:00:00Zcreated_at
optional
2023-01-01T00:00:00Zcreated_by_user_email
optional
[email protected]created_by_user_id
optional
12345dataset
optional
Show child properties
created_at
optional
2023-01-01T00:00:00ZTime created at.
dataset_name
optional
example nameName of the dataset.
dataset_type
optional
EVALUATION_DATASET_TYPE_UNKNOWNdataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000UUID of the dataset.
file_size
optional
12345The size of the dataset uploaded file in bytes.
has_ground_truth
optional
trueDoes the dataset have a ground truth column?
row_count
optional
123Number of rows in the dataset.
dataset_name
optional
example namedataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000description
optional
example stringlatest_version_number_of_runs
optional
123metrics
optional
Show child properties
category
optional
METRIC_CATEGORY_UNSPECIFIEDdescription
optional
example stringevaluation_scope
optional
EVALUATION_SCOPE_UNSPECIFIEDScope that determines whether a metric belongs to agent evaluation or model evaluation. For backwards compatibility, UNSPECIFIED defaults to agent metrics only in list operations.
inverted
optional
trueIf true, the metric is inverted, meaning that a lower value is better.
is_metric_goal
optional
truemetric_name
optional
example namemetric_rank
optional
123metric_type
optional
METRIC_TYPE_UNSPECIFIEDmetric_uuid
optional
123e4567-e89b-12d3-a456-426614174000metric_value_type
optional
METRIC_VALUE_TYPE_UNSPECIFIEDrange_max
optional
123The maximum value for the metric.
range_min
optional
123The minimum value for the metric.
name
optional
example namestar_metric
optional
Show child properties
metric_uuid
optional
123e4567-e89b-12d3-a456-426614174000name
optional
example namesuccess_threshold
optional
123The success threshold for the star metric. This is a value that the metric must reach to be considered successful.
success_threshold_pct
optional
123The success threshold for the star metric. This is a percentage value between 0 and 100.
test_case_uuid
optional
123e4567-e89b-12d3-a456-426614174000total_runs
optional
123updated_at
optional
2023-01-01T00:00:00Zupdated_by_user_email
optional
[email protected]updated_by_user_id
optional
12345version
optional
123
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"evaluation_test_case": {
"archived_at": "2023-01-01T00:00:00Z",
"created_at": "2023-01-01T00:00:00Z",
"created_by_user_email": "[email protected]",
"created_by_user_id": "12345",
"dataset": {
"created_at": "2023-01-01T00:00:00Z",
"dataset_name": "example name",
"dataset_type": "EVALUATION_DATASET_TYPE_UNKNOWN",
"dataset_uuid": "123e4567-e89b-12d3-a456-426614174000",
"file_size": "12345",
"has_ground_truth": true,
"row_count": 123
},
"dataset_name": "example name",
"dataset_uuid": "123e4567-e89b-12d3-a456-426614174000",
"description": "example string",
"latest_version_number_of_runs": 123,
"metrics": [],
"name": "example name",
"star_metric": {
"metric_uuid": "123e4567-e89b-12d3-a456-426614174000",
"name": "example name",
"success_threshold": 123,
"success_threshold_pct": 123
},
"test_case_uuid": "123e4567-e89b-12d3-a456-426614174000",
"total_runs": 123,
"updated_at": "2023-01-01T00:00:00Z",
"updated_by_user_email": "[email protected]",
"updated_by_user_id": "12345",
"version": 123
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}PUT Update an Evaluation Test Case.
/v2/gen-ai/evaluation_test_cases/{test_case_uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To update an evaluation test-case send a PUT request to /v2/gen-ai/evaluation_test_cases/{test_case_uuid}.
Path Parameters
test_case_uuid
required
"123e4567-e89b-12d3-a456-426614174000"Test-case UUID to update
Request Body: application/json
dataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000Dataset against which the test‑case is executed.
description
optional
example stringDescription of the test case.
metrics
optional
Show child properties
metric_uuids
optional
["example string"]name
optional
example nameName of the test case.
star_metric
optional
Show child properties
metric_uuid
optional
123e4567-e89b-12d3-a456-426614174000name
optional
example namesuccess_threshold
optional
123The success threshold for the star metric. This is a value that the metric must reach to be considered successful.
success_threshold_pct
optional
123The success threshold for the star metric. This is a percentage value between 0 and 100.
test_case_uuid
optional
123e4567-e89b-12d3-a456-426614174000Test-case UUID to update
Request: /v2/gen-ai/evaluation_test_cases/{test_case_uuid}
{
"dataset_uuid": "123e4567-e89b-12d3-a456-426614174000",
"description": "example string",
"metrics": {
"metric_uuids": [
"example string"
]
},
"name": "example name",
"star_metric": {
"metric_uuid": "123e4567-e89b-12d3-a456-426614174000",
"name": "example name",
"success_threshold": 123,
"success_threshold_pct": 123
},
"test_case_uuid": "123e4567-e89b-12d3-a456-426614174000"
}curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/evaluation_test_cases/e51dba65-cf7a-11ef-bf8f-4e013e2ddde4" \
-d '{
"test_case_uuid": "e51dba65-cf7a-11ef-bf8f-4e013e2ddde4",
"name": "Updated Test Case",
"description": "Updated description of the test case",
"dataset_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4",
"metrics": ["1b418231-b7d6-11ef-bf8f-4e013e2ddde4", "2b418231-b7d6-11ef-bf8f-4e013e2ddde4"],
"star_metric": {
"metric_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4",
"name": "Retrieved chunk usage",
"success_threshold_pct": 80
}
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
test_case_uuid
optional
123e4567-e89b-12d3-a456-426614174000version
optional
123The new verson of the test case.
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"test_case_uuid": "123e4567-e89b-12d3-a456-426614174000",
"version": 123
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET List Indexing Jobs for a Knowledge Base
/v2/gen-ai/indexing_jobs
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To list all indexing jobs for a knowledge base, send a GET request to /v2/gen-ai/indexing_jobs.
Query Parameters
page
optional
1Page number.
per_page
optional
1Items per page.
Request: /v2/gen-ai/indexing_jobs
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/indexing_jobs"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
jobs
optional
The indexing jobs
Show child properties
completed_datasources
optional
123Number of datasources indexed completed
created_at
optional
2023-01-01T00:00:00ZCreation date / time
data_source_jobs
optional
Details on Data Sources included in the Indexing Job
Show child properties
completed_at
optional
2023-01-01T00:00:00ZTimestamp when data source completed indexing
data_source_uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the indexed data source
error_details
optional
example stringA detailed error description
error_msg
optional
example stringA string code provinding a hint which part of the system experienced an error
failed_item_count
optional
12345Total count of files that have failed
indexed_file_count
optional
12345Total count of files that have been indexed
indexed_item_count
optional
12345Total count of files that have been indexed
removed_item_count
optional
12345Total count of files that have been removed
skipped_item_count
optional
12345Total count of files that have been skipped
started_at
optional
2023-01-01T00:00:00ZTimestamp when data source started indexing
status
optional
DATA_SOURCE_STATUS_UNKNOWNtotal_bytes
optional
12345Total size of files in data source in bytes
total_bytes_indexed
optional
12345Total size of files in data source in bytes that have been indexed
total_file_count
optional
12345Total file count in the data source
data_source_uuids
optional
["example string"]finished_at
optional
2023-01-01T00:00:00Zis_report_available
optional
trueBoolean value to determine if the indexing job details are available
knowledge_base_uuid
optional
123e4567-e89b-12d3-a456-426614174000Knowledge base id
phase
optional
BATCH_JOB_PHASE_UNKNOWNstarted_at
optional
2023-01-01T00:00:00Zstatus
optional
INDEX_JOB_STATUS_UNKNOWNtokens
optional
123Number of tokens [This field is deprecated]
total_datasources
optional
123Number of datasources being indexed
total_tokens
optional
12345Total Tokens Consumed By the Indexing Job
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
links
optional
Links to other pages
Show child properties
pages
optional
Information about how to reach other pages
Show child properties
first
optional
example stringFirst page
last
optional
example stringLast page
next
optional
example stringNext page
previous
optional
example stringPrevious page
meta
optional
Meta information about the data set
Show child properties
page
optional
123The current page
pages
optional
123Total number of pages
total
optional
123Total amount of items over all pages
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"jobs": [
{
"completed_datasources": 123,
"created_at": "2023-01-01T00:00:00Z",
"data_source_jobs": [],
"data_source_uuids": [
"example string"
],
"finished_at": "2023-01-01T00:00:00Z",
"is_report_available": true,
"knowledge_base_uuid": "123e4567-e89b-12d3-a456-426614174000",
"phase": "BATCH_JOB_PHASE_UNKNOWN",
"started_at": "2023-01-01T00:00:00Z",
"status": "INDEX_JOB_STATUS_UNKNOWN",
"tokens": 123,
"total_datasources": 123,
"total_tokens": "12345",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
],
"links": {
"pages": {
"first": "example string",
"last": "example string",
"next": "example string",
"previous": "example string"
}
},
"meta": {
"page": 123,
"pages": 123,
"total": 123
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}POST Start Indexing Job for a Knowledge Base
/v2/gen-ai/indexing_jobs
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To start an indexing job for a knowledge base, send a POST request to /v2/gen-ai/indexing_jobs.
Request Body: application/json
data_source_uuids
optional
["example string"]List of data source ids to index, if none are provided, all data sources will be indexed
knowledge_base_uuid
optional
"12345678-1234-1234-1234-123456789012"Knowledge base id
Request: /v2/gen-ai/indexing_jobs
{
"data_source_uuids": [
"example string"
],
"knowledge_base_uuid": "\"12345678-1234-1234-1234-123456789012\""
}curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/indexing_jobs" \
-d '{
"knowledge_base_uuid": "9758a232-b351-11ef-bf8f-4e013e2ddde4",
"data_source_uuids": [
"9a825ee0-bbb1-11ef-bf8f-4e013e2ddde4"
]
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
job
optional
IndexingJob description
Show child properties
completed_datasources
optional
123Number of datasources indexed completed
created_at
optional
2023-01-01T00:00:00ZCreation date / time
data_source_jobs
optional
Details on Data Sources included in the Indexing Job
Show child properties
completed_at
optional
2023-01-01T00:00:00ZTimestamp when data source completed indexing
data_source_uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the indexed data source
error_details
optional
example stringA detailed error description
error_msg
optional
example stringA string code provinding a hint which part of the system experienced an error
failed_item_count
optional
12345Total count of files that have failed
indexed_file_count
optional
12345Total count of files that have been indexed
indexed_item_count
optional
12345Total count of files that have been indexed
removed_item_count
optional
12345Total count of files that have been removed
skipped_item_count
optional
12345Total count of files that have been skipped
started_at
optional
2023-01-01T00:00:00ZTimestamp when data source started indexing
status
optional
DATA_SOURCE_STATUS_UNKNOWNtotal_bytes
optional
12345Total size of files in data source in bytes
total_bytes_indexed
optional
12345Total size of files in data source in bytes that have been indexed
total_file_count
optional
12345Total file count in the data source
data_source_uuids
optional
["example string"]finished_at
optional
2023-01-01T00:00:00Zis_report_available
optional
trueBoolean value to determine if the indexing job details are available
knowledge_base_uuid
optional
123e4567-e89b-12d3-a456-426614174000Knowledge base id
phase
optional
BATCH_JOB_PHASE_UNKNOWNstarted_at
optional
2023-01-01T00:00:00Zstatus
optional
INDEX_JOB_STATUS_UNKNOWNtokens
optional
123Number of tokens [This field is deprecated]
total_datasources
optional
123Number of datasources being indexed
total_tokens
optional
12345Total Tokens Consumed By the Indexing Job
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"job": {
"completed_datasources": 123,
"created_at": "2023-01-01T00:00:00Z",
"data_source_jobs": [],
"data_source_uuids": [
"example string"
],
"finished_at": "2023-01-01T00:00:00Z",
"is_report_available": true,
"knowledge_base_uuid": "123e4567-e89b-12d3-a456-426614174000",
"phase": "BATCH_JOB_PHASE_UNKNOWN",
"started_at": "2023-01-01T00:00:00Z",
"status": "INDEX_JOB_STATUS_UNKNOWN",
"tokens": 123,
"total_datasources": 123,
"total_tokens": "12345",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET List Data Sources for Indexing Job for a Knowledge Base
/v2/gen-ai/indexing_jobs/{indexing_job_uuid}/data_sources
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To list all datasources for an indexing job, send a GET request to /v2/gen-ai/indexing_jobs/{indexing_job_uuid}/data_sources.
Path Parameters
indexing_job_uuid
required
"123e4567-e89b-12d3-a456-426614174000"Uuid of the indexing job
Request: /v2/gen-ai/indexing_jobs/{indexing_job_uuid}/data_sources
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/indexing_jobs/9758a232-b351-11ef-bf8f-4e013e2ddde4"
Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
indexed_data_sources
optional
Show child properties
completed_at
optional
2023-01-01T00:00:00ZTimestamp when data source completed indexing
data_source_uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the indexed data source
error_details
optional
example stringA detailed error description
error_msg
optional
example stringA string code provinding a hint which part of the system experienced an error
failed_item_count
optional
12345Total count of files that have failed
indexed_file_count
optional
12345Total count of files that have been indexed
indexed_item_count
optional
12345Total count of files that have been indexed
removed_item_count
optional
12345Total count of files that have been removed
skipped_item_count
optional
12345Total count of files that have been skipped
started_at
optional
2023-01-01T00:00:00ZTimestamp when data source started indexing
status
optional
DATA_SOURCE_STATUS_UNKNOWNtotal_bytes
optional
12345Total size of files in data source in bytes
total_bytes_indexed
optional
12345Total size of files in data source in bytes that have been indexed
total_file_count
optional
12345Total file count in the data source
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"indexed_data_sources": [
{
"completed_at": "2023-01-01T00:00:00Z",
"data_source_uuid": "123e4567-e89b-12d3-a456-426614174000",
"error_details": "example string",
"error_msg": "example string",
"failed_item_count": "12345",
"indexed_file_count": "12345",
"indexed_item_count": "12345",
"removed_item_count": "12345",
"skipped_item_count": "12345",
"started_at": "2023-01-01T00:00:00Z",
"status": "DATA_SOURCE_STATUS_UNKNOWN",
"total_bytes": "12345",
"total_bytes_indexed": "12345",
"total_file_count": "12345"
}
]
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET Get Signed URL for Indexing Job Details
/v2/gen-ai/indexing_jobs/{indexing_job_uuid}/details_signed_url
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To get a signed URL for indexing job details, send a GET request to /v2/gen-ai/indexing_jobs/{uuid}/details_signed_url.
Path Parameters
indexing_job_uuid
required
"123e4567-e89b-12d3-a456-426614174000"The uuid of the indexing job
Request: /v2/gen-ai/indexing_jobs/{indexing_job_uuid}/details_signed_url
curl --location --request GET 'https://api.digitalocean.com/v2/gen-ai/indexing_jobs/6b090372-a8c3-11f0-b542-ca68c578b04b/details_signed_url' \
--header 'Authorization: Bearer $DIGITALOCEAN_TOKEN' \
--header 'Content-Type: application/json'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
signed_url
optional
example stringThe signed url for downloading the indexing job details
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"signed_url": "example string"
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET Retrieve Status of Indexing Job for a Knowledge Base
/v2/gen-ai/indexing_jobs/{uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To get status of an indexing Job for a knowledge base, send a GET request to /v2/gen-ai/indexing_jobs/{uuid}.
Path Parameters
uuid
required
"123e4567-e89b-12d3-a456-426614174000"Indexing job id
Request: /v2/gen-ai/indexing_jobs/{uuid}
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/indexing_jobs/9758a232-b351-11ef-bf8f-4e013e2ddde4"
Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
job
optional
IndexingJob description
Show child properties
completed_datasources
optional
123Number of datasources indexed completed
created_at
optional
2023-01-01T00:00:00ZCreation date / time
data_source_jobs
optional
Details on Data Sources included in the Indexing Job
Show child properties
completed_at
optional
2023-01-01T00:00:00ZTimestamp when data source completed indexing
data_source_uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the indexed data source
error_details
optional
example stringA detailed error description
error_msg
optional
example stringA string code provinding a hint which part of the system experienced an error
failed_item_count
optional
12345Total count of files that have failed
indexed_file_count
optional
12345Total count of files that have been indexed
indexed_item_count
optional
12345Total count of files that have been indexed
removed_item_count
optional
12345Total count of files that have been removed
skipped_item_count
optional
12345Total count of files that have been skipped
started_at
optional
2023-01-01T00:00:00ZTimestamp when data source started indexing
status
optional
DATA_SOURCE_STATUS_UNKNOWNtotal_bytes
optional
12345Total size of files in data source in bytes
total_bytes_indexed
optional
12345Total size of files in data source in bytes that have been indexed
total_file_count
optional
12345Total file count in the data source
data_source_uuids
optional
["example string"]finished_at
optional
2023-01-01T00:00:00Zis_report_available
optional
trueBoolean value to determine if the indexing job details are available
knowledge_base_uuid
optional
123e4567-e89b-12d3-a456-426614174000Knowledge base id
phase
optional
BATCH_JOB_PHASE_UNKNOWNstarted_at
optional
2023-01-01T00:00:00Zstatus
optional
INDEX_JOB_STATUS_UNKNOWNtokens
optional
123Number of tokens [This field is deprecated]
total_datasources
optional
123Number of datasources being indexed
total_tokens
optional
12345Total Tokens Consumed By the Indexing Job
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"job": {
"completed_datasources": 123,
"created_at": "2023-01-01T00:00:00Z",
"data_source_jobs": [],
"data_source_uuids": [
"example string"
],
"finished_at": "2023-01-01T00:00:00Z",
"is_report_available": true,
"knowledge_base_uuid": "123e4567-e89b-12d3-a456-426614174000",
"phase": "BATCH_JOB_PHASE_UNKNOWN",
"started_at": "2023-01-01T00:00:00Z",
"status": "INDEX_JOB_STATUS_UNKNOWN",
"tokens": 123,
"total_datasources": 123,
"total_tokens": "12345",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}PUT Cancel Indexing Job for a Knowledge Base
/v2/gen-ai/indexing_jobs/{uuid}/cancel
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To cancel an indexing job for a knowledge base, send a PUT request to /v2/gen-ai/indexing_jobs/{uuid}/cancel.
Path Parameters
uuid
required
"123e4567-e89b-12d3-a456-426614174000"A unique identifier for an indexing job.
Request Body: application/json
uuid
optional
"12345678-1234-1234-1234-123456789012"A unique identifier for an indexing job.
Request: /v2/gen-ai/indexing_jobs/{uuid}/cancel
{
"uuid": "\"12345678-1234-1234-1234-123456789012\""
}curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/indexing_jobs/79ca9798-cf7d-11ef-bf8f-4e013e2ddde4/cancel" \
-d '{
"uuid": "79ca9798-cf7d-11ef-bf8f-4e013e2ddde4"
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
job
optional
IndexingJob description
Show child properties
completed_datasources
optional
123Number of datasources indexed completed
created_at
optional
2023-01-01T00:00:00ZCreation date / time
data_source_jobs
optional
Details on Data Sources included in the Indexing Job
Show child properties
completed_at
optional
2023-01-01T00:00:00ZTimestamp when data source completed indexing
data_source_uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the indexed data source
error_details
optional
example stringA detailed error description
error_msg
optional
example stringA string code provinding a hint which part of the system experienced an error
failed_item_count
optional
12345Total count of files that have failed
indexed_file_count
optional
12345Total count of files that have been indexed
indexed_item_count
optional
12345Total count of files that have been indexed
removed_item_count
optional
12345Total count of files that have been removed
skipped_item_count
optional
12345Total count of files that have been skipped
started_at
optional
2023-01-01T00:00:00ZTimestamp when data source started indexing
status
optional
DATA_SOURCE_STATUS_UNKNOWNtotal_bytes
optional
12345Total size of files in data source in bytes
total_bytes_indexed
optional
12345Total size of files in data source in bytes that have been indexed
total_file_count
optional
12345Total file count in the data source
data_source_uuids
optional
["example string"]finished_at
optional
2023-01-01T00:00:00Zis_report_available
optional
trueBoolean value to determine if the indexing job details are available
knowledge_base_uuid
optional
123e4567-e89b-12d3-a456-426614174000Knowledge base id
phase
optional
BATCH_JOB_PHASE_UNKNOWNstarted_at
optional
2023-01-01T00:00:00Zstatus
optional
INDEX_JOB_STATUS_UNKNOWNtokens
optional
123Number of tokens [This field is deprecated]
total_datasources
optional
123Number of datasources being indexed
total_tokens
optional
12345Total Tokens Consumed By the Indexing Job
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"job": {
"completed_datasources": 123,
"created_at": "2023-01-01T00:00:00Z",
"data_source_jobs": [],
"data_source_uuids": [
"example string"
],
"finished_at": "2023-01-01T00:00:00Z",
"is_report_available": true,
"knowledge_base_uuid": "123e4567-e89b-12d3-a456-426614174000",
"phase": "BATCH_JOB_PHASE_UNKNOWN",
"started_at": "2023-01-01T00:00:00Z",
"status": "INDEX_JOB_STATUS_UNKNOWN",
"tokens": 123,
"total_datasources": 123,
"total_tokens": "12345",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET List Knowledge Bases
/v2/gen-ai/knowledge_bases
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To list all knowledge bases, send a GET request to /v2/gen-ai/knowledge_bases.
Query Parameters
page
optional
1Page number.
per_page
optional
1Items per page.
Request: /v2/gen-ai/knowledge_bases
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/knowledge_bases"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
knowledge_bases
optional
The knowledge bases
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
Show child properties
completed_datasources
optional
123Number of datasources indexed completed
created_at
optional
2023-01-01T00:00:00ZCreation date / time
data_source_jobs
optional
Details on Data Sources included in the Indexing Job
Show child properties
completed_at
optional
2023-01-01T00:00:00ZTimestamp when data source completed indexing
data_source_uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the indexed data source
error_details
optional
example stringA detailed error description
error_msg
optional
example stringA string code provinding a hint which part of the system experienced an error
failed_item_count
optional
12345Total count of files that have failed
indexed_file_count
optional
12345Total count of files that have been indexed
indexed_item_count
optional
12345Total count of files that have been indexed
removed_item_count
optional
12345Total count of files that have been removed
skipped_item_count
optional
12345Total count of files that have been skipped
started_at
optional
2023-01-01T00:00:00ZTimestamp when data source started indexing
status
optional
DATA_SOURCE_STATUS_UNKNOWNtotal_bytes
optional
12345Total size of files in data source in bytes
total_bytes_indexed
optional
12345Total size of files in data source in bytes that have been indexed
total_file_count
optional
12345Total file count in the data source
data_source_uuids
optional
["example string"]finished_at
optional
2023-01-01T00:00:00Zis_report_available
optional
trueBoolean value to determine if the indexing job details are available
knowledge_base_uuid
optional
123e4567-e89b-12d3-a456-426614174000Knowledge base id
phase
optional
BATCH_JOB_PHASE_UNKNOWNstarted_at
optional
2023-01-01T00:00:00Zstatus
optional
INDEX_JOB_STATUS_UNKNOWNtokens
optional
123Number of tokens [This field is deprecated]
total_datasources
optional
123Number of datasources being indexed
total_tokens
optional
12345Total Tokens Consumed By the Indexing Job
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
Show child properties
enabled
optional
trueWhether reranking is enabled for retrieval
model
optional
"bge-reranker-v2-m3"Reranker model internal name
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
links
optional
Links to other pages
Show child properties
pages
optional
Information about how to reach other pages
Show child properties
first
optional
example stringFirst page
last
optional
example stringLast page
next
optional
example stringNext page
previous
optional
example stringPrevious page
meta
optional
Meta information about the data set
Show child properties
page
optional
123The current page
pages
optional
123Total number of pages
total
optional
123Total amount of items over all pages
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"knowledge_bases": [
{
"added_to_agent_at": "2023-01-01T00:00:00Z",
"created_at": "2023-01-01T00:00:00Z",
"database_id": "123e4567-e89b-12d3-a456-426614174000",
"embedding_model_uuid": "123e4567-e89b-12d3-a456-426614174000",
"is_public": true,
"name": "example name",
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"region": "example string",
"tags": [
"example string"
],
"updated_at": "2023-01-01T00:00:00Z",
"user_id": "12345",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
],
"links": {
"pages": {
"first": "example string",
"last": "example string",
"next": "example string",
"previous": "example string"
}
},
"meta": {
"page": 123,
"pages": 123,
"total": 123
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}POST Create a Knowledge Base
/v2/gen-ai/knowledge_bases
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To create a knowledge base, send a POST request to /v2/gen-ai/knowledge_bases.
Request Body: application/json
database_id
optional
"12345678-1234-1234-1234-123456789012"Identifier of the DigitalOcean OpenSearch database this knowledge base will use, optional. If not provided, we create a new database for the knowledge base in the same region as the knowledge base.
datasources
optional
Optional data sources to attach at creation. Omit or use an empty list to create the knowledge base without sources, then add sources (with chunking strategy and sizes) using Add a Data Source to a Knowledge Base. When provided, see Organize Data Sources for best practices.
Show child properties
aws_data_source
optional
AWS S3 Data Source
Show child properties
bucket_name
optional
example nameSpaces bucket name
item_path
optional
example stringkey_id
optional
123e4567-e89b-12d3-a456-426614174000The AWS Key ID
region
optional
example stringRegion of bucket
secret_key
optional
example stringThe AWS Secret Key
bucket_name
optional
example nameDeprecated, moved to data_source_details
bucket_region
optional
example stringDeprecated, moved to data_source_details
chunking_algorithm
optional
CHUNKING_ALGORITHM_UNKNOWNchunking_options
optional
Show child properties
child_chunk_size
optional
350max_chunk_size
optional
750Common options
parent_chunk_size
optional
1000Hierarchical options
semantic_threshold
optional
0.5Semantic options
dropbox_data_source
optional
Dropbox Data Source
Show child properties
folder
optional
example stringrefresh_token
optional
example stringRefresh token. you can obrain a refresh token by following the oauth2 flow. see /v2/gen-ai/oauth2/dropbox/tokens for reference.
file_upload_data_source
optional
File to upload as data source for knowledge base.
Show child properties
original_file_name
optional
example nameThe original file name
size_in_bytes
optional
12345The size of the file in bytes
stored_object_key
optional
example stringThe object key the file was stored as
google_drive_data_source
optional
Google Drive Data Source
Show child properties
folder_id
optional
123e4567-e89b-12d3-a456-426614174000refresh_token
optional
example stringRefresh token. you can obrain a refresh token by following the oauth2 flow. see /v2/gen-ai/oauth2/google/tokens for reference.
item_path
optional
example stringspaces_data_source
optional
Spaces Bucket Data Source
Show child properties
bucket_name
optional
example nameSpaces bucket name
item_path
optional
example stringregion
optional
example stringRegion of bucket
web_crawler_data_source
optional
WebCrawlerDataSource
Show child properties
base_url
optional
example stringThe base url to crawl.
crawling_option
optional
UNKNOWNOptions for specifying how URLs found on pages should be handled.
- UNKNOWN: Default unknown value
- SCOPED: Only include the base URL.
- PATH: Crawl the base URL and linked pages within the URL path.
- DOMAIN: Crawl the base URL and linked pages within the same domain.
- SUBDOMAINS: Crawl the base URL and linked pages for any subdomain.
- SITEMAP: Crawl URLs discovered in the sitemap.
embed_media
optional
trueWhether to ingest and index media (images, etc.) on web pages.
exclude_tags
optional
["example string"]Declaring which tags to exclude in web pages while webcrawling
embedding_model_uuid
optional
"12345678-1234-1234-1234-123456789012"Identifier for the embedding model.
name
optional
"My Knowledge Base"Name of the knowledge base.
project_id
optional
"12345678-1234-1234-1234-123456789012"Identifier of the DigitalOcean project this knowledge base will belong to.
region
optional
"tor1"The datacenter region to deploy the knowledge base in.
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
Show child properties
enabled
optional
trueWhether reranking is enabled for retrieval
model
optional
"bge-reranker-v2-m3"Reranker model internal name
size
optional
OPEN_SEARCH_PLAN_SIZE_UNSPECIFIEDtags
optional
["example string"]Tags to organize your knowledge base.
vpc_uuid
optional
"12345678-1234-1234-1234-123456789012"The VPC to deploy the knowledge base database in
Request: /v2/gen-ai/knowledge_bases
{
"database_id": "\"12345678-1234-1234-1234-123456789012\"",
"datasources": [
{
"bucket_name": "example name",
"bucket_region": "example string",
"chunking_algorithm": "CHUNKING_ALGORITHM_UNKNOWN",
"item_path": "example string"
}
],
"embedding_model_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"name": "\"My Knowledge Base\"",
"project_id": "\"12345678-1234-1234-1234-123456789012\"",
"region": "\"tor1\"",
"reranking_config": {
"enabled": true,
"model": "\"bge-reranker-v2-m3\""
},
"size": "OPEN_SEARCH_PLAN_SIZE_UNSPECIFIED",
"tags": [
"example string"
],
"vpc_uuid": "\"12345678-1234-1234-1234-123456789012\""
}curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/knowledge_bases" \
-d '{
"name": "kb-api-create",
"embedding_model_uuid": "05700391-7aa8-11ef-bf8f-4e013e2ddde4",
"project_id": "37455431-84bd-4fa2-94cf-e8486f8f8c5e",
"tags": [
"tag1"
],
"database_id": "abf1055a-745d-4c24-a1db-1959ea819264",
"datasources": [
{
"spaces_data_source": {
"bucket_name": "test-public-gen-ai",
"region": "tor1"
},
"chunking_algorithm": "CHUNKING_ALGORITHM_HIERARCHICAL",
"chunking_options": {
"parent_chunk_size": 1000,
"child_chunk_size": 350
}
},
{
"web_crawler_data_source": {
"base_url": "https://example.com",
"crawling_option": "SCOPED",
"embed_media": false,
"exclude_tags": ["nav","footer","header","aside","script","style","form","iframe", "noscript"]
},
"chunking_algorithm": "CHUNKING_ALGORITHM_SEMANTIC",
"chunking_options": {
"max_chunk_size": 500,
"semantic_threshold": 0.6
}
},
{
"spaces_data_source": {
"bucket_name": "test-public-gen-ai-2",
"region": "tor1"
},
"chunking_algorithm": "CHUNKING_ALGORITHM_FIXED_LENGTH",
"chunking_options": {
"max_chunk_size": 400
}
},
],
"region": "tor1",
"vpc_uuid": "f7176e0b-8c5e-4e32-948e-79327e56225a",
"reranking_config": {
"enabled": true,
"model": "bge-reranker-v2-m3"
}
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
knowledge_base
optional
Knowledgebase Description
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
Show child properties
completed_datasources
optional
123Number of datasources indexed completed
created_at
optional
2023-01-01T00:00:00ZCreation date / time
data_source_jobs
optional
Details on Data Sources included in the Indexing Job
Show child properties
completed_at
optional
2023-01-01T00:00:00ZTimestamp when data source completed indexing
data_source_uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the indexed data source
error_details
optional
example stringA detailed error description
error_msg
optional
example stringA string code provinding a hint which part of the system experienced an error
failed_item_count
optional
12345Total count of files that have failed
indexed_file_count
optional
12345Total count of files that have been indexed
indexed_item_count
optional
12345Total count of files that have been indexed
removed_item_count
optional
12345Total count of files that have been removed
skipped_item_count
optional
12345Total count of files that have been skipped
started_at
optional
2023-01-01T00:00:00ZTimestamp when data source started indexing
status
optional
DATA_SOURCE_STATUS_UNKNOWNtotal_bytes
optional
12345Total size of files in data source in bytes
total_bytes_indexed
optional
12345Total size of files in data source in bytes that have been indexed
total_file_count
optional
12345Total file count in the data source
data_source_uuids
optional
["example string"]finished_at
optional
2023-01-01T00:00:00Zis_report_available
optional
trueBoolean value to determine if the indexing job details are available
knowledge_base_uuid
optional
123e4567-e89b-12d3-a456-426614174000Knowledge base id
phase
optional
BATCH_JOB_PHASE_UNKNOWNstarted_at
optional
2023-01-01T00:00:00Zstatus
optional
INDEX_JOB_STATUS_UNKNOWNtokens
optional
123Number of tokens [This field is deprecated]
total_datasources
optional
123Number of datasources being indexed
total_tokens
optional
12345Total Tokens Consumed By the Indexing Job
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
Show child properties
enabled
optional
trueWhether reranking is enabled for retrieval
model
optional
"bge-reranker-v2-m3"Reranker model internal name
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"knowledge_base": {
"added_to_agent_at": "2023-01-01T00:00:00Z",
"created_at": "2023-01-01T00:00:00Z",
"database_id": "123e4567-e89b-12d3-a456-426614174000",
"embedding_model_uuid": "123e4567-e89b-12d3-a456-426614174000",
"is_public": true,
"last_indexing_job": {
"completed_datasources": 123,
"created_at": "2023-01-01T00:00:00Z",
"data_source_jobs": [],
"data_source_uuids": [
"example string"
],
"finished_at": "2023-01-01T00:00:00Z",
"is_report_available": true,
"knowledge_base_uuid": "123e4567-e89b-12d3-a456-426614174000",
"phase": "BATCH_JOB_PHASE_UNKNOWN",
"started_at": "2023-01-01T00:00:00Z",
"status": "INDEX_JOB_STATUS_UNKNOWN",
"tokens": 123,
"total_datasources": 123,
"total_tokens": "12345",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"name": "example name",
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"region": "example string",
"reranking_config": {
"enabled": true,
"model": "\"bge-reranker-v2-m3\""
},
"tags": [
"example string"
],
"updated_at": "2023-01-01T00:00:00Z",
"user_id": "12345",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}POST Create Presigned URLs for Data Source File Upload
/v2/gen-ai/knowledge_bases/data_sources/file_upload_presigned_urls
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To create presigned URLs for knowledge base data source file upload, send a POST request to /v2/gen-ai/knowledge_bases/data_sources/file_upload_presigned_urls.
Request Body: application/json
files
optional
A list of files to generate presigned URLs for.
Show child properties
file_name
optional
example nameLocal filename
file_size
optional
12345The size of the file in bytes.
Request: /v2/gen-ai/knowledge_bases/data_sources/file_upload_presigned_urls
{
"files": [
{
"file_name": "example name",
"file_size": "12345"
}
]
}curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/knowledge_bases/data_sources/file_upload_presigned_urls" \
-d '{
"files": [{
"file_name": "dataset.csv",
"file_size": 2048
}]
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
request_id
optional
123e4567-e89b-12d3-a456-426614174000The ID generated for the request for Presigned URLs.
uploads
optional
A list of generated presigned URLs and object keys, one per file.
Show child properties
expires_at
optional
2023-01-01T00:00:00ZThe time the url expires at.
object_key
optional
example stringThe unique object key to store the file as.
original_file_name
optional
example nameThe original file name.
presigned_url
optional
example stringThe actual presigned URL the client can use to upload the file directly.
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"request_id": "123e4567-e89b-12d3-a456-426614174000",
"uploads": [
{
"expires_at": "2023-01-01T00:00:00Z",
"object_key": "example string",
"original_file_name": "example name",
"presigned_url": "example string"
}
]
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET List Data Sources for a Knowledge Base
/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To list all data sources for a knowledge base, send a GET request to /v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources.
Path Parameters
knowledge_base_uuid
required
"123e4567-e89b-12d3-a456-426614174000"Knowledge base id
Query Parameters
page
optional
1Page number.
per_page
optional
1Items per page.
Request: /v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/knowledge_bases/9758a232-b351-11ef-bf8f-4e013e2ddde4/data_sources"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
knowledge_base_data_sources
optional
The data sources
Show child properties
aws_data_source
optional
AWS S3 Data Source for Display
Show child properties
bucket_name
optional
example nameSpaces bucket name
item_path
optional
example stringregion
optional
example stringRegion of bucket
bucket_name
optional
example nameName of storage bucket - Deprecated, moved to data_source_details
chunking_algorithm
optional
CHUNKING_ALGORITHM_UNKNOWNchunking_options
optional
Show child properties
child_chunk_size
optional
350max_chunk_size
optional
750Common options
parent_chunk_size
optional
1000Hierarchical options
semantic_threshold
optional
0.5Semantic options
created_at
optional
2023-01-01T00:00:00ZCreation date / time
dropbox_data_source
optional
Dropbox Data Source for Display
Show child properties
folder
optional
example stringfile_upload_data_source
optional
File to upload as data source for knowledge base.
Show child properties
original_file_name
optional
example nameThe original file name
size_in_bytes
optional
12345The size of the file in bytes
stored_object_key
optional
example stringThe object key the file was stored as
google_drive_data_source
optional
Google Drive Data Source for Display
Show child properties
folder_id
optional
123e4567-e89b-12d3-a456-426614174000folder_name
optional
example nameName of the selected folder if available
item_path
optional
example stringPath of folder or object in bucket - Deprecated, moved to data_source_details
last_datasource_indexing_job
optional
Show child properties
completed_at
optional
2023-01-01T00:00:00ZTimestamp when data source completed indexing
data_source_uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the indexed data source
error_details
optional
example stringA detailed error description
error_msg
optional
example stringA string code provinding a hint which part of the system experienced an error
failed_item_count
optional
12345Total count of files that have failed
indexed_file_count
optional
12345Total count of files that have been indexed
indexed_item_count
optional
12345Total count of files that have been indexed
removed_item_count
optional
12345Total count of files that have been removed
skipped_item_count
optional
12345Total count of files that have been skipped
started_at
optional
2023-01-01T00:00:00ZTimestamp when data source started indexing
status
optional
DATA_SOURCE_STATUS_UNKNOWNtotal_bytes
optional
12345Total size of files in data source in bytes
total_bytes_indexed
optional
12345Total size of files in data source in bytes that have been indexed
total_file_count
optional
12345Total file count in the data source
region
optional
example stringRegion code - Deprecated, moved to data_source_details
spaces_data_source
optional
Spaces Bucket Data Source
Show child properties
bucket_name
optional
example nameSpaces bucket name
item_path
optional
example stringregion
optional
example stringRegion of bucket
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of knowledge base
web_crawler_data_source
optional
WebCrawlerDataSource
Show child properties
base_url
optional
example stringThe base url to crawl.
crawling_option
optional
UNKNOWNOptions for specifying how URLs found on pages should be handled.
- UNKNOWN: Default unknown value
- SCOPED: Only include the base URL.
- PATH: Crawl the base URL and linked pages within the URL path.
- DOMAIN: Crawl the base URL and linked pages within the same domain.
- SUBDOMAINS: Crawl the base URL and linked pages for any subdomain.
- SITEMAP: Crawl URLs discovered in the sitemap.
embed_media
optional
trueWhether to ingest and index media (images, etc.) on web pages.
exclude_tags
optional
["example string"]Declaring which tags to exclude in web pages while webcrawling
links
optional
Links to other pages
Show child properties
pages
optional
Information about how to reach other pages
Show child properties
first
optional
example stringFirst page
last
optional
example stringLast page
next
optional
example stringNext page
previous
optional
example stringPrevious page
meta
optional
Meta information about the data set
Show child properties
page
optional
123The current page
pages
optional
123Total number of pages
total
optional
123Total amount of items over all pages
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"knowledge_base_data_sources": [
{
"bucket_name": "example name",
"chunking_algorithm": "CHUNKING_ALGORITHM_UNKNOWN",
"created_at": "2023-01-01T00:00:00Z",
"item_path": "example string",
"region": "example string",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
],
"links": {
"pages": {
"first": "example string",
"last": "example string",
"next": "example string",
"previous": "example string"
}
},
"meta": {
"page": 123,
"pages": 123,
"total": 123
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}POST Add Data Source to a Knowledge Base
/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To add a data source to a knowledge base, send a POST request to /v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources.
Path Parameters
knowledge_base_uuid
required
"123e4567-e89b-12d3-a456-426614174000"Knowledge base id
Request Body: application/json
aws_data_source
optional
AWS S3 Data Source
Show child properties
bucket_name
optional
example nameSpaces bucket name
item_path
optional
example stringkey_id
optional
123e4567-e89b-12d3-a456-426614174000The AWS Key ID
region
optional
example stringRegion of bucket
secret_key
optional
example stringThe AWS Secret Key
chunking_algorithm
optional
CHUNKING_ALGORITHM_UNKNOWNchunking_options
optional
Show child properties
child_chunk_size
optional
350max_chunk_size
optional
750Common options
parent_chunk_size
optional
1000Hierarchical options
semantic_threshold
optional
0.5Semantic options
knowledge_base_uuid
optional
"12345678-1234-1234-1234-123456789012"Knowledge base id
spaces_data_source
optional
Spaces Bucket Data Source
Show child properties
bucket_name
optional
example nameSpaces bucket name
item_path
optional
example stringregion
optional
example stringRegion of bucket
web_crawler_data_source
optional
WebCrawlerDataSource
Show child properties
base_url
optional
example stringThe base url to crawl.
crawling_option
optional
UNKNOWNOptions for specifying how URLs found on pages should be handled.
- UNKNOWN: Default unknown value
- SCOPED: Only include the base URL.
- PATH: Crawl the base URL and linked pages within the URL path.
- DOMAIN: Crawl the base URL and linked pages within the same domain.
- SUBDOMAINS: Crawl the base URL and linked pages for any subdomain.
- SITEMAP: Crawl URLs discovered in the sitemap.
embed_media
optional
trueWhether to ingest and index media (images, etc.) on web pages.
exclude_tags
optional
["example string"]Declaring which tags to exclude in web pages while webcrawling
Request: /v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources
{
"aws_data_source": {
"bucket_name": "example name",
"item_path": "example string",
"key_id": "123e4567-e89b-12d3-a456-426614174000",
"region": "example string",
"secret_key": "example string"
},
"chunking_algorithm": "CHUNKING_ALGORITHM_UNKNOWN",
"chunking_options": {
"child_chunk_size": 350,
"max_chunk_size": 750,
"parent_chunk_size": 1000,
"semantic_threshold": 0.5
},
"knowledge_base_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"spaces_data_source": {
"bucket_name": "example name",
"item_path": "example string",
"region": "example string"
},
"web_crawler_data_source": {
"base_url": "example string",
"crawling_option": "UNKNOWN",
"embed_media": true,
"exclude_tags": [
"example string"
]
}
}curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/knowledge_bases/20cd8434-6ea1-11f0-bf8f-4e013e2ddde4/data_sources" \
-d '{
"knowledge_base_uuid": "20cd8434-6ea1-11f0-bf8f-4e013e2ddde4",
"web_crawler_data_source": {
"base_url": "https://example.com",
"crawling_option": "SCOPED",
"embed_media": false,
"exclude_tags": ["nav","footer","header","aside","script","style","form","iframe", "noscript"]
},
"chunking_algorithm": "CHUNKING_ALGORITHM_SECTION_BASED",
"chunking_options": {
"max_chunk_size": 500
}
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
knowledge_base_data_source
optional
Data Source configuration for Knowledge Bases
Show child properties
aws_data_source
optional
AWS S3 Data Source for Display
Show child properties
bucket_name
optional
example nameSpaces bucket name
item_path
optional
example stringregion
optional
example stringRegion of bucket
bucket_name
optional
example nameName of storage bucket - Deprecated, moved to data_source_details
chunking_algorithm
optional
CHUNKING_ALGORITHM_UNKNOWNchunking_options
optional
Show child properties
child_chunk_size
optional
350max_chunk_size
optional
750Common options
parent_chunk_size
optional
1000Hierarchical options
semantic_threshold
optional
0.5Semantic options
created_at
optional
2023-01-01T00:00:00ZCreation date / time
dropbox_data_source
optional
Dropbox Data Source for Display
Show child properties
folder
optional
example stringfile_upload_data_source
optional
File to upload as data source for knowledge base.
Show child properties
original_file_name
optional
example nameThe original file name
size_in_bytes
optional
12345The size of the file in bytes
stored_object_key
optional
example stringThe object key the file was stored as
google_drive_data_source
optional
Google Drive Data Source for Display
Show child properties
folder_id
optional
123e4567-e89b-12d3-a456-426614174000folder_name
optional
example nameName of the selected folder if available
item_path
optional
example stringPath of folder or object in bucket - Deprecated, moved to data_source_details
last_datasource_indexing_job
optional
Show child properties
completed_at
optional
2023-01-01T00:00:00ZTimestamp when data source completed indexing
data_source_uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the indexed data source
error_details
optional
example stringA detailed error description
error_msg
optional
example stringA string code provinding a hint which part of the system experienced an error
failed_item_count
optional
12345Total count of files that have failed
indexed_file_count
optional
12345Total count of files that have been indexed
indexed_item_count
optional
12345Total count of files that have been indexed
removed_item_count
optional
12345Total count of files that have been removed
skipped_item_count
optional
12345Total count of files that have been skipped
started_at
optional
2023-01-01T00:00:00ZTimestamp when data source started indexing
status
optional
DATA_SOURCE_STATUS_UNKNOWNtotal_bytes
optional
12345Total size of files in data source in bytes
total_bytes_indexed
optional
12345Total size of files in data source in bytes that have been indexed
total_file_count
optional
12345Total file count in the data source
region
optional
example stringRegion code - Deprecated, moved to data_source_details
spaces_data_source
optional
Spaces Bucket Data Source
Show child properties
bucket_name
optional
example nameSpaces bucket name
item_path
optional
example stringregion
optional
example stringRegion of bucket
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of knowledge base
web_crawler_data_source
optional
WebCrawlerDataSource
Show child properties
base_url
optional
example stringThe base url to crawl.
crawling_option
optional
UNKNOWNOptions for specifying how URLs found on pages should be handled.
- UNKNOWN: Default unknown value
- SCOPED: Only include the base URL.
- PATH: Crawl the base URL and linked pages within the URL path.
- DOMAIN: Crawl the base URL and linked pages within the same domain.
- SUBDOMAINS: Crawl the base URL and linked pages for any subdomain.
- SITEMAP: Crawl URLs discovered in the sitemap.
embed_media
optional
trueWhether to ingest and index media (images, etc.) on web pages.
exclude_tags
optional
["example string"]Declaring which tags to exclude in web pages while webcrawling
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"knowledge_base_data_source": {
"aws_data_source": {
"bucket_name": "example name",
"item_path": "example string",
"region": "example string"
},
"bucket_name": "example name",
"chunking_algorithm": "CHUNKING_ALGORITHM_UNKNOWN",
"chunking_options": {
"child_chunk_size": 350,
"max_chunk_size": 750,
"parent_chunk_size": 1000,
"semantic_threshold": 0.5
},
"created_at": "2023-01-01T00:00:00Z",
"dropbox_data_source": {
"folder": "example string"
},
"file_upload_data_source": {
"original_file_name": "example name",
"size_in_bytes": "12345",
"stored_object_key": "example string"
},
"google_drive_data_source": {
"folder_id": "123e4567-e89b-12d3-a456-426614174000",
"folder_name": "example name"
},
"item_path": "example string",
"last_datasource_indexing_job": {
"completed_at": "2023-01-01T00:00:00Z",
"data_source_uuid": "123e4567-e89b-12d3-a456-426614174000",
"error_details": "example string",
"error_msg": "example string",
"failed_item_count": "12345",
"indexed_file_count": "12345",
"indexed_item_count": "12345",
"removed_item_count": "12345",
"skipped_item_count": "12345",
"started_at": "2023-01-01T00:00:00Z",
"status": "DATA_SOURCE_STATUS_UNKNOWN",
"total_bytes": "12345",
"total_bytes_indexed": "12345",
"total_file_count": "12345"
},
"region": "example string",
"spaces_data_source": {
"bucket_name": "example name",
"item_path": "example string",
"region": "example string"
},
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"web_crawler_data_source": {
"base_url": "example string",
"crawling_option": "UNKNOWN",
"embed_media": true,
"exclude_tags": [
"example string"
]
}
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}PUT Update Data Source options
/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources/{data_source_uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To update a data source (e.g. chunking options), send a PUT request to /v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources/{data_source_uuid}.
Path Parameters
knowledge_base_uuid
required
123e4567-e89b-12d3-a456-426614174000Knowledge Base ID (Path Parameter)
data_source_uuid
required
123e4567-e89b-12d3-a456-426614174000Data Source ID (Path Parameter)
Request Body: application/json
chunking_algorithm
optional
CHUNKING_ALGORITHM_UNKNOWNchunking_options
optional
Show child properties
child_chunk_size
optional
350max_chunk_size
optional
750Common options
parent_chunk_size
optional
1000Hierarchical options
semantic_threshold
optional
0.5Semantic options
data_source_uuid
optional
"98765432-1234-1234-1234-123456789012"Data Source ID (Path Parameter)
knowledge_base_uuid
optional
"12345678-1234-1234-1234-123456789012"Knowledge Base ID (Path Parameter)
Request: /v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources/{data_source_uuid}
{
"chunking_algorithm": "CHUNKING_ALGORITHM_UNKNOWN",
"chunking_options": {
"child_chunk_size": 350,
"max_chunk_size": 750,
"parent_chunk_size": 1000,
"semantic_threshold": 0.5
},
"data_source_uuid": "\"98765432-1234-1234-1234-123456789012\"",
"knowledge_base_uuid": "\"12345678-1234-1234-1234-123456789012\""
}curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/knowledge_bases/12345678-1234-1234-1234-123456789012/data_sources/98765432-1234-1234-1234-123456789012" \
-d '{
"chunking_algorithm": "CHUNKING_ALGORITHM_SECTION_BASED",
"chunking_options": {
"max_chunk_size": 500
}
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
knowledge_base_data_source
optional
Data Source configuration for Knowledge Bases
Show child properties
aws_data_source
optional
AWS S3 Data Source for Display
Show child properties
bucket_name
optional
example nameSpaces bucket name
item_path
optional
example stringregion
optional
example stringRegion of bucket
bucket_name
optional
example nameName of storage bucket - Deprecated, moved to data_source_details
chunking_algorithm
optional
CHUNKING_ALGORITHM_UNKNOWNchunking_options
optional
Show child properties
child_chunk_size
optional
350max_chunk_size
optional
750Common options
parent_chunk_size
optional
1000Hierarchical options
semantic_threshold
optional
0.5Semantic options
created_at
optional
2023-01-01T00:00:00ZCreation date / time
dropbox_data_source
optional
Dropbox Data Source for Display
Show child properties
folder
optional
example stringfile_upload_data_source
optional
File to upload as data source for knowledge base.
Show child properties
original_file_name
optional
example nameThe original file name
size_in_bytes
optional
12345The size of the file in bytes
stored_object_key
optional
example stringThe object key the file was stored as
google_drive_data_source
optional
Google Drive Data Source for Display
Show child properties
folder_id
optional
123e4567-e89b-12d3-a456-426614174000folder_name
optional
example nameName of the selected folder if available
item_path
optional
example stringPath of folder or object in bucket - Deprecated, moved to data_source_details
last_datasource_indexing_job
optional
Show child properties
completed_at
optional
2023-01-01T00:00:00ZTimestamp when data source completed indexing
data_source_uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the indexed data source
error_details
optional
example stringA detailed error description
error_msg
optional
example stringA string code provinding a hint which part of the system experienced an error
failed_item_count
optional
12345Total count of files that have failed
indexed_file_count
optional
12345Total count of files that have been indexed
indexed_item_count
optional
12345Total count of files that have been indexed
removed_item_count
optional
12345Total count of files that have been removed
skipped_item_count
optional
12345Total count of files that have been skipped
started_at
optional
2023-01-01T00:00:00ZTimestamp when data source started indexing
status
optional
DATA_SOURCE_STATUS_UNKNOWNtotal_bytes
optional
12345Total size of files in data source in bytes
total_bytes_indexed
optional
12345Total size of files in data source in bytes that have been indexed
total_file_count
optional
12345Total file count in the data source
region
optional
example stringRegion code - Deprecated, moved to data_source_details
spaces_data_source
optional
Spaces Bucket Data Source
Show child properties
bucket_name
optional
example nameSpaces bucket name
item_path
optional
example stringregion
optional
example stringRegion of bucket
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of knowledge base
web_crawler_data_source
optional
WebCrawlerDataSource
Show child properties
base_url
optional
example stringThe base url to crawl.
crawling_option
optional
UNKNOWNOptions for specifying how URLs found on pages should be handled.
- UNKNOWN: Default unknown value
- SCOPED: Only include the base URL.
- PATH: Crawl the base URL and linked pages within the URL path.
- DOMAIN: Crawl the base URL and linked pages within the same domain.
- SUBDOMAINS: Crawl the base URL and linked pages for any subdomain.
- SITEMAP: Crawl URLs discovered in the sitemap.
embed_media
optional
trueWhether to ingest and index media (images, etc.) on web pages.
exclude_tags
optional
["example string"]Declaring which tags to exclude in web pages while webcrawling
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"knowledge_base_data_source": {
"aws_data_source": {
"bucket_name": "example name",
"item_path": "example string",
"region": "example string"
},
"bucket_name": "example name",
"chunking_algorithm": "CHUNKING_ALGORITHM_UNKNOWN",
"chunking_options": {
"child_chunk_size": 350,
"max_chunk_size": 750,
"parent_chunk_size": 1000,
"semantic_threshold": 0.5
},
"created_at": "2023-01-01T00:00:00Z",
"dropbox_data_source": {
"folder": "example string"
},
"file_upload_data_source": {
"original_file_name": "example name",
"size_in_bytes": "12345",
"stored_object_key": "example string"
},
"google_drive_data_source": {
"folder_id": "123e4567-e89b-12d3-a456-426614174000",
"folder_name": "example name"
},
"item_path": "example string",
"last_datasource_indexing_job": {
"completed_at": "2023-01-01T00:00:00Z",
"data_source_uuid": "123e4567-e89b-12d3-a456-426614174000",
"error_details": "example string",
"error_msg": "example string",
"failed_item_count": "12345",
"indexed_file_count": "12345",
"indexed_item_count": "12345",
"removed_item_count": "12345",
"skipped_item_count": "12345",
"started_at": "2023-01-01T00:00:00Z",
"status": "DATA_SOURCE_STATUS_UNKNOWN",
"total_bytes": "12345",
"total_bytes_indexed": "12345",
"total_file_count": "12345"
},
"region": "example string",
"spaces_data_source": {
"bucket_name": "example name",
"item_path": "example string",
"region": "example string"
},
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"web_crawler_data_source": {
"base_url": "example string",
"crawling_option": "UNKNOWN",
"embed_media": true,
"exclude_tags": [
"example string"
]
}
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}DELETE Delete a Data Source from a Knowledge Base
/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources/{data_source_uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To delete a data source from a knowledge base, send a DELETE request to /v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources/{data_source_uuid}.
Path Parameters
knowledge_base_uuid
required
"123e4567-e89b-12d3-a456-426614174000"Knowledge base id
data_source_uuid
required
"123e4567-e89b-12d3-a456-426614174000"Data source id
Request: /v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources/{data_source_uuid}
curl -X DELETE \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/knowledge_bases/9a6e3975-b0c6-11ef-bf8f-4e013e2ddde4/data_sources/bd2a2db5-b8b0-11ef-bf8f-4e013e2ddde4"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
data_source_uuid
optional
123e4567-e89b-12d3-a456-426614174000Data source id
knowledge_base_uuid
optional
123e4567-e89b-12d3-a456-426614174000Knowledge base id
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"data_source_uuid": "123e4567-e89b-12d3-a456-426614174000",
"knowledge_base_uuid": "123e4567-e89b-12d3-a456-426614174000"
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET List Indexing Jobs for a Knowledge Base
/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/indexing_jobs
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To list latest 15 indexing jobs for a knowledge base, send a GET request to /v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/indexing_jobs.
Path Parameters
knowledge_base_uuid
required
"123e4567-e89b-12d3-a456-426614174000"Knowledge base uuid in string
Request: /v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/indexing_jobs
curl --location --request GET 'https://api.digitalocean.com/v2/gen-ai/knowledge_bases/1139121f-a860-11f0-b542-ca68c578b04b/indexing_jobs' \
--header 'Authorization: Bearer $DIGITALOCEAN_TOKEN' \
--header 'Content-Type: application/json' Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
jobs
optional
The indexing jobs
Show child properties
completed_datasources
optional
123Number of datasources indexed completed
created_at
optional
2023-01-01T00:00:00ZCreation date / time
data_source_jobs
optional
Details on Data Sources included in the Indexing Job
Show child properties
completed_at
optional
2023-01-01T00:00:00ZTimestamp when data source completed indexing
data_source_uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the indexed data source
error_details
optional
example stringA detailed error description
error_msg
optional
example stringA string code provinding a hint which part of the system experienced an error
failed_item_count
optional
12345Total count of files that have failed
indexed_file_count
optional
12345Total count of files that have been indexed
indexed_item_count
optional
12345Total count of files that have been indexed
removed_item_count
optional
12345Total count of files that have been removed
skipped_item_count
optional
12345Total count of files that have been skipped
started_at
optional
2023-01-01T00:00:00ZTimestamp when data source started indexing
status
optional
DATA_SOURCE_STATUS_UNKNOWNtotal_bytes
optional
12345Total size of files in data source in bytes
total_bytes_indexed
optional
12345Total size of files in data source in bytes that have been indexed
total_file_count
optional
12345Total file count in the data source
data_source_uuids
optional
["example string"]finished_at
optional
2023-01-01T00:00:00Zis_report_available
optional
trueBoolean value to determine if the indexing job details are available
knowledge_base_uuid
optional
123e4567-e89b-12d3-a456-426614174000Knowledge base id
phase
optional
BATCH_JOB_PHASE_UNKNOWNstarted_at
optional
2023-01-01T00:00:00Zstatus
optional
INDEX_JOB_STATUS_UNKNOWNtokens
optional
123Number of tokens [This field is deprecated]
total_datasources
optional
123Number of datasources being indexed
total_tokens
optional
12345Total Tokens Consumed By the Indexing Job
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
links
optional
Links to other pages
Show child properties
pages
optional
Information about how to reach other pages
Show child properties
first
optional
example stringFirst page
last
optional
example stringLast page
next
optional
example stringNext page
previous
optional
example stringPrevious page
meta
optional
Meta information about the data set
Show child properties
page
optional
123The current page
pages
optional
123Total number of pages
total
optional
123Total amount of items over all pages
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"jobs": [
{
"completed_datasources": 123,
"created_at": "2023-01-01T00:00:00Z",
"data_source_jobs": [],
"data_source_uuids": [
"example string"
],
"finished_at": "2023-01-01T00:00:00Z",
"is_report_available": true,
"knowledge_base_uuid": "123e4567-e89b-12d3-a456-426614174000",
"phase": "BATCH_JOB_PHASE_UNKNOWN",
"started_at": "2023-01-01T00:00:00Z",
"status": "INDEX_JOB_STATUS_UNKNOWN",
"tokens": 123,
"total_datasources": 123,
"total_tokens": "12345",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
],
"links": {
"pages": {
"first": "example string",
"last": "example string",
"next": "example string",
"previous": "example string"
}
},
"meta": {
"page": 123,
"pages": 123,
"total": 123
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET Retrieve Information About an Existing Knowledge Base
/v2/gen-ai/knowledge_bases/{uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To retrive information about an existing knowledge base, send a GET request to /v2/gen-ai/knowledge_bases/{uuid}.
Path Parameters
uuid
required
"123e4567-e89b-12d3-a456-426614174000"Knowledge base id
Request: /v2/gen-ai/knowledge_bases/{uuid}
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/knowledge_bases/9758a232-b351-11ef-bf8f-4e013e2ddde4"
Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
database_status
optional
CREATINGknowledge_base
optional
Knowledgebase Description
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
Show child properties
completed_datasources
optional
123Number of datasources indexed completed
created_at
optional
2023-01-01T00:00:00ZCreation date / time
data_source_jobs
optional
Details on Data Sources included in the Indexing Job
Show child properties
completed_at
optional
2023-01-01T00:00:00ZTimestamp when data source completed indexing
data_source_uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the indexed data source
error_details
optional
example stringA detailed error description
error_msg
optional
example stringA string code provinding a hint which part of the system experienced an error
failed_item_count
optional
12345Total count of files that have failed
indexed_file_count
optional
12345Total count of files that have been indexed
indexed_item_count
optional
12345Total count of files that have been indexed
removed_item_count
optional
12345Total count of files that have been removed
skipped_item_count
optional
12345Total count of files that have been skipped
started_at
optional
2023-01-01T00:00:00ZTimestamp when data source started indexing
status
optional
DATA_SOURCE_STATUS_UNKNOWNtotal_bytes
optional
12345Total size of files in data source in bytes
total_bytes_indexed
optional
12345Total size of files in data source in bytes that have been indexed
total_file_count
optional
12345Total file count in the data source
data_source_uuids
optional
["example string"]finished_at
optional
2023-01-01T00:00:00Zis_report_available
optional
trueBoolean value to determine if the indexing job details are available
knowledge_base_uuid
optional
123e4567-e89b-12d3-a456-426614174000Knowledge base id
phase
optional
BATCH_JOB_PHASE_UNKNOWNstarted_at
optional
2023-01-01T00:00:00Zstatus
optional
INDEX_JOB_STATUS_UNKNOWNtokens
optional
123Number of tokens [This field is deprecated]
total_datasources
optional
123Number of datasources being indexed
total_tokens
optional
12345Total Tokens Consumed By the Indexing Job
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
Show child properties
enabled
optional
trueWhether reranking is enabled for retrieval
model
optional
"bge-reranker-v2-m3"Reranker model internal name
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"database_status": "CREATING",
"knowledge_base": {
"added_to_agent_at": "2023-01-01T00:00:00Z",
"created_at": "2023-01-01T00:00:00Z",
"database_id": "123e4567-e89b-12d3-a456-426614174000",
"embedding_model_uuid": "123e4567-e89b-12d3-a456-426614174000",
"is_public": true,
"last_indexing_job": {
"completed_datasources": 123,
"created_at": "2023-01-01T00:00:00Z",
"data_source_jobs": [],
"data_source_uuids": [
"example string"
],
"finished_at": "2023-01-01T00:00:00Z",
"is_report_available": true,
"knowledge_base_uuid": "123e4567-e89b-12d3-a456-426614174000",
"phase": "BATCH_JOB_PHASE_UNKNOWN",
"started_at": "2023-01-01T00:00:00Z",
"status": "INDEX_JOB_STATUS_UNKNOWN",
"tokens": 123,
"total_datasources": 123,
"total_tokens": "12345",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"name": "example name",
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"region": "example string",
"reranking_config": {
"enabled": true,
"model": "\"bge-reranker-v2-m3\""
},
"tags": [
"example string"
],
"updated_at": "2023-01-01T00:00:00Z",
"user_id": "12345",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}PUT Update a Knowledge Base
/v2/gen-ai/knowledge_bases/{uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To update a knowledge base, send a PUT request to /v2/gen-ai/knowledge_bases/{uuid}.
Path Parameters
uuid
required
"123e4567-e89b-12d3-a456-426614174000"Knowledge base id
Request Body: application/json
database_id
optional
"12345678-1234-1234-1234-123456789012"The id of the DigitalOcean database this knowledge base will use, optional.
name
optional
"My Knowledge Base"Knowledge base name
project_id
optional
"12345678-1234-1234-1234-123456789012"The id of the DigitalOcean project this knowledge base will belong to
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
Show child properties
enabled
optional
trueWhether reranking is enabled for retrieval
model
optional
"bge-reranker-v2-m3"Reranker model internal name
tags
optional
["example string"]Tags to organize your knowledge base.
uuid
optional
"12345678-1234-1234-1234-123456789012"Knowledge base id
Request: /v2/gen-ai/knowledge_bases/{uuid}
{
"database_id": "\"12345678-1234-1234-1234-123456789012\"",
"name": "\"My Knowledge Base\"",
"project_id": "\"12345678-1234-1234-1234-123456789012\"",
"reranking_config": {
"enabled": true,
"model": "\"bge-reranker-v2-m3\""
},
"tags": [
"example string"
],
"uuid": "\"12345678-1234-1234-1234-123456789012\""
}curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/knowledge_bases/e51dba65-cf7a-11ef-bf8f-4e013e2ddde4" \
-d '{
"uuid": "e51dba65-cf7a-11ef-bf8f-4e013e2ddde4",
"name": "kb-api-rename",
"reranking_config": {
"enabled": true,
"model": "bge-reranker-v2-m3"
}
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
knowledge_base
optional
Knowledgebase Description
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
Show child properties
completed_datasources
optional
123Number of datasources indexed completed
created_at
optional
2023-01-01T00:00:00ZCreation date / time
data_source_jobs
optional
Details on Data Sources included in the Indexing Job
Show child properties
completed_at
optional
2023-01-01T00:00:00ZTimestamp when data source completed indexing
data_source_uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the indexed data source
error_details
optional
example stringA detailed error description
error_msg
optional
example stringA string code provinding a hint which part of the system experienced an error
failed_item_count
optional
12345Total count of files that have failed
indexed_file_count
optional
12345Total count of files that have been indexed
indexed_item_count
optional
12345Total count of files that have been indexed
removed_item_count
optional
12345Total count of files that have been removed
skipped_item_count
optional
12345Total count of files that have been skipped
started_at
optional
2023-01-01T00:00:00ZTimestamp when data source started indexing
status
optional
DATA_SOURCE_STATUS_UNKNOWNtotal_bytes
optional
12345Total size of files in data source in bytes
total_bytes_indexed
optional
12345Total size of files in data source in bytes that have been indexed
total_file_count
optional
12345Total file count in the data source
data_source_uuids
optional
["example string"]finished_at
optional
2023-01-01T00:00:00Zis_report_available
optional
trueBoolean value to determine if the indexing job details are available
knowledge_base_uuid
optional
123e4567-e89b-12d3-a456-426614174000Knowledge base id
phase
optional
BATCH_JOB_PHASE_UNKNOWNstarted_at
optional
2023-01-01T00:00:00Zstatus
optional
INDEX_JOB_STATUS_UNKNOWNtokens
optional
123Number of tokens [This field is deprecated]
total_datasources
optional
123Number of datasources being indexed
total_tokens
optional
12345Total Tokens Consumed By the Indexing Job
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
Show child properties
enabled
optional
trueWhether reranking is enabled for retrieval
model
optional
"bge-reranker-v2-m3"Reranker model internal name
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"knowledge_base": {
"added_to_agent_at": "2023-01-01T00:00:00Z",
"created_at": "2023-01-01T00:00:00Z",
"database_id": "123e4567-e89b-12d3-a456-426614174000",
"embedding_model_uuid": "123e4567-e89b-12d3-a456-426614174000",
"is_public": true,
"last_indexing_job": {
"completed_datasources": 123,
"created_at": "2023-01-01T00:00:00Z",
"data_source_jobs": [],
"data_source_uuids": [
"example string"
],
"finished_at": "2023-01-01T00:00:00Z",
"is_report_available": true,
"knowledge_base_uuid": "123e4567-e89b-12d3-a456-426614174000",
"phase": "BATCH_JOB_PHASE_UNKNOWN",
"started_at": "2023-01-01T00:00:00Z",
"status": "INDEX_JOB_STATUS_UNKNOWN",
"tokens": 123,
"total_datasources": 123,
"total_tokens": "12345",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
},
"name": "example name",
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"region": "example string",
"reranking_config": {
"enabled": true,
"model": "\"bge-reranker-v2-m3\""
},
"tags": [
"example string"
],
"updated_at": "2023-01-01T00:00:00Z",
"user_id": "12345",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}DELETE Delete a Knowledge Base
/v2/gen-ai/knowledge_bases/{uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To delete a knowledge base, send a DELETE request to /v2/gen-ai/knowledge_bases/{uuid}.
Path Parameters
uuid
required
"123e4567-e89b-12d3-a456-426614174000"Knowledge base id
Request: /v2/gen-ai/knowledge_bases/{uuid}
curl -X DELETE \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/knowledge_bases/8241f44e-b0da-11ef-bf8f-4e013e2ddde4"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
uuid
optional
123e4567-e89b-12d3-a456-426614174000The id of the deleted knowledge base
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}POST Create Presigned URLs for Model Evaluation Dataset File Upload
/v2/gen-ai/model_evaluation/datasets/file_upload_presigned_urls
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To create presigned URLs for model evaluation dataset file upload, send a POST request to /v2/genai/model_evaluation/datasets/file_upload_presigned_urls.
Request Body: application/json
files
optional
A list of files to generate presigned URLs for.
Show child properties
file_name
optional
example nameLocal filename
file_size
optional
12345The size of the file in bytes.
Request: /v2/gen-ai/model_evaluation/datasets/file_upload_presigned_urls
{
"files": [
{
"file_name": "example name",
"file_size": "12345"
}
]
}curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/model_evaluation/datasets/file_upload_presigned_urls" \
-d '{
"files": [{
"file_name": "dataset.jsonl",
"file_size": 2048
}]
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
request_id
optional
123e4567-e89b-12d3-a456-426614174000The ID generated for the request for Presigned URLs.
uploads
optional
A list of generated presigned URLs and object keys, one per file.
Show child properties
expires_at
optional
2023-01-01T00:00:00ZThe time the url expires at.
object_key
optional
example stringThe unique object key to store the file as.
original_file_name
optional
example nameThe original file name.
presigned_url
optional
example stringThe actual presigned URL the client can use to upload the file directly.
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"request_id": "123e4567-e89b-12d3-a456-426614174000",
"uploads": [
{
"expires_at": "2023-01-01T00:00:00Z",
"object_key": "example string",
"original_file_name": "example name",
"presigned_url": "example string"
}
]
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET List Model Evaluation Metrics
/v2/gen-ai/model_evaluation_metrics
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To list all available metrics for model evaluation, send a GET request to /v2/genai/model_evaluation_metrics.
Request: /v2/gen-ai/model_evaluation_metrics
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/model_evaluation_metrics"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
metrics
optional
List of model evaluation metrics
Show child properties
category
optional
METRIC_CATEGORY_UNSPECIFIEDdescription
optional
example stringevaluation_scope
optional
EVALUATION_SCOPE_UNSPECIFIEDScope that determines whether a metric belongs to agent evaluation or model evaluation. For backwards compatibility, UNSPECIFIED defaults to agent metrics only in list operations.
inverted
optional
trueIf true, the metric is inverted, meaning that a lower value is better.
is_metric_goal
optional
truemetric_name
optional
example namemetric_rank
optional
123metric_type
optional
METRIC_TYPE_UNSPECIFIEDmetric_uuid
optional
123e4567-e89b-12d3-a456-426614174000metric_value_type
optional
METRIC_VALUE_TYPE_UNSPECIFIEDrange_max
optional
123The maximum value for the metric.
range_min
optional
123The minimum value for the metric.
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"metrics": [
{
"category": "METRIC_CATEGORY_UNSPECIFIED",
"description": "example string",
"evaluation_scope": "EVALUATION_SCOPE_UNSPECIFIED",
"inverted": true,
"is_metric_goal": true,
"metric_name": "example name",
"metric_rank": 123,
"metric_type": "METRIC_TYPE_UNSPECIFIED",
"metric_uuid": "123e4567-e89b-12d3-a456-426614174000",
"metric_value_type": "METRIC_VALUE_TYPE_UNSPECIFIED",
"range_max": 123,
"range_min": 123
}
]
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET List Model Evaluation Presets
/v2/gen-ai/model_evaluation_presets
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To list all saved model evaluation presets, send a GET request to /v2/genai/model_evaluation_presets.
Request: /v2/gen-ai/model_evaluation_presets
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/model_evaluation_presets"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
presets
optional
List of explicitly saved evaluation presets (reusable configs).
Show child properties
created_at
optional
2023-01-01T00:00:00ZTimestamp when the preset was created.
dataset_name
optional
example namedataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000Dataset used for evaluation.
eval_preset_uuid
optional
123e4567-e89b-12d3-a456-426614174000UUID of the evaluation preset.
judge_model_name
optional
example namejudge_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000Judge model used to score responses.
metrics
optional
Metrics selected for this preset.
Show child properties
category
optional
METRIC_CATEGORY_UNSPECIFIEDdescription
optional
example stringevaluation_scope
optional
EVALUATION_SCOPE_UNSPECIFIEDScope that determines whether a metric belongs to agent evaluation or model evaluation. For backwards compatibility, UNSPECIFIED defaults to agent metrics only in list operations.
inverted
optional
trueIf true, the metric is inverted, meaning that a lower value is better.
is_metric_goal
optional
truemetric_name
optional
example namemetric_rank
optional
123metric_type
optional
METRIC_TYPE_UNSPECIFIEDmetric_uuid
optional
123e4567-e89b-12d3-a456-426614174000metric_value_type
optional
METRIC_VALUE_TYPE_UNSPECIFIEDrange_max
optional
123The maximum value for the metric.
range_min
optional
123The minimum value for the metric.
name
optional
example nameName of the evaluation preset.
star_metric
optional
Show child properties
metric_uuid
optional
123e4567-e89b-12d3-a456-426614174000name
optional
example namesuccess_threshold
optional
123The success threshold for the star metric. This is a value that the metric must reach to be considered successful.
success_threshold_pct
optional
123The success threshold for the star metric. This is a percentage value between 0 and 100.
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"presets": [
{
"created_at": "2023-01-01T00:00:00Z",
"dataset_name": "example name",
"dataset_uuid": "123e4567-e89b-12d3-a456-426614174000",
"eval_preset_uuid": "123e4567-e89b-12d3-a456-426614174000",
"judge_model_name": "example name",
"judge_model_uuid": "123e4567-e89b-12d3-a456-426614174000",
"metrics": [],
"name": "example name"
}
]
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET Retrieve Model Evaluation Preset
/v2/gen-ai/model_evaluation_presets/{eval_preset_uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To retrieve a saved model evaluation preset, send a GET request to /v2/genai/model_evaluation_presets/{eval_preset_uuid}.
Path Parameters
eval_preset_uuid
required
"123e4567-e89b-12d3-a456-426614174000"UUID of the evaluation preset.
Request: /v2/gen-ai/model_evaluation_presets/{eval_preset_uuid}
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/model_evaluation_presets/123e4567-e89b-12d3-a456-426614174000"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
preset
optional
Model Evaluation Preset - a saved, reusable configuration for model evaluation runs.
Show child properties
created_at
optional
2023-01-01T00:00:00ZTimestamp when the preset was created.
dataset_name
optional
example namedataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000Dataset used for evaluation.
eval_preset_uuid
optional
123e4567-e89b-12d3-a456-426614174000UUID of the evaluation preset.
judge_model_name
optional
example namejudge_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000Judge model used to score responses.
metrics
optional
Metrics selected for this preset.
Show child properties
category
optional
METRIC_CATEGORY_UNSPECIFIEDdescription
optional
example stringevaluation_scope
optional
EVALUATION_SCOPE_UNSPECIFIEDScope that determines whether a metric belongs to agent evaluation or model evaluation. For backwards compatibility, UNSPECIFIED defaults to agent metrics only in list operations.
inverted
optional
trueIf true, the metric is inverted, meaning that a lower value is better.
is_metric_goal
optional
truemetric_name
optional
example namemetric_rank
optional
123metric_type
optional
METRIC_TYPE_UNSPECIFIEDmetric_uuid
optional
123e4567-e89b-12d3-a456-426614174000metric_value_type
optional
METRIC_VALUE_TYPE_UNSPECIFIEDrange_max
optional
123The maximum value for the metric.
range_min
optional
123The minimum value for the metric.
name
optional
example nameName of the evaluation preset.
star_metric
optional
Show child properties
metric_uuid
optional
123e4567-e89b-12d3-a456-426614174000name
optional
example namesuccess_threshold
optional
123The success threshold for the star metric. This is a value that the metric must reach to be considered successful.
success_threshold_pct
optional
123The success threshold for the star metric. This is a percentage value between 0 and 100.
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"preset": {
"created_at": "2023-01-01T00:00:00Z",
"dataset_name": "example name",
"dataset_uuid": "123e4567-e89b-12d3-a456-426614174000",
"eval_preset_uuid": "123e4567-e89b-12d3-a456-426614174000",
"judge_model_name": "example name",
"judge_model_uuid": "123e4567-e89b-12d3-a456-426614174000",
"metrics": [],
"name": "example name",
"star_metric": {
"metric_uuid": "123e4567-e89b-12d3-a456-426614174000",
"name": "example name",
"success_threshold": 123,
"success_threshold_pct": 123
}
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET List Model Evaluation Runs
/v2/gen-ai/model_evaluation_runs
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To list model evaluation runs, send a GET request to /v2/genai/model_evaluation_runs.
Query Parameters
eval_preset_uuid
optional
123e4567-e89b-12d3-a456-426614174000UUID of the evaluation preset to filter by.
status
optional
MODEL_EVALUATION_RUN_STATUS_UNSPECIFIEDFilter by evaluation run status.
Default:MODEL_EVALUATION_RUN_STATUS_UNSPECIFIEDpage
optional
1Page number.
per_page
optional
1Items per page.
Request: /v2/gen-ai/model_evaluation_runs
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/model_evaluation_runs"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
links
optional
Links to other pages
Show child properties
pages
optional
Information about how to reach other pages
Show child properties
first
optional
example stringFirst page
last
optional
example stringLast page
next
optional
example stringNext page
previous
optional
example stringPrevious page
meta
optional
Meta information about the data set
Show child properties
page
optional
123The current page
pages
optional
123Total number of pages
total
optional
123Total amount of items over all pages
runs
optional
Summary view of evaluation runs for the run history list.
Show child properties
candidate_model_name
optional
example nameName of the candidate model being evaluated.
candidate_model_source
optional
CANDIDATE_MODEL_SOURCE_SERVERLESSWhether inference runs against the serverless platform, a dedicated deployment, or a model router.
candidate_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000UUID of the candidate model being evaluated.
created_at
optional
2023-01-01T00:00:00ZTimestamp when the run was created.
dataset_name
optional
example nameName of the dataset used for evaluation.
dataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000UUID of the dataset used for evaluation.
eval_run_uuid
optional
123e4567-e89b-12d3-a456-426614174000UUID of the evaluation run.
judge_model_name
optional
example namejudge_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000Judge model used to score responses.
name
optional
example nameName of the evaluation run.
status
optional
MODEL_EVALUATION_RUN_STATUS_UNSPECIFIEDModel Evaluation Run Statuses
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"links": {
"pages": {
"first": "example string",
"last": "example string",
"next": "example string",
"previous": "example string"
}
},
"meta": {
"page": 123,
"pages": 123,
"total": 123
},
"runs": [
{
"candidate_model_name": "example name",
"candidate_model_source": "CANDIDATE_MODEL_SOURCE_SERVERLESS",
"candidate_model_uuid": "123e4567-e89b-12d3-a456-426614174000",
"created_at": "2023-01-01T00:00:00Z",
"dataset_name": "example name",
"dataset_uuid": "123e4567-e89b-12d3-a456-426614174000",
"eval_run_uuid": "123e4567-e89b-12d3-a456-426614174000",
"judge_model_name": "example name",
"judge_model_uuid": "123e4567-e89b-12d3-a456-426614174000",
"name": "example name",
"status": "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED"
}
]
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}POST Create Model Evaluation Run
/v2/gen-ai/model_evaluation_runs
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To create a model evaluation run, send a POST request to /v2/genai/model_evaluation_runs.
Request Body: application/json
candidate_inference_config
optional
Inference configuration for the candidate model during evaluation.
Show child properties
max_tokens
optional
123stop_token
optional
example stringsystem_prompt
optional
example stringtemperature
optional
123candidate_model_name
optional
example nameModel slug used to call the candidate model API. For dedicated inference, this is the model slug from the deployment. For serverless, this should match the model's internal name.
candidate_model_source
optional
CANDIDATE_MODEL_SOURCE_SERVERLESSWhether inference runs against the serverless platform, a dedicated deployment, or a model router.
candidate_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000UUID of the candidate model to evaluate.
dataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000UUID of the dataset to use for evaluation.
eval_preset_uuid
optional
123e4567-e89b-12d3-a456-426614174000judge_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000UUID of the judge model used to score responses.
metric_uuids
optional
["example string"]UUIDs of metrics to evaluate (selected from ListModelEvaluationMetrics).
name
optional
example namepreset_name
optional
example namesave_as_preset
optional
trueIf true, saves the inline config as a reusable preset
Ignored when eval_preset_uuid is provided.
source
optional
example stringSource of the run creation (api, sdk, cli).
star_metric
optional
Show child properties
metric_uuid
optional
123e4567-e89b-12d3-a456-426614174000name
optional
example namesuccess_threshold
optional
123The success threshold for the star metric. This is a value that the metric must reach to be considered successful.
success_threshold_pct
optional
123The success threshold for the star metric. This is a percentage value between 0 and 100.
Request: /v2/gen-ai/model_evaluation_runs
{
"candidate_inference_config": {
"max_tokens": 123,
"stop_token": "example string",
"system_prompt": "example string",
"temperature": 123
},
"candidate_model_name": "example name",
"candidate_model_source": "CANDIDATE_MODEL_SOURCE_SERVERLESS",
"candidate_model_uuid": "123e4567-e89b-12d3-a456-426614174000",
"dataset_uuid": "123e4567-e89b-12d3-a456-426614174000",
"eval_preset_uuid": "123e4567-e89b-12d3-a456-426614174000",
"judge_model_uuid": "123e4567-e89b-12d3-a456-426614174000",
"metric_uuids": [
"example string"
],
"name": "example name",
"preset_name": "example name",
"save_as_preset": true,
"source": "example string",
"star_metric": {
"metric_uuid": "123e4567-e89b-12d3-a456-426614174000",
"name": "example name",
"success_threshold": 123,
"success_threshold_pct": 123
}
}curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/model_evaluation_runs" \
-d '{
"name": "my-evaluation-run",
"candidate_model_uuid": "123e4567-e89b-12d3-a456-426614174000",
"judge_model_uuid": "223e4567-e89b-12d3-a456-426614174001",
"dataset_uuid": "323e4567-e89b-12d3-a456-426614174002",
"metric_uuids": [
"423e4567-e89b-12d3-a456-426614174003"
]
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
eval_run_uuid
optional
123e4567-e89b-12d3-a456-426614174000UUID of the created evaluation run.
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"eval_run_uuid": "123e4567-e89b-12d3-a456-426614174000"
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET Retrieve Model Evaluation Run
/v2/gen-ai/model_evaluation_runs/{eval_run_uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To retrieve a model evaluation run, send a GET request to /v2/genai/model_evaluation_runs/{eval_run_uuid}.
Path Parameters
eval_run_uuid
required
"123e4567-e89b-12d3-a456-426614174000"UUID of the evaluation run.
Query Parameters
page
optional
1Page number for per-prompt results (defaults to 1).
per_page
optional
1Number of per-prompt results per page (defaults to 50).
Request: /v2/gen-ai/model_evaluation_runs/{eval_run_uuid}
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/model_evaluation_runs/123e4567-e89b-12d3-a456-426614174000"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
links
optional
Links to other pages
Show child properties
pages
optional
Information about how to reach other pages
Show child properties
first
optional
example stringFirst page
last
optional
example stringLast page
next
optional
example stringNext page
previous
optional
example stringPrevious page
meta
optional
Meta information about the data set
Show child properties
page
optional
123The current page
pages
optional
123Total number of pages
total
optional
123Total amount of items over all pages
results
optional
Paginated per-prompt evaluation results.
Show child properties
candidate_model_name
optional
example namecandidate_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000ground_truth
optional
example stringinput
optional
example stringThe input query sent to the candidate model.
metric_results
optional
Per-metric scores and judge reasoning for this prompt.
Show child properties
error_description
optional
example stringError description if the metric could not be calculated.
metric_name
optional
example nameMetric name
metric_value_type
optional
METRIC_VALUE_TYPE_UNSPECIFIEDnumber_value
optional
123The value of the metric as a number.
reasoning
optional
example stringReasoning of the metric result.
string_value
optional
example stringThe value of the metric as a string.
output
optional
example stringThe response from the candidate model.
run
optional
Model Evaluation Run Detail - full view returned when fetching a specific run.
Show child properties
candidate_inference_config
optional
Inference configuration for the candidate model during evaluation.
Show child properties
max_tokens
optional
123stop_token
optional
example stringsystem_prompt
optional
example stringtemperature
optional
123candidate_model_name
optional
example namecandidate_model_source
optional
CANDIDATE_MODEL_SOURCE_SERVERLESSWhether inference runs against the serverless platform, a dedicated deployment, or a model router.
candidate_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000Candidate model being evaluated.
completed_at
optional
2023-01-01T00:00:00Zcreated_at
optional
2023-01-01T00:00:00Zdataset_name
optional
example namedataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000Dataset used for the evaluation.
error_description
optional
example stringError description if the run failed or partially succeeded.
eval_preset_name
optional
example nameeval_preset_uuid
optional
123e4567-e89b-12d3-a456-426614174000eval_run_uuid
optional
123e4567-e89b-12d3-a456-426614174000UUID of the evaluation run.
judge_model_name
optional
example namejudge_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000Judge model used to score responses.
metrics
optional
Metrics selected for this evaluation.
Show child properties
category
optional
METRIC_CATEGORY_UNSPECIFIEDdescription
optional
example stringevaluation_scope
optional
EVALUATION_SCOPE_UNSPECIFIEDScope that determines whether a metric belongs to agent evaluation or model evaluation. For backwards compatibility, UNSPECIFIED defaults to agent metrics only in list operations.
inverted
optional
trueIf true, the metric is inverted, meaning that a lower value is better.
is_metric_goal
optional
truemetric_name
optional
example namemetric_rank
optional
123metric_type
optional
METRIC_TYPE_UNSPECIFIEDmetric_uuid
optional
123e4567-e89b-12d3-a456-426614174000metric_value_type
optional
METRIC_VALUE_TYPE_UNSPECIFIEDrange_max
optional
123The maximum value for the metric.
range_min
optional
123The minimum value for the metric.
name
optional
example nameName of the evaluation run.
result_summary
optional
Aggregated result summary for a completed model evaluation run.
Show child properties
end_time
optional
2023-01-01T00:00:00Zmetric_summaries
optional
Per-metric aggregated pass/fail statistics.
Show child properties
description
optional
example stringfail_percent
optional
123metric_name
optional
example namemetric_uuid
optional
123e4567-e89b-12d3-a456-426614174000pass_percent
optional
123overall_score_percent
optional
123per_model_summaries
optional
Wrapper for per-model summaries, used inside a oneof on ModelEvaluationRunResultSummary.
Show child properties
summaries
optional
performance_metrics
optional
All performance metrics are for the candidate model unless noted otherwise.
Show child properties
candidate_latency
optional
Latency metrics for candidate model invocations (in milliseconds).
token_usage
optional
pricing
optional
Pricing breakdown for an evaluation run.
Show child properties
currency
optional
example stringCurrency code (e.g., "USD").
judge_model_pricing
optional
Token pricing breakdown for a single model.
per_candidate_model_pricing
optional
Pricing per candidate model.
total_cost
optional
123Total cost of the evaluation run (all candidates + judge).
star_metric_summary
optional
Star metric summary with identifying details and threshold.
Show child properties
metric_name
optional
example namemetric_uuid
optional
123e4567-e89b-12d3-a456-426614174000threshold
optional
123start_time
optional
2023-01-01T00:00:00ZRun timing.
total_duration_seconds
optional
123Total wall-clock duration in seconds.
star_metric
optional
Show child properties
metric_uuid
optional
123e4567-e89b-12d3-a456-426614174000name
optional
example namesuccess_threshold
optional
123The success threshold for the star metric. This is a value that the metric must reach to be considered successful.
success_threshold_pct
optional
123The success threshold for the star metric. This is a percentage value between 0 and 100.
started_at
optional
2023-01-01T00:00:00Zstatus
optional
MODEL_EVALUATION_RUN_STATUS_UNSPECIFIEDModel Evaluation Run Statuses
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"links": {
"pages": {
"first": "example string",
"last": "example string",
"next": "example string",
"previous": "example string"
}
},
"meta": {
"page": 123,
"pages": 123,
"total": 123
},
"results": [
{
"candidate_model_name": "example name",
"candidate_model_uuid": "123e4567-e89b-12d3-a456-426614174000",
"ground_truth": "example string",
"input": "example string",
"metric_results": [],
"output": "example string"
}
],
"run": {
"candidate_inference_config": {
"max_tokens": 123,
"stop_token": "example string",
"system_prompt": "example string",
"temperature": 123
},
"candidate_model_name": "example name",
"candidate_model_source": "CANDIDATE_MODEL_SOURCE_SERVERLESS",
"candidate_model_uuid": "123e4567-e89b-12d3-a456-426614174000",
"completed_at": "2023-01-01T00:00:00Z",
"created_at": "2023-01-01T00:00:00Z",
"dataset_name": "example name",
"dataset_uuid": "123e4567-e89b-12d3-a456-426614174000",
"error_description": "example string",
"eval_preset_name": "example name",
"eval_preset_uuid": "123e4567-e89b-12d3-a456-426614174000",
"eval_run_uuid": "123e4567-e89b-12d3-a456-426614174000",
"judge_model_name": "example name",
"judge_model_uuid": "123e4567-e89b-12d3-a456-426614174000",
"metrics": [],
"name": "example name",
"result_summary": {
"end_time": "2023-01-01T00:00:00Z",
"metric_summaries": [],
"overall_score_percent": 123,
"start_time": "2023-01-01T00:00:00Z",
"total_duration_seconds": 123
},
"star_metric": {
"metric_uuid": "123e4567-e89b-12d3-a456-426614174000",
"name": "example name",
"success_threshold": 123,
"success_threshold_pct": 123
},
"started_at": "2023-01-01T00:00:00Z",
"status": "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}DELETE Delete Model Evaluation Run
/v2/gen-ai/model_evaluation_runs/{eval_run_uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To delete a model evaluation run, send a DELETE request to /v2/gen-ai/model_evaluation_runs/{eval_run_uuid}. The run must be in a terminal status (successful, partially_successful, failed, or cancelled). For runs still in progress, either wait for the run to finish or cancel it, then retry the delete once the run reaches a terminal status.
Path Parameters
eval_run_uuid
required
"123e4567-e89b-12d3-a456-426614174000"UUID of the model evaluation run to delete. The run must be in a terminal
status (successful, partially_successful, failed, or cancelled).
For runs still in progress, either wait for the run to finish or cancel
it, then retry the delete.
Request: /v2/gen-ai/model_evaluation_runs/{eval_run_uuid}
curl -X DELETE \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/model_evaluation_runs/12345678-1234-1234-1234-123456789012"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
error
optional
example stringError message if deletion failed
status
optional
DELETE_MODEL_EVALUATION_RUN_STATUS_UNSPECIFIEDStatus of delete operation
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"error": "example string",
"status": "DELETE_MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED"
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET Get Download URL for Model Evaluation Run Results
/v2/gen-ai/model_evaluation_runs/{eval_run_uuid}/results/download_url
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To get a presigned download URL for model evaluation run results (gzip-compressed JSON), send a GET request to /v2/genai/model_evaluation_runs/{eval_run_uuid}/results/download_url.
Path Parameters
eval_run_uuid
required
"123e4567-e89b-12d3-a456-426614174000"UUID of the evaluation run.
Request: /v2/gen-ai/model_evaluation_runs/{eval_run_uuid}/results/download_url
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/model_evaluation_runs/123e4567-e89b-12d3-a456-426614174000/results/download_url"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
download_url
optional
example stringThe presigned URL to download the gzip-compressed JSON results file (.json.gz).
expires_at
optional
2023-01-01T00:00:00ZThe time the URL expires at.
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"download_url": "example string",
"expires_at": "2023-01-01T00:00:00Z"
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET List Available Models
/v2/gen-ai/models
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To list all models, send a GET request to /v2/gen-ai/models.
Query Parameters
usecases
optional
["MODEL_USECASE_UNKNOWN"]Include only models defined for the listed usecases.
- MODEL_USECASE_UNKNOWN: The use case of the model is unknown
- MODEL_USECASE_AGENT: The model maybe used in an agent
- MODEL_USECASE_FINETUNED: The model maybe used for fine tuning
- MODEL_USECASE_KNOWLEDGEBASE: The model maybe used for knowledge bases (embedding models)
- MODEL_USECASE_GUARDRAIL: The model maybe used for guardrails
- MODEL_USECASE_REASONING: The model usecase for reasoning
- MODEL_USECASE_SERVERLESS: The model usecase for serverless inference
public_only
optional
trueOnly include models that are publicly available.
page
optional
1Page number.
per_page
optional
1Items per page.
Request: /v2/gen-ai/models
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/models"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
links
optional
Links to other pages
Show child properties
pages
optional
Information about how to reach other pages
Show child properties
first
optional
example stringFirst page
last
optional
example stringLast page
next
optional
example stringNext page
previous
optional
example stringPrevious page
meta
optional
Meta information about the data set
Show child properties
page
optional
123The current page
pages
optional
123Total number of pages
total
optional
123Total amount of items over all pages
models
optional
The models
Show child properties
agreement
optional
Agreement Description
Show child properties
description
optional
example stringname
optional
example nameurl
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]Model capabilities (inference, reasoning, vectorization, etc.)
context_window
optional
12345Context window (maximum tokens)
created_at
optional
2021-01-01T00:00:00ZCreation date / time
description
optional
example stringModel description
endpoints
optional
Available endpoints and their capabilities
Show child properties
capabilities
optional
["example string"]Capabilities supported by this endpoint (e.g. input_text, output_text, input_image)
endpoint
optional
/chat/responsesThe endpoint path (e.g. /chat/responses)
id
optional
llama3.3-70b-instructHuman-readable model identifier
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
activeLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
modalities
optional
Input/output modalities
Show child properties
input
optional
["example string"]output
optional
["example string"]model_availability
optional
example stringModel availability (serverless, dedicated, etc.)
name
optional
Llama 3.3 Instruct (70B)Display name of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
"12345678-1234-1234-1234-123456789012"Unique id of the model, this model is based on
pricing
optional
Pricing per million tokens (aligns with existing ModelPrice pattern)
Show child properties
input_price_per_million
optional
0.6output_price_per_million
optional
0.9price_per_audio
optional
0.002price_per_image
optional
0.003Unit-based pricing for non-token models (e.g., Fal AI image/video/audio generation, speech models). At most one of these is typically populated per model. Token-based models (chat, embeddings) leave all of these at 0 and populate input_price_per_million / output_price_per_million instead.
price_per_megapixel
optional
3e-05price_per_second
optional
0.0001price_per_thousand_characters
optional
0.015price_per_video
optional
0.05provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
Show child properties
default_string
optional
example stringString default value (for type="dropdown", e.g. "medium")
default_value
optional
0.7Numeric default value (for type="number")
max
optional
1Maximum allowed value (for type="number")
min
optional
0Minimum allowed value (for type="number")
name
optional
temperatureSetting key name (e.g. "max_tokens", "temperature", "resolution")
options
optional
["example string"]Allowed values for dropdown selections (for type="dropdown")
step
optional
123Step increment for numeric settings (for type="number")
type
optional
numberSetting value type: "number" or "dropdown"
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2021-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
https://example.com/model.zipDownload url
uuid
optional
"12345678-1234-1234-1234-123456789012"Unique id
version
optional
Version Information about a Model
Show child properties
major
optional
123Major version number
minor
optional
123Minor version number
patch
optional
123Patch version number
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"links": {
"pages": {
"first": "example string",
"last": "example string",
"next": "example string",
"previous": "example string"
}
},
"meta": {
"page": 123,
"pages": 123,
"total": 123
},
"models": [
{
"capabilities": [
"example string"
],
"context_window": "12345",
"created_at": "2021-01-01T00:00:00Z",
"description": "example string",
"endpoints": [],
"id": "llama3.3-70b-instruct",
"is_foundational": true,
"kb_default_chunk_size": 123,
"kb_max_chunk_size": 123,
"kb_min_chunk_size": 123,
"lifecycle_status": "active",
"model_availability": "example string",
"name": "Llama 3.3 Instruct (70B)",
"parameter_count": 123,
"parent_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"reasoning_efforts": [
"example string"
],
"settings": [],
"thinking": true,
"type": "example string",
"updated_at": "2021-01-01T00:00:00Z",
"upload_complete": true,
"url": "https://example.com/model.zip",
"uuid": "\"12345678-1234-1234-1234-123456789012\""
}
]
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET List Model API Keys
/v2/gen-ai/models/api_keys
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To list all model API keys, send a GET request to /v2/gen-ai/models/api_keys.
Query Parameters
page
optional
1Page number.
per_page
optional
1Items per page.
Request: /v2/gen-ai/models/api_keys
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/models/api_keys"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
api_key_infos
optional
Api key infos
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
links
optional
Links to other pages
Show child properties
pages
optional
Information about how to reach other pages
Show child properties
first
optional
example stringFirst page
last
optional
example stringLast page
next
optional
example stringNext page
previous
optional
example stringPrevious page
meta
optional
Meta information about the data set
Show child properties
page
optional
123The current page
pages
optional
123Total number of pages
total
optional
123Total amount of items over all pages
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"api_key_infos": [
{
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"name": "example name",
"secret_key": "example string",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
],
"links": {
"pages": {
"first": "example string",
"last": "example string",
"next": "example string",
"previous": "example string"
}
},
"meta": {
"page": 123,
"pages": 123,
"total": 123
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}POST Create a Model API Key
/v2/gen-ai/models/api_keys
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To create a model API key, send a POST request to /v2/gen-ai/models/api_keys.
Request Body: application/json
name
optional
Production KeyA human friendly name to identify the key
Request: /v2/gen-ai/models/api_keys
{
"name": "Production Key"
}curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/models/api_keys" \
-d '{
"name": "test-key"
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
api_key_info
optional
Model API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"api_key_info": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"name": "example name",
"secret_key": "example string",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}PUT Update API Key for a Model
/v2/gen-ai/models/api_keys/{api_key_uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To update a model API key, send a PUT request to /v2/gen-ai/models/api_keys/{api_key_uuid}.
Path Parameters
api_key_uuid
required
"123e4567-e89b-12d3-a456-426614174000"API key ID
Request Body: application/json
api_key_uuid
optional
"12345678-1234-1234-1234-123456789012"API key ID
name
optional
"Production Key"Name
Request: /v2/gen-ai/models/api_keys/{api_key_uuid}
{
"api_key_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"name": "\"Production Key\""
}curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/models/api_keys/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4" \
-d '{
"api_key_uuid": "11efb7d6-cdb5-6388-bf8f-4e013e2ddde4",
"name": "test-key2"
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
api_key_info
optional
Model API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"api_key_info": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"name": "example name",
"secret_key": "example string",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}DELETE Delete API Key for a Model
/v2/gen-ai/models/api_keys/{api_key_uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To delete an API key for a model, send a DELETE request to /v2/gen-ai/models/api_keys/{api_key_uuid}.
Path Parameters
api_key_uuid
required
"123e4567-e89b-12d3-a456-426614174000"API key for an agent.
Request: /v2/gen-ai/models/api_keys/{api_key_uuid}
curl -X DELETE \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/models/api_keys/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
api_key_info
optional
Model API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"api_key_info": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"name": "example name",
"secret_key": "example string",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}PUT Regenerate API Key for a Model
/v2/gen-ai/models/api_keys/{api_key_uuid}/regenerate
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To regenerate a model API key, send a PUT request to /v2/gen-ai/models/api_keys/{api_key_uuid}/regenerate.
Path Parameters
api_key_uuid
required
"123e4567-e89b-12d3-a456-426614174000"API key ID
Request: /v2/gen-ai/models/api_keys/{api_key_uuid}/regenerate
curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/models/api_keys/11efcf7e-824d-2808-bf8f-4e013e2ddde4/regenerate"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
api_key_info
optional
Model API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"api_key_info": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"name": "example name",
"secret_key": "example string",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET List Model Catalog
/v2/gen-ai/models/catalog
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
Returns all available models.
Query Parameters
page
optional
1limit
optional
1Request: /v2/gen-ai/models/catalog
curl -X GET \
-H "Content-Type: application/json" \
"https://api.digitalocean.com/v2/gen-ai/models/catalog"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
data
optional
Show child properties
availability
optional
["example string"]benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]context_window
optional
128000Specs (flat)
creator
optional
"Meta"Model creator/developer (e.g., "Meta", "Anthropic", "OpenAI")
id
optional
"506a3371-88d0-4047-9212-e2079497ac68"Identity
model_id
optional
"llama3.1-70b-instruct"Model identifier used for API calls (e.g., "llama3.1-70b-instruct")
name
optional
"Llama 3.1 70B"parameter_count
optional
70pricing
optional
Pricing per million tokens (aligns with existing ModelPrice pattern)
Show child properties
input_price_per_million
optional
0.6output_price_per_million
optional
0.9price_per_audio
optional
0.002price_per_image
optional
0.003Unit-based pricing for non-token models (e.g., Fal AI image/video/audio generation, speech models). At most one of these is typically populated per model. Token-based models (chat, embeddings) leave all of these at 0 and populate input_price_per_million / output_price_per_million instead.
price_per_megapixel
optional
3e-05price_per_second
optional
0.0001price_per_thousand_characters
optional
0.015price_per_video
optional
0.05provider
optional
MODEL_PROVIDER_DIGITALOCEANshort_description
optional
"Fast, efficient model for general tasks"type
optional
"text-to-text"meta
optional
Meta information about the data set
Show child properties
page
optional
123The current page
pages
optional
123Total number of pages
total
optional
123Total amount of items over all pages
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"data": [
{
"availability": [
"example string"
],
"capabilities": [
"example string"
],
"context_window": "128000",
"creator": "\"Meta\"",
"id": "\"506a3371-88d0-4047-9212-e2079497ac68\"",
"model_id": "\"llama3.1-70b-instruct\"",
"name": "\"Llama 3.1 70B\"",
"parameter_count": 70,
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"short_description": "\"Fast, efficient model for general tasks\"",
"type": "\"text-to-text\""
}
],
"meta": {
"page": 123,
"pages": 123,
"total": 123
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET Get Model Catalog Card
/v2/gen-ai/models/catalog/{id}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
Returns detailed information for a specific model in the catalog including capabilities, pricing, and code examples.
Path Parameters
id
required
"example string"Query Parameters
model_id
optional
"example string"Model identifier used for API calls (e.g., "llama3.1-70b-instruct"). Alternative to UUID lookup.
Request: /v2/gen-ai/models/catalog/{id}
curl -X GET \
-H "Content-Type: application/json" \
"https://api.digitalocean.com/v2/gen-ai/models/catalog/18bc9b8f-73c5-11f0-b074-4e013e2ddde4"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
data
optional
Detail view for GetModelCatalogCard
Show child properties
availability
optional
["example string"]benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]code_snippets
optional
Code examples for using the model
Show child properties
curl
optional
example stringjavascript
optional
example stringpython
optional
example stringsdk
optional
example stringcontext_window
optional
128000Specs (same as Entry)
creator
optional
"Meta"Model creator/developer (e.g., "Meta", "Anthropic", "OpenAI")
description
optional
"Claude Sonnet 4 is Anthropic's most capable model..."Card-specific
id
optional
"506a3371-88d0-4047-9212-e2079497ac68"Identity (same as Entry)
modalities
optional
Input/output modalities
Show child properties
input
optional
["example string"]output
optional
["example string"]model_id
optional
"llama3.1-70b-instruct"Model identifier used for API calls (e.g., "llama3.1-70b-instruct")
name
optional
"Llama 3.1 70B"parameter_count
optional
70pricing
optional
Pricing per million tokens (aligns with existing ModelPrice pattern)
Show child properties
input_price_per_million
optional
0.6output_price_per_million
optional
0.9price_per_audio
optional
0.002price_per_image
optional
0.003Unit-based pricing for non-token models (e.g., Fal AI image/video/audio generation, speech models). At most one of these is typically populated per model. Token-based models (chat, embeddings) leave all of these at 0 and populate input_price_per_million / output_price_per_million instead.
price_per_megapixel
optional
3e-05price_per_second
optional
0.0001price_per_thousand_characters
optional
0.015price_per_video
optional
0.05provider
optional
MODEL_PROVIDER_DIGITALOCEANshort_description
optional
"Fast, efficient model for general tasks"type
optional
"text-to-text"
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"data": {
"availability": [
"example string"
],
"capabilities": [
"example string"
],
"code_snippets": {
"curl": "example string",
"javascript": "example string",
"python": "example string",
"sdk": "example string"
},
"context_window": "128000",
"creator": "\"Meta\"",
"description": "\"Claude Sonnet 4 is Anthropic's most capable model...\"",
"id": "\"506a3371-88d0-4047-9212-e2079497ac68\"",
"modalities": {
"input": [
"example string"
],
"output": [
"example string"
]
},
"model_id": "\"llama3.1-70b-instruct\"",
"name": "\"Llama 3.1 70B\"",
"parameter_count": 70,
"pricing": {
"input_price_per_million": 0.6,
"output_price_per_million": 0.9,
"price_per_audio": 0.002,
"price_per_image": 0.003,
"price_per_megapixel": 0.00003,
"price_per_second": 0.0001,
"price_per_thousand_characters": 0.015,
"price_per_video": 0.05
},
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"short_description": "\"Fast, efficient model for general tasks\"",
"type": "\"text-to-text\""
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET List Model Routers
/v2/gen-ai/models/routers
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To list model routers, send a GET request to /v2/gen-ai/models/routers.
Query Parameters
page
optional
1Page number.
per_page
optional
1Items per page.
Request: /v2/gen-ai/models/routers
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/models/routers?page=1&per_page=20"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
links
optional
Links to other pages
Show child properties
pages
optional
Information about how to reach other pages
Show child properties
first
optional
example stringFirst page
last
optional
example stringLast page
next
optional
example stringNext page
previous
optional
example stringPrevious page
meta
optional
Meta information about the data set
Show child properties
page
optional
123The current page
pages
optional
123Total number of pages
total
optional
123Total amount of items over all pages
model_routers
optional
The model routers
Show child properties
config
optional
Show child properties
fallback_models
optional
["example string"]Router-level fallback models
policies
optional
Task routing policies
Show child properties
custom_task
optional
Task definition embedded in a model router config.
models
optional
["example string"]Models assigned to the task
selection_policy
optional
Selection policy preference for choosing among assigned models.
task_slug
optional
"summarization"Task slug
created_at
optional
2023-01-01T00:00:00ZCreation date / time
description
optional
example stringDescription
name
optional
example nameName of the model router
regions
optional
["example string"]Target regions for the router
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"links": {
"pages": {
"first": "example string",
"last": "example string",
"next": "example string",
"previous": "example string"
}
},
"meta": {
"page": 123,
"pages": 123,
"total": 123
},
"model_routers": [
{
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"name": "example name",
"regions": [
"example string"
],
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
]
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}POST Create a Model Router
/v2/gen-ai/models/routers
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To create a model router, send a POST request to /v2/gen-ai/models/routers.
Request Body: application/json
description
optional
"My Model Router Description"Model router description
fallback_models
optional
["example string"]Fallback models
name
optional
"My Model Router"Model router name
policies
optional
Router policies
Show child properties
custom_task
optional
Task definition embedded in a model router config.
Show child properties
description
optional
"Summarize long-form text"Short task description
name
optional
"Custom Summarization"Task name
models
optional
["example string"]Models assigned to the task
selection_policy
optional
Selection policy preference for choosing among assigned models.
Show child properties
prefer
optional
"cheapest"One of: none, cheapest, fastest
task_slug
optional
"summarization"Task slug
regions
optional
["example string"]Target regions for the router
Request: /v2/gen-ai/models/routers
{
"description": "\"My Model Router Description\"",
"fallback_models": [
"example string"
],
"name": "\"My Model Router\"",
"policies": [
{
"models": [
"example string"
],
"task_slug": "\"summarization\""
}
],
"regions": [
"example string"
]
}curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/models/routers" \
-d '{
"name": "My Model Router",
"description": "Routes chat traffic across multiple models",
"regions": ["tor1"],
"fallback_models": ["openai-gpt-5.4", "kimi-k2.5"],
"policies": [
{
"task_slug": "summarization",
"models": ["openai-gpt-5.4", "kimi-k2.5"],
"selection_policy": {
"prefer": "cheapest"
}
}
]
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
model_router
optional
Model router
Show child properties
config
optional
Show child properties
fallback_models
optional
["example string"]Router-level fallback models
policies
optional
Task routing policies
Show child properties
custom_task
optional
Task definition embedded in a model router config.
models
optional
["example string"]Models assigned to the task
selection_policy
optional
Selection policy preference for choosing among assigned models.
task_slug
optional
"summarization"Task slug
created_at
optional
2023-01-01T00:00:00ZCreation date / time
description
optional
example stringDescription
name
optional
example nameName of the model router
regions
optional
["example string"]Target regions for the router
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"model_router": {
"config": {
"fallback_models": [
"example string"
],
"policies": []
},
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"name": "example name",
"regions": [
"example string"
],
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET List Model Router Presets
/v2/gen-ai/models/routers/presets
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To list model router presets, send a GET request to /v2/gen-ai/models/routers/presets.
Query Parameters
page
optional
1Page number.
per_page
optional
1Items per page.
Request: /v2/gen-ai/models/routers/presets
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/models/routers/presets?page=1&per_page=20"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
links
optional
Links to other pages
Show child properties
pages
optional
Information about how to reach other pages
Show child properties
first
optional
example stringFirst page
last
optional
example stringLast page
next
optional
example stringNext page
previous
optional
example stringPrevious page
meta
optional
Meta information about the data set
Show child properties
page
optional
123The current page
pages
optional
123Total number of pages
total
optional
123Total amount of items over all pages
presets
optional
The model router presets
Show child properties
config
optional
Show child properties
fallback_models
optional
["example string"]Router-level fallback models
policies
optional
Task routing policies
Show child properties
custom_task
optional
Task definition embedded in a model router config.
models
optional
["example string"]Models assigned to the task
selection_policy
optional
Selection policy preference for choosing among assigned models.
task_slug
optional
"summarization"Task slug
display_name
optional
example nameDisplay name for UI surfaces
long_description
optional
example stringLong description for details views
short_description
optional
example stringShort description for list views
slug
optional
example stringStable slug for routing usage
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"links": {
"pages": {
"first": "example string",
"last": "example string",
"next": "example string",
"previous": "example string"
}
},
"meta": {
"page": 123,
"pages": 123,
"total": 123
},
"presets": [
{
"display_name": "example name",
"long_description": "example string",
"short_description": "example string",
"slug": "example string"
}
]
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET List Model Router Task Presets
/v2/gen-ai/models/routers/tasks/presets
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To list model router task presets, send a GET request to /v2/gen-ai/models/routers/tasks/presets.
Query Parameters
page
optional
1Page number.
per_page
optional
1Items per page.
Request: /v2/gen-ai/models/routers/tasks/presets
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/models/routers/tasks/presets?page=1&per_page=20"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
links
optional
Links to other pages
Show child properties
pages
optional
Information about how to reach other pages
Show child properties
first
optional
example stringFirst page
last
optional
example stringLast page
next
optional
example stringNext page
previous
optional
example stringPrevious page
meta
optional
Meta information about the data set
Show child properties
page
optional
123The current page
pages
optional
123Total number of pages
total
optional
123Total amount of items over all pages
tasks
optional
The task presets
Show child properties
category
optional
example stringHigher-level grouping used by the UI
description
optional
example stringTask description
models
optional
["example string"]Default models assigned to this task
name
optional
example nameDisplay name
selection_policy
optional
Selection policy preference for choosing among assigned models.
Show child properties
prefer
optional
"cheapest"One of: none, cheapest, fastest
tags
optional
["example string"]Lightweight labels for filtering
task_slug
optional
example stringTask slug
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"links": {
"pages": {
"first": "example string",
"last": "example string",
"next": "example string",
"previous": "example string"
}
},
"meta": {
"page": 123,
"pages": 123,
"total": 123
},
"tasks": [
{
"category": "example string",
"description": "example string",
"models": [
"example string"
],
"name": "example name",
"tags": [
"example string"
],
"task_slug": "example string"
}
]
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET Retrieve an Existing Model Router
/v2/gen-ai/models/routers/{uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To retrieve details of a model router, send a GET request to /v2/gen-ai/models/routers/{uuid}.
Path Parameters
uuid
required
"123e4567-e89b-12d3-a456-426614174000"Model router id
Request: /v2/gen-ai/models/routers/{uuid}
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/models/routers/12345678-1234-1234-1234-123456789012"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
model_router
optional
Model router
Show child properties
config
optional
Show child properties
fallback_models
optional
["example string"]Router-level fallback models
policies
optional
Task routing policies
Show child properties
custom_task
optional
Task definition embedded in a model router config.
models
optional
["example string"]Models assigned to the task
selection_policy
optional
Selection policy preference for choosing among assigned models.
task_slug
optional
"summarization"Task slug
created_at
optional
2023-01-01T00:00:00ZCreation date / time
description
optional
example stringDescription
name
optional
example nameName of the model router
regions
optional
["example string"]Target regions for the router
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"model_router": {
"config": {
"fallback_models": [
"example string"
],
"policies": []
},
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"name": "example name",
"regions": [
"example string"
],
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}PUT Update a Model Router
/v2/gen-ai/models/routers/{uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To update a model router, send a PUT request to /v2/gen-ai/models/routers/{uuid}.
Path Parameters
uuid
required
"123e4567-e89b-12d3-a456-426614174000"Model router id
Request Body: application/json
description
optional
"My Model Router Description"Model router description
fallback_models
optional
name
optional
"My Model Router"Model router name
policies
optional
Router policies
Show child properties
custom_task
optional
Task definition embedded in a model router config.
Show child properties
description
optional
"Summarize long-form text"Short task description
name
optional
"Custom Summarization"Task name
models
optional
["example string"]Models assigned to the task
selection_policy
optional
Selection policy preference for choosing among assigned models.
Show child properties
prefer
optional
"cheapest"One of: none, cheapest, fastest
task_slug
optional
"summarization"Task slug
regions
optional
["example string"]Target regions for the router
uuid
optional
"12345678-1234-1234-1234-123456789012"Model router id
Request: /v2/gen-ai/models/routers/{uuid}
{
"description": "\"My Model Router Description\"",
"fallback_models": [],
"name": "\"My Model Router\"",
"policies": [
{
"models": [
"example string"
],
"task_slug": "\"summarization\""
}
],
"regions": [
"example string"
],
"uuid": "\"12345678-1234-1234-1234-123456789012\""
}curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/models/routers/12345678-1234-1234-1234-123456789012" \
-d '{
"name": "My Model Router",
"description": "Updated router description",
"regions": ["tor1"],
"fallback_models": ["openai-gpt-5.4", "kimi-k2.5"],
"policies": [
{
"task_slug": "summarization",
"models": ["openai-gpt-5.4"],
"selection_policy": {
"prefer": "cheapest"
}
}
]
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
model_router
optional
Model router
Show child properties
config
optional
Show child properties
fallback_models
optional
["example string"]Router-level fallback models
policies
optional
Task routing policies
Show child properties
custom_task
optional
Task definition embedded in a model router config.
models
optional
["example string"]Models assigned to the task
selection_policy
optional
Selection policy preference for choosing among assigned models.
task_slug
optional
"summarization"Task slug
created_at
optional
2023-01-01T00:00:00ZCreation date / time
description
optional
example stringDescription
name
optional
example nameName of the model router
regions
optional
["example string"]Target regions for the router
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"model_router": {
"config": {
"fallback_models": [
"example string"
],
"policies": []
},
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"name": "example name",
"regions": [
"example string"
],
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}DELETE Delete a Model Router
/v2/gen-ai/models/routers/{uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To delete a model router, send a DELETE request to /v2/gen-ai/models/routers/{uuid}.
Path Parameters
uuid
required
"123e4567-e89b-12d3-a456-426614174000"Model router id
Request: /v2/gen-ai/models/routers/{uuid}
curl -X DELETE \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/models/routers/12345678-1234-1234-1234-123456789012"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
uuid
optional
123e4567-e89b-12d3-a456-426614174000The id of the deleted model router
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}POST Get Oauth2 Dropbox Tokens
/v2/gen-ai/oauth2/dropbox/tokens
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To obtain the refresh token, needed for creation of data sources, send a GET request to /v2/gen-ai/oauth2/dropbox/tokens. Pass the code you obtrained from the oauth flow in the field 'code'
Request Body: application/json
code
optional
example stringThe oauth2 code from google
redirect_url
optional
example stringRedirect url
Request: /v2/gen-ai/oauth2/dropbox/tokens
{
"code": "example string",
"redirect_url": "example string"
}curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/oauth2/dropbox/tokens?code=<oauth2_code_from_dropbox>"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
refresh_token
optional
example stringThe refresh token
token
optional
example stringThe access token
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"refresh_token": "example string",
"token": "example string"
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET Get Oauth2 URL
/v2/gen-ai/oauth2/url
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To generate an Oauth2-URL for use with your localhost, send a GET request to /v2/gen-ai/oauth2/url. Pass 'http://localhost:3000 as redirect_url
Query Parameters
type
optional
"example string"Type "google" / "dropbox".
redirect_url
optional
"example string"The redirect url.
Request: /v2/gen-ai/oauth2/url
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/oauth2/url?type=google&redirect_uri=http://localhost:3000"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
url
optional
example stringThe oauth2 url
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"url": "example string"
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET List OpenAI API Keys
/v2/gen-ai/openai/keys
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To list all OpenAI API keys, send a GET request to /v2/gen-ai/openai/keys.
Query Parameters
page
optional
1Page number.
per_page
optional
1Items per page.
Request: /v2/gen-ai/openai/keys
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/openai/keys"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
api_key_infos
optional
Api key infos
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
Show child properties
description
optional
example stringname
optional
example nameurl
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
Show child properties
capabilities
optional
["example string"]Capabilities supported by this endpoint (e.g. input_text, output_text, input_image)
endpoint
optional
/chat/responsesThe endpoint path (e.g. /chat/responses)
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
Show child properties
input
optional
["example string"]output
optional
["example string"]name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
Show child properties
default_string
optional
example stringString default value (for type="dropdown", e.g. "medium")
default_value
optional
0.7Numeric default value (for type="number")
max
optional
1Maximum allowed value (for type="number")
min
optional
0Minimum allowed value (for type="number")
name
optional
temperatureSetting key name (e.g. "max_tokens", "temperature", "resolution")
options
optional
["example string"]Allowed values for dropdown selections (for type="dropdown")
step
optional
123Step increment for numeric settings (for type="number")
type
optional
numberSetting value type: "number" or "dropdown"
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
Show child properties
major
optional
123Major version number
minor
optional
123Minor version number
patch
optional
123Patch version number
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
links
optional
Links to other pages
Show child properties
pages
optional
Information about how to reach other pages
Show child properties
first
optional
example stringFirst page
last
optional
example stringLast page
next
optional
example stringNext page
previous
optional
example stringPrevious page
meta
optional
Meta information about the data set
Show child properties
page
optional
123The current page
pages
optional
123Total number of pages
total
optional
123Total amount of items over all pages
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"api_key_infos": [
{
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
],
"links": {
"pages": {
"first": "example string",
"last": "example string",
"next": "example string",
"previous": "example string"
}
},
"meta": {
"page": 123,
"pages": 123,
"total": 123
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}POST Create OpenAI API Key
/v2/gen-ai/openai/keys
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To create an OpenAI API key, send a POST request to /v2/gen-ai/openai/keys.
Request Body: application/json
api_key
optional
"sk-proj--123456789098765432123456789"OpenAI API key
name
optional
"Production Key"Name of the key
Request: /v2/gen-ai/openai/keys
{
"api_key": "\"sk-proj--123456789098765432123456789\"",
"name": "\"Production Key\""
}curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/openai/keys" \
-d '{
"api_key": "sk-proj--12345678901234567890123456789012",
"name": "test-key"
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
api_key_info
optional
OpenAI API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
Show child properties
description
optional
example stringname
optional
example nameurl
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
Show child properties
capabilities
optional
["example string"]Capabilities supported by this endpoint (e.g. input_text, output_text, input_image)
endpoint
optional
/chat/responsesThe endpoint path (e.g. /chat/responses)
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
Show child properties
input
optional
["example string"]output
optional
["example string"]name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
Show child properties
default_string
optional
example stringString default value (for type="dropdown", e.g. "medium")
default_value
optional
0.7Numeric default value (for type="number")
max
optional
1Maximum allowed value (for type="number")
min
optional
0Minimum allowed value (for type="number")
name
optional
temperatureSetting key name (e.g. "max_tokens", "temperature", "resolution")
options
optional
["example string"]Allowed values for dropdown selections (for type="dropdown")
step
optional
123Step increment for numeric settings (for type="number")
type
optional
numberSetting value type: "number" or "dropdown"
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
Show child properties
major
optional
123Major version number
minor
optional
123Minor version number
patch
optional
123Patch version number
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"api_key_info": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET Get OpenAI API Key
/v2/gen-ai/openai/keys/{api_key_uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To retrieve details of an OpenAI API key, send a GET request to /v2/gen-ai/openai/keys/{api_key_uuid}.
Path Parameters
api_key_uuid
required
"123e4567-e89b-12d3-a456-426614174000"API key ID
Request: /v2/gen-ai/openai/keys/{api_key_uuid}
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/openai/keys/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
api_key_info
optional
OpenAI API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
Show child properties
description
optional
example stringname
optional
example nameurl
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
Show child properties
capabilities
optional
["example string"]Capabilities supported by this endpoint (e.g. input_text, output_text, input_image)
endpoint
optional
/chat/responsesThe endpoint path (e.g. /chat/responses)
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
Show child properties
input
optional
["example string"]output
optional
["example string"]name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
Show child properties
default_string
optional
example stringString default value (for type="dropdown", e.g. "medium")
default_value
optional
0.7Numeric default value (for type="number")
max
optional
1Maximum allowed value (for type="number")
min
optional
0Minimum allowed value (for type="number")
name
optional
temperatureSetting key name (e.g. "max_tokens", "temperature", "resolution")
options
optional
["example string"]Allowed values for dropdown selections (for type="dropdown")
step
optional
123Step increment for numeric settings (for type="number")
type
optional
numberSetting value type: "number" or "dropdown"
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
Show child properties
major
optional
123Major version number
minor
optional
123Minor version number
patch
optional
123Patch version number
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"api_key_info": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}PUT Update OpenAI API Key
/v2/gen-ai/openai/keys/{api_key_uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To update an OpenAI API key, send a PUT request to /v2/gen-ai/openai/keys/{api_key_uuid}.
Path Parameters
api_key_uuid
required
"123e4567-e89b-12d3-a456-426614174000"API key ID
Request Body: application/json
api_key
optional
"sk-ant-12345678901234567890123456789012"OpenAI API key
api_key_uuid
optional
"12345678-1234-1234-1234-123456789012"API key ID
name
optional
"Production Key"Name of the key
Request: /v2/gen-ai/openai/keys/{api_key_uuid}
{
"api_key": "\"sk-ant-12345678901234567890123456789012\"",
"api_key_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"name": "\"Production Key\""
}curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/openai/keys/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4" \
-d '{
"api_key_uuid": "11efb7d6-cdb5-6388-bf8f-4e013e2ddde4",
"name": "test-key2"
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
api_key_info
optional
OpenAI API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
Show child properties
description
optional
example stringname
optional
example nameurl
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
Show child properties
capabilities
optional
["example string"]Capabilities supported by this endpoint (e.g. input_text, output_text, input_image)
endpoint
optional
/chat/responsesThe endpoint path (e.g. /chat/responses)
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
Show child properties
input
optional
["example string"]output
optional
["example string"]name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
Show child properties
default_string
optional
example stringString default value (for type="dropdown", e.g. "medium")
default_value
optional
0.7Numeric default value (for type="number")
max
optional
1Maximum allowed value (for type="number")
min
optional
0Minimum allowed value (for type="number")
name
optional
temperatureSetting key name (e.g. "max_tokens", "temperature", "resolution")
options
optional
["example string"]Allowed values for dropdown selections (for type="dropdown")
step
optional
123Step increment for numeric settings (for type="number")
type
optional
numberSetting value type: "number" or "dropdown"
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
Show child properties
major
optional
123Major version number
minor
optional
123Minor version number
patch
optional
123Patch version number
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"api_key_info": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}DELETE Delete OpenAI API Key
/v2/gen-ai/openai/keys/{api_key_uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To delete an OpenAI API key, send a DELETE request to /v2/gen-ai/openai/keys/{api_key_uuid}.
Path Parameters
api_key_uuid
required
"123e4567-e89b-12d3-a456-426614174000"API key ID
Request: /v2/gen-ai/openai/keys/{api_key_uuid}
curl -X DELETE \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/openai/keys/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
api_key_info
optional
OpenAI API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
Show child properties
description
optional
example stringname
optional
example nameurl
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
Show child properties
capabilities
optional
["example string"]Capabilities supported by this endpoint (e.g. input_text, output_text, input_image)
endpoint
optional
/chat/responsesThe endpoint path (e.g. /chat/responses)
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
Show child properties
input
optional
["example string"]output
optional
["example string"]name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
Show child properties
default_string
optional
example stringString default value (for type="dropdown", e.g. "medium")
default_value
optional
0.7Numeric default value (for type="number")
max
optional
1Maximum allowed value (for type="number")
min
optional
0Minimum allowed value (for type="number")
name
optional
temperatureSetting key name (e.g. "max_tokens", "temperature", "resolution")
options
optional
["example string"]Allowed values for dropdown selections (for type="dropdown")
step
optional
123Step increment for numeric settings (for type="number")
type
optional
numberSetting value type: "number" or "dropdown"
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
Show child properties
major
optional
123Major version number
minor
optional
123Minor version number
patch
optional
123Patch version number
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"api_key_info": {
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"deleted_at": "2023-01-01T00:00:00Z",
"models": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET List agents by OpenAI key
/v2/gen-ai/openai/keys/{uuid}/agents
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
List Agents by OpenAI Key.
Path Parameters
uuid
required
"123e4567-e89b-12d3-a456-426614174000"Unique ID of OpenAI key
Query Parameters
page
optional
1Page number.
per_page
optional
1Items per page.
Request: /v2/gen-ai/openai/keys/{uuid}/agents
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/openai/keys/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4/agents"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
agents
optional
Show child properties
anthropic_api_key
optional
Anthropic API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_key_infos
optional
Api key infos
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_keys
optional
Api keys
Show child properties
api_key
optional
example stringApi key
chatbot
optional
A Chatbot
Show child properties
allowed_domains
optional
["example string"]button_background_color
optional
example stringlogo
optional
example stringname
optional
example nameName of chatbot
primary_color
optional
example stringsecondary_color
optional
example stringstarting_message
optional
example stringchatbot_identifiers
optional
Chatbot identifiers
Show child properties
agent_chatbot_identifier
optional
123e4567-e89b-12d3-a456-426614174000Agent chatbot identifier
child_agents
optional
Child agents
conversation_logs_enabled
optional
trueWhether conversation logs are enabled for the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
deployment
optional
Description of deployment
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date / time
name
optional
example nameName
status
optional
STATUS_UNKNOWNupdated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your deployed agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
visibility
optional
VISIBILITY_UNKNOWN- VISIBILITY_UNKNOWN: The status of the deployment is unknown
- VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests
- VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state
- VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet
- VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys
description
optional
example stringDescription of agent
functions
optional
Show child properties
api_key
optional
example stringApi key
created_at
optional
2023-01-01T00:00:00ZCreation date / time
created_by
optional
12345Created by user id from DO
description
optional
example stringAgent description
faas_name
optional
example namefaas_namespace
optional
example nameinput_schema
optional
name
optional
example nameName
output_schema
optional
updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringDownload your agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
guardrails
optional
The guardrails the agent is attached to
Show child properties
agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000created_at
optional
2023-01-01T00:00:00Zdefault_response
optional
example stringdescription
optional
example stringguardrail_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_attached
optional
trueis_default
optional
truemetadata
optional
name
optional
example namepriority
optional
123type
optional
GUARDRAIL_TYPE_UNKNOWNupdated_at
optional
2023-01-01T00:00:00Zuuid
optional
123e4567-e89b-12d3-a456-426614174000if_case
optional
example stringinstruction
optional
example stringAgent instruction. Instructions help your agent to perform its job effectively. See Write Effective Agent Instructions for best practices.
k
optional
123knowledge_bases
optional
Knowledge bases
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
Show child properties
completed_datasources
optional
123Number of datasources indexed completed
created_at
optional
2023-01-01T00:00:00ZCreation date / time
data_source_jobs
optional
Details on Data Sources included in the Indexing Job
data_source_uuids
optional
["example string"]finished_at
optional
2023-01-01T00:00:00Zis_report_available
optional
trueBoolean value to determine if the indexing job details are available
knowledge_base_uuid
optional
123e4567-e89b-12d3-a456-426614174000Knowledge base id
phase
optional
BATCH_JOB_PHASE_UNKNOWNstarted_at
optional
2023-01-01T00:00:00Zstatus
optional
INDEX_JOB_STATUS_UNKNOWNtokens
optional
123Number of tokens [This field is deprecated]
total_datasources
optional
123Number of datasources being indexed
total_tokens
optional
12345Total Tokens Consumed By the Indexing Job
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
Show child properties
enabled
optional
trueWhether reranking is enabled for retrieval
model
optional
"bge-reranker-v2-m3"Reranker model internal name
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
logging_config
optional
Show child properties
galileo_project_id
optional
123e4567-e89b-12d3-a456-426614174000Galileo project identifier
galileo_project_name
optional
example nameName of the Galileo project
insights_enabled
optional
trueWhether insights are enabled
insights_enabled_at
optional
2023-01-01T00:00:00ZTimestamp when insights were enabled
log_stream_id
optional
123e4567-e89b-12d3-a456-426614174000Identifier for the log stream
log_stream_name
optional
example nameName of the log stream
max_tokens
optional
123mcp_servers
optional
MCP (Model Context Protocol) servers attached to this agent
Show child properties
allowed_tools
optional
["example string"]Optional list of allowed tool names to expose from this server
authorization
optional
example stringOptional authorization header value for the MCP server
headers
optional
Optional additional headers to send to the MCP server
server_label
optional
example stringA label identifying this MCP server
server_url
optional
example stringThe URL of the MCP server
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
Show child properties
description
optional
example stringname
optional
example nameurl
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
Show child properties
capabilities
optional
["example string"]Capabilities supported by this endpoint (e.g. input_text, output_text, input_image)
endpoint
optional
/chat/responsesThe endpoint path (e.g. /chat/responses)
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
Show child properties
input
optional
["example string"]output
optional
["example string"]name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
Show child properties
default_string
optional
example stringString default value (for type="dropdown", e.g. "medium")
default_value
optional
0.7Numeric default value (for type="number")
max
optional
1Maximum allowed value (for type="number")
min
optional
0Minimum allowed value (for type="number")
name
optional
temperatureSetting key name (e.g. "max_tokens", "temperature", "resolution")
options
optional
["example string"]Allowed values for dropdown selections (for type="dropdown")
step
optional
123Step increment for numeric settings (for type="number")
type
optional
numberSetting value type: "number" or "dropdown"
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
Show child properties
major
optional
123Major version number
minor
optional
123Minor version number
patch
optional
123Patch version number
model_provider_key
optional
Show child properties
api_key_uuid
optional
123e4567-e89b-12d3-a456-426614174000API key ID
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the key
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_at
optional
2023-01-01T00:00:00ZKey last updated date
model_router
optional
Model router
Show child properties
config
optional
Show child properties
fallback_models
optional
["example string"]Router-level fallback models
policies
optional
Task routing policies
created_at
optional
2023-01-01T00:00:00ZCreation date / time
description
optional
example stringDescription
name
optional
example nameName of the model router
regions
optional
["example string"]Target regions for the router
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameAgent name
openai_api_key
optional
OpenAI API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
parent_agents
optional
Parent agents
project_id
optional
123e4567-e89b-12d3-a456-426614174000provide_citations
optional
trueWhether the agent should provide in-response citations
reasoning_effort
optional
example stringThe reasoning effort for the agent
region
optional
example stringRegion code
retrieval_method
optional
RETRIEVAL_METHOD_UNKNOWN- RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown
- RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite
- RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back
- RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries
- RETRIEVAL_METHOD_NONE: The retrieval method is none
route_created_at
optional
2023-01-01T00:00:00ZCreation of route date / time
route_created_by
optional
12345route_name
optional
example nameRoute name
route_uuid
optional
123e4567-e89b-12d3-a456-426614174000tags
optional
["example string"]Agent tag to organize related resources
temperature
optional
123template
optional
Represents an AgentTemplate entity
Show child properties
created_at
optional
2023-01-01T00:00:00ZThe agent template's creation date
description
optional
example stringDeprecated - Use summary instead
guardrails
optional
List of guardrails associated with the agent template
Show child properties
priority
optional
123Priority of the guardrail
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the guardrail
instruction
optional
example stringInstructions for the agent template
k
optional
123The 'k' value for the agent template
knowledge_bases
optional
List of knowledge bases associated with the agent template
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
long_description
optional
The long description of the agent template
max_tokens
optional
123The max_tokens setting for the agent template
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the agent template
short_description
optional
The short description of the agent template
summary
optional
example stringThe summary of the agent template
tags
optional
["example string"]List of tags associated with the agent template
temperature
optional
123The temperature setting for the agent template
template_type
optional
AGENT_TEMPLATE_TYPE_STANDARD- AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template
- AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template
top_p
optional
123The top_p setting for the agent template
updated_at
optional
2023-01-01T00:00:00ZThe agent template's last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
thinking_token_budget
optional
123The thinking token budget for Anthropic extended thinking (0 = disabled)
top_p
optional
123updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your agent under this url
user_id
optional
12345Id of user that created the agent
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique agent id
version_hash
optional
example stringThe latest version of the agent
vpc_egress_ips
optional
["example string"]VPC Egress IPs
vpc_uuid
optional
"12345678-1234-1234-1234-123456789012"workspace
optional
Show child properties
agents
optional
Agents
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345The id of user who created this workspace
created_by_email
optional
[email protected]The email of the user who created this workspace
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
description
optional
example stringDescription of the workspace
evaluation_test_cases
optional
Evaluations
Show child properties
archived_at
optional
2023-01-01T00:00:00Zcreated_at
optional
2023-01-01T00:00:00Zcreated_by_user_email
optional
[email protected]created_by_user_id
optional
12345dataset
optional
dataset_name
optional
example namedataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000description
optional
example stringlatest_version_number_of_runs
optional
123metrics
optional
name
optional
example namestar_metric
optional
test_case_uuid
optional
123e4567-e89b-12d3-a456-426614174000total_runs
optional
123updated_at
optional
2023-01-01T00:00:00Zupdated_by_user_email
optional
[email protected]updated_by_user_id
optional
12345version
optional
123name
optional
example nameName of the workspace
updated_at
optional
2023-01-01T00:00:00ZUpdate date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
links
optional
Links to other pages
Show child properties
pages
optional
Information about how to reach other pages
Show child properties
first
optional
example stringFirst page
last
optional
example stringLast page
next
optional
example stringNext page
previous
optional
example stringPrevious page
meta
optional
Meta information about the data set
Show child properties
page
optional
123The current page
pages
optional
123Total number of pages
total
optional
123Total amount of items over all pages
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"agents": [
{
"api_key_infos": [],
"api_keys": [],
"chatbot_identifiers": [],
"child_agents": [],
"conversation_logs_enabled": true,
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"functions": [],
"guardrails": [],
"if_case": "example string",
"instruction": "example string",
"k": 123,
"knowledge_bases": [],
"max_tokens": 123,
"mcp_servers": [],
"name": "example name",
"parent_agents": [],
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"provide_citations": true,
"reasoning_effort": "example string",
"region": "example string",
"retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",
"route_created_at": "2023-01-01T00:00:00Z",
"route_created_by": "12345",
"route_name": "example name",
"route_uuid": "123e4567-e89b-12d3-a456-426614174000",
"tags": [
"example string"
],
"temperature": 123,
"thinking_token_budget": 123,
"top_p": 123,
"updated_at": "2023-01-01T00:00:00Z",
"url": "example string",
"user_id": "12345",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"version_hash": "example string",
"vpc_egress_ips": [
"example string"
],
"vpc_uuid": "\"12345678-1234-1234-1234-123456789012\""
}
],
"links": {
"pages": {
"first": "example string",
"last": "example string",
"next": "example string",
"previous": "example string"
}
},
"meta": {
"page": 123,
"pages": 123,
"total": 123
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET List Datacenter Regions
/v2/gen-ai/regions
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To list all datacenter regions, send a GET request to /v2/gen-ai/regions.
Query Parameters
serves_inference
optional
trueInclude datacenters that serve inference.
serves_batch
optional
trueInclude datacenters that are capable of running batch jobs.
Request: /v2/gen-ai/regions
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/regions"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
regions
optional
Region code
Show child properties
inference_url
optional
example stringUrl for inference server
region
optional
example stringRegion code
serves_batch
optional
trueThis datacenter is capable of running batch jobs
serves_inference
optional
trueThis datacenter is capable of serving inference
stream_inference_url
optional
example stringThe url for the inference streaming server
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"regions": [
{
"inference_url": "example string",
"region": "example string",
"serves_batch": true,
"serves_inference": true,
"stream_inference_url": "example string"
}
]
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}POST Create scheduled indexing for knowledge base
/v2/gen-ai/scheduled-indexing
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To create scheduled indexing for a knowledge base, send a POST request to /v2/gen-ai/scheduled-indexing.
Request Body: application/json
days
optional
Days for execution (day is represented same as in a cron expression, e.g. Monday begins with 1 )
knowledge_base_uuid
optional
123e4567-e89b-12d3-a456-426614174000Knowledge base uuid for which the schedule is created
time
optional
example stringTime of execution (HH:MM) UTC
Request: /v2/gen-ai/scheduled-indexing
{
"days": [
123
],
"knowledge_base_uuid": "123e4567-e89b-12d3-a456-426614174000",
"time": "example string"
}curl --location --request POST 'https://api.digitalocean.com/v2/gen-ai/scheduled-indexing' \
--header 'Authorization: Bearer $DIGITALOCEAN_TOKEN"' \
--header 'Content-Type: application/json' \
--data '{
"knowledge_base_uuid": "knowledge_base_uuid",
"time": "18:00",
"days": [
1,
2,
3
]
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
indexing_info
optional
Metadata for scheduled indexing entries
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreated at timestamp
days
optional
Days for execution (day is represented same as in a cron expression, e.g. Monday begins with 1 )
deleted_at
optional
2023-01-01T00:00:00ZDeleted at timestamp (if soft deleted)
is_active
optional
trueWhether the schedule is currently active
knowledge_base_uuid
optional
123e4567-e89b-12d3-a456-426614174000Knowledge base uuid associated with this schedule
last_ran_at
optional
2023-01-01T00:00:00ZLast time the schedule was executed
next_run_at
optional
2023-01-01T00:00:00ZNext scheduled run
time
optional
example stringScheduled time of execution (HH:MM:SS format)
updated_at
optional
2023-01-01T00:00:00ZUpdated at timestamp
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique identifier for the scheduled indexing entry
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"indexing_info": {
"created_at": "2023-01-01T00:00:00Z",
"days": [
123
],
"deleted_at": "2023-01-01T00:00:00Z",
"is_active": true,
"knowledge_base_uuid": "123e4567-e89b-12d3-a456-426614174000",
"last_ran_at": "2023-01-01T00:00:00Z",
"next_run_at": "2023-01-01T00:00:00Z",
"time": "example string",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET Get Scheduled Indexing for Knowledge Base
/v2/gen-ai/scheduled-indexing/knowledge-base/{knowledge_base_uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
Get Scheduled Indexing for knowledge base using knoweldge base uuid, send a GET request to /v2/gen-ai/scheduled-indexing/knowledge-base/{knowledge_base_uuid}.
Path Parameters
knowledge_base_uuid
required
"123e4567-e89b-12d3-a456-426614174000"UUID of the scheduled indexing entry
Request: /v2/gen-ai/scheduled-indexing/knowledge-base/{knowledge_base_uuid}
curl --location --request GET 'https://api.digitalocean.com/v2/gen-ai/scheduled-indexing/knowledge-base/{knowledge_base_uuid}' \
--header 'Authorization: Bearer $DIGITALOCEAN_TOKEN' \
--header 'Content-Type: application/json' Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
indexing_info
optional
Metadata for scheduled indexing entries
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreated at timestamp
days
optional
Days for execution (day is represented same as in a cron expression, e.g. Monday begins with 1 )
deleted_at
optional
2023-01-01T00:00:00ZDeleted at timestamp (if soft deleted)
is_active
optional
trueWhether the schedule is currently active
knowledge_base_uuid
optional
123e4567-e89b-12d3-a456-426614174000Knowledge base uuid associated with this schedule
last_ran_at
optional
2023-01-01T00:00:00ZLast time the schedule was executed
next_run_at
optional
2023-01-01T00:00:00ZNext scheduled run
time
optional
example stringScheduled time of execution (HH:MM:SS format)
updated_at
optional
2023-01-01T00:00:00ZUpdated at timestamp
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique identifier for the scheduled indexing entry
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"indexing_info": {
"created_at": "2023-01-01T00:00:00Z",
"days": [
123
],
"deleted_at": "2023-01-01T00:00:00Z",
"is_active": true,
"knowledge_base_uuid": "123e4567-e89b-12d3-a456-426614174000",
"last_ran_at": "2023-01-01T00:00:00Z",
"next_run_at": "2023-01-01T00:00:00Z",
"time": "example string",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}DELETE Delete Scheduled Indexing
/v2/gen-ai/scheduled-indexing/{uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
Delete Scheduled Indexing for knowledge base, send a DELETE request to /v2/gen-ai/scheduled-indexing/{uuid}.
Path Parameters
uuid
required
"123e4567-e89b-12d3-a456-426614174000"UUID of the scheduled indexing
Request: /v2/gen-ai/scheduled-indexing/{uuid}
curl --location --request DELETE 'https://api.digitalocean.com/v2/gen-ai/scheduled-indexing/{scheduled_indexing_id}' \
--header 'Authorization: Bearer $DIGITALOCEAN_TOKEN'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
indexing_info
optional
Metadata for scheduled indexing entries
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreated at timestamp
days
optional
Days for execution (day is represented same as in a cron expression, e.g. Monday begins with 1 )
deleted_at
optional
2023-01-01T00:00:00ZDeleted at timestamp (if soft deleted)
is_active
optional
trueWhether the schedule is currently active
knowledge_base_uuid
optional
123e4567-e89b-12d3-a456-426614174000Knowledge base uuid associated with this schedule
last_ran_at
optional
2023-01-01T00:00:00ZLast time the schedule was executed
next_run_at
optional
2023-01-01T00:00:00ZNext scheduled run
time
optional
example stringScheduled time of execution (HH:MM:SS format)
updated_at
optional
2023-01-01T00:00:00ZUpdated at timestamp
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique identifier for the scheduled indexing entry
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"indexing_info": {
"created_at": "2023-01-01T00:00:00Z",
"days": [
123
],
"deleted_at": "2023-01-01T00:00:00Z",
"is_active": true,
"knowledge_base_uuid": "123e4567-e89b-12d3-a456-426614174000",
"last_ran_at": "2023-01-01T00:00:00Z",
"next_run_at": "2023-01-01T00:00:00Z",
"time": "example string",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET List Workspaces
/v2/gen-ai/workspaces
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To list all workspaces, send a GET request to /v2/gen-ai/workspaces.
Request: /v2/gen-ai/workspaces
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/workspaces"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
workspaces
optional
Workspaces
Show child properties
agents
optional
Agents
Show child properties
anthropic_api_key
optional
Anthropic API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_key_infos
optional
Api key infos
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_keys
optional
Api keys
Show child properties
api_key
optional
example stringApi key
chatbot
optional
A Chatbot
Show child properties
allowed_domains
optional
["example string"]button_background_color
optional
example stringlogo
optional
example stringname
optional
example nameName of chatbot
primary_color
optional
example stringsecondary_color
optional
example stringstarting_message
optional
example stringchatbot_identifiers
optional
Chatbot identifiers
Show child properties
agent_chatbot_identifier
optional
123e4567-e89b-12d3-a456-426614174000Agent chatbot identifier
child_agents
optional
Child agents
conversation_logs_enabled
optional
trueWhether conversation logs are enabled for the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
deployment
optional
Description of deployment
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date / time
name
optional
example nameName
status
optional
STATUS_UNKNOWNupdated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your deployed agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
visibility
optional
VISIBILITY_UNKNOWN- VISIBILITY_UNKNOWN: The status of the deployment is unknown
- VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests
- VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state
- VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet
- VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys
description
optional
example stringDescription of agent
functions
optional
Show child properties
api_key
optional
example stringApi key
created_at
optional
2023-01-01T00:00:00ZCreation date / time
created_by
optional
12345Created by user id from DO
description
optional
example stringAgent description
faas_name
optional
example namefaas_namespace
optional
example nameinput_schema
optional
name
optional
example nameName
output_schema
optional
updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringDownload your agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
guardrails
optional
The guardrails the agent is attached to
Show child properties
agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000created_at
optional
2023-01-01T00:00:00Zdefault_response
optional
example stringdescription
optional
example stringguardrail_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_attached
optional
trueis_default
optional
truemetadata
optional
name
optional
example namepriority
optional
123type
optional
GUARDRAIL_TYPE_UNKNOWNupdated_at
optional
2023-01-01T00:00:00Zuuid
optional
123e4567-e89b-12d3-a456-426614174000if_case
optional
example stringinstruction
optional
example stringAgent instruction. Instructions help your agent to perform its job effectively. See Write Effective Agent Instructions for best practices.
k
optional
123knowledge_bases
optional
Knowledge bases
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
logging_config
optional
Show child properties
galileo_project_id
optional
123e4567-e89b-12d3-a456-426614174000Galileo project identifier
galileo_project_name
optional
example nameName of the Galileo project
insights_enabled
optional
trueWhether insights are enabled
insights_enabled_at
optional
2023-01-01T00:00:00ZTimestamp when insights were enabled
log_stream_id
optional
123e4567-e89b-12d3-a456-426614174000Identifier for the log stream
log_stream_name
optional
example nameName of the log stream
max_tokens
optional
123mcp_servers
optional
MCP (Model Context Protocol) servers attached to this agent
Show child properties
allowed_tools
optional
["example string"]Optional list of allowed tool names to expose from this server
authorization
optional
example stringOptional authorization header value for the MCP server
headers
optional
Optional additional headers to send to the MCP server
server_label
optional
example stringA label identifying this MCP server
server_url
optional
example stringThe URL of the MCP server
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
model_provider_key
optional
Show child properties
api_key_uuid
optional
123e4567-e89b-12d3-a456-426614174000API key ID
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
name
optional
example nameName of the key
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_at
optional
2023-01-01T00:00:00ZKey last updated date
model_router
optional
Model router
Show child properties
config
optional
created_at
optional
2023-01-01T00:00:00ZCreation date / time
description
optional
example stringDescription
name
optional
example nameName of the model router
regions
optional
["example string"]Target regions for the router
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameAgent name
openai_api_key
optional
OpenAI API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
parent_agents
optional
Parent agents
project_id
optional
123e4567-e89b-12d3-a456-426614174000provide_citations
optional
trueWhether the agent should provide in-response citations
reasoning_effort
optional
example stringThe reasoning effort for the agent
region
optional
example stringRegion code
retrieval_method
optional
RETRIEVAL_METHOD_UNKNOWN- RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown
- RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite
- RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back
- RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries
- RETRIEVAL_METHOD_NONE: The retrieval method is none
route_created_at
optional
2023-01-01T00:00:00ZCreation of route date / time
route_created_by
optional
12345route_name
optional
example nameRoute name
route_uuid
optional
123e4567-e89b-12d3-a456-426614174000tags
optional
["example string"]Agent tag to organize related resources
temperature
optional
123template
optional
Represents an AgentTemplate entity
Show child properties
created_at
optional
2023-01-01T00:00:00ZThe agent template's creation date
description
optional
example stringDeprecated - Use summary instead
guardrails
optional
List of guardrails associated with the agent template
instruction
optional
example stringInstructions for the agent template
k
optional
123The 'k' value for the agent template
knowledge_bases
optional
List of knowledge bases associated with the agent template
long_description
optional
The long description of the agent template
max_tokens
optional
123The max_tokens setting for the agent template
model
optional
Description of a Model
name
optional
example nameName of the agent template
short_description
optional
The short description of the agent template
summary
optional
example stringThe summary of the agent template
tags
optional
["example string"]List of tags associated with the agent template
temperature
optional
123The temperature setting for the agent template
template_type
optional
AGENT_TEMPLATE_TYPE_STANDARD- AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template
- AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template
top_p
optional
123The top_p setting for the agent template
updated_at
optional
2023-01-01T00:00:00ZThe agent template's last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
thinking_token_budget
optional
123The thinking token budget for Anthropic extended thinking (0 = disabled)
top_p
optional
123updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your agent under this url
user_id
optional
12345Id of user that created the agent
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique agent id
version_hash
optional
example stringThe latest version of the agent
vpc_egress_ips
optional
["example string"]VPC Egress IPs
vpc_uuid
optional
"12345678-1234-1234-1234-123456789012"workspace
optional
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345The id of user who created this workspace
created_by_email
optional
[email protected]The email of the user who created this workspace
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
description
optional
example stringDescription of the workspace
evaluation_test_cases
optional
Evaluations
Show child properties
archived_at
optional
2023-01-01T00:00:00Zcreated_at
optional
2023-01-01T00:00:00Zcreated_by_user_email
optional
[email protected]created_by_user_id
optional
12345dataset
optional
Show child properties
created_at
optional
2023-01-01T00:00:00ZTime created at.
dataset_name
optional
example nameName of the dataset.
dataset_type
optional
EVALUATION_DATASET_TYPE_UNKNOWNdataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000UUID of the dataset.
file_size
optional
12345The size of the dataset uploaded file in bytes.
has_ground_truth
optional
trueDoes the dataset have a ground truth column?
row_count
optional
123Number of rows in the dataset.
dataset_name
optional
example namedataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000description
optional
example stringlatest_version_number_of_runs
optional
123metrics
optional
Show child properties
category
optional
METRIC_CATEGORY_UNSPECIFIEDdescription
optional
example stringevaluation_scope
optional
EVALUATION_SCOPE_UNSPECIFIEDScope that determines whether a metric belongs to agent evaluation or model evaluation. For backwards compatibility, UNSPECIFIED defaults to agent metrics only in list operations.
inverted
optional
trueIf true, the metric is inverted, meaning that a lower value is better.
is_metric_goal
optional
truemetric_name
optional
example namemetric_rank
optional
123metric_type
optional
METRIC_TYPE_UNSPECIFIEDmetric_uuid
optional
123e4567-e89b-12d3-a456-426614174000metric_value_type
optional
METRIC_VALUE_TYPE_UNSPECIFIEDrange_max
optional
123The maximum value for the metric.
range_min
optional
123The minimum value for the metric.
name
optional
example namestar_metric
optional
Show child properties
metric_uuid
optional
123e4567-e89b-12d3-a456-426614174000name
optional
example namesuccess_threshold
optional
123The success threshold for the star metric. This is a value that the metric must reach to be considered successful.
success_threshold_pct
optional
123The success threshold for the star metric. This is a percentage value between 0 and 100.
test_case_uuid
optional
123e4567-e89b-12d3-a456-426614174000total_runs
optional
123updated_at
optional
2023-01-01T00:00:00Zupdated_by_user_email
optional
[email protected]updated_by_user_id
optional
12345version
optional
123name
optional
example nameName of the workspace
updated_at
optional
2023-01-01T00:00:00ZUpdate date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"workspaces": [
{
"agents": [],
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"created_by_email": "[email protected]",
"deleted_at": "2023-01-01T00:00:00Z",
"description": "example string",
"evaluation_test_cases": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
]
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}POST Create a Workspace
/v2/gen-ai/workspaces
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To create a new workspace, send a POST request to /v2/gen-ai/workspaces. The response body contains a JSON object with the newly created workspace object.
Request Body: application/json
agent_uuids
optional
["example string"]Ids of the agents(s) to attach to the workspace
description
optional
example stringDescription of the workspace
name
optional
example nameName of the workspace
Request: /v2/gen-ai/workspaces
{
"agent_uuids": [
"example string"
],
"description": "example string",
"name": "example name"
}curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/workspaces" \
-d '{
"name": "api-create",
"description": "This is a test workspace created via the API",
"agent_uuids": [
"9758a232-b351-11ef-bf8f-4e013e2ddde4"
]
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
workspace
optional
Show child properties
agents
optional
Agents
Show child properties
anthropic_api_key
optional
Anthropic API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_key_infos
optional
Api key infos
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_keys
optional
Api keys
Show child properties
api_key
optional
example stringApi key
chatbot
optional
A Chatbot
Show child properties
allowed_domains
optional
["example string"]button_background_color
optional
example stringlogo
optional
example stringname
optional
example nameName of chatbot
primary_color
optional
example stringsecondary_color
optional
example stringstarting_message
optional
example stringchatbot_identifiers
optional
Chatbot identifiers
Show child properties
agent_chatbot_identifier
optional
123e4567-e89b-12d3-a456-426614174000Agent chatbot identifier
child_agents
optional
Child agents
conversation_logs_enabled
optional
trueWhether conversation logs are enabled for the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
deployment
optional
Description of deployment
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date / time
name
optional
example nameName
status
optional
STATUS_UNKNOWNupdated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your deployed agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
visibility
optional
VISIBILITY_UNKNOWN- VISIBILITY_UNKNOWN: The status of the deployment is unknown
- VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests
- VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state
- VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet
- VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys
description
optional
example stringDescription of agent
functions
optional
Show child properties
api_key
optional
example stringApi key
created_at
optional
2023-01-01T00:00:00ZCreation date / time
created_by
optional
12345Created by user id from DO
description
optional
example stringAgent description
faas_name
optional
example namefaas_namespace
optional
example nameinput_schema
optional
name
optional
example nameName
output_schema
optional
updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringDownload your agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
guardrails
optional
The guardrails the agent is attached to
Show child properties
agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000created_at
optional
2023-01-01T00:00:00Zdefault_response
optional
example stringdescription
optional
example stringguardrail_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_attached
optional
trueis_default
optional
truemetadata
optional
name
optional
example namepriority
optional
123type
optional
GUARDRAIL_TYPE_UNKNOWNupdated_at
optional
2023-01-01T00:00:00Zuuid
optional
123e4567-e89b-12d3-a456-426614174000if_case
optional
example stringinstruction
optional
example stringAgent instruction. Instructions help your agent to perform its job effectively. See Write Effective Agent Instructions for best practices.
k
optional
123knowledge_bases
optional
Knowledge bases
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
logging_config
optional
Show child properties
galileo_project_id
optional
123e4567-e89b-12d3-a456-426614174000Galileo project identifier
galileo_project_name
optional
example nameName of the Galileo project
insights_enabled
optional
trueWhether insights are enabled
insights_enabled_at
optional
2023-01-01T00:00:00ZTimestamp when insights were enabled
log_stream_id
optional
123e4567-e89b-12d3-a456-426614174000Identifier for the log stream
log_stream_name
optional
example nameName of the log stream
max_tokens
optional
123mcp_servers
optional
MCP (Model Context Protocol) servers attached to this agent
Show child properties
allowed_tools
optional
["example string"]Optional list of allowed tool names to expose from this server
authorization
optional
example stringOptional authorization header value for the MCP server
headers
optional
Optional additional headers to send to the MCP server
server_label
optional
example stringA label identifying this MCP server
server_url
optional
example stringThe URL of the MCP server
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
model_provider_key
optional
Show child properties
api_key_uuid
optional
123e4567-e89b-12d3-a456-426614174000API key ID
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
name
optional
example nameName of the key
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_at
optional
2023-01-01T00:00:00ZKey last updated date
model_router
optional
Model router
Show child properties
config
optional
created_at
optional
2023-01-01T00:00:00ZCreation date / time
description
optional
example stringDescription
name
optional
example nameName of the model router
regions
optional
["example string"]Target regions for the router
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameAgent name
openai_api_key
optional
OpenAI API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
parent_agents
optional
Parent agents
project_id
optional
123e4567-e89b-12d3-a456-426614174000provide_citations
optional
trueWhether the agent should provide in-response citations
reasoning_effort
optional
example stringThe reasoning effort for the agent
region
optional
example stringRegion code
retrieval_method
optional
RETRIEVAL_METHOD_UNKNOWN- RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown
- RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite
- RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back
- RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries
- RETRIEVAL_METHOD_NONE: The retrieval method is none
route_created_at
optional
2023-01-01T00:00:00ZCreation of route date / time
route_created_by
optional
12345route_name
optional
example nameRoute name
route_uuid
optional
123e4567-e89b-12d3-a456-426614174000tags
optional
["example string"]Agent tag to organize related resources
temperature
optional
123template
optional
Represents an AgentTemplate entity
Show child properties
created_at
optional
2023-01-01T00:00:00ZThe agent template's creation date
description
optional
example stringDeprecated - Use summary instead
guardrails
optional
List of guardrails associated with the agent template
instruction
optional
example stringInstructions for the agent template
k
optional
123The 'k' value for the agent template
knowledge_bases
optional
List of knowledge bases associated with the agent template
long_description
optional
The long description of the agent template
max_tokens
optional
123The max_tokens setting for the agent template
model
optional
Description of a Model
name
optional
example nameName of the agent template
short_description
optional
The short description of the agent template
summary
optional
example stringThe summary of the agent template
tags
optional
["example string"]List of tags associated with the agent template
temperature
optional
123The temperature setting for the agent template
template_type
optional
AGENT_TEMPLATE_TYPE_STANDARD- AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template
- AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template
top_p
optional
123The top_p setting for the agent template
updated_at
optional
2023-01-01T00:00:00ZThe agent template's last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
thinking_token_budget
optional
123The thinking token budget for Anthropic extended thinking (0 = disabled)
top_p
optional
123updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your agent under this url
user_id
optional
12345Id of user that created the agent
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique agent id
version_hash
optional
example stringThe latest version of the agent
vpc_egress_ips
optional
["example string"]VPC Egress IPs
vpc_uuid
optional
"12345678-1234-1234-1234-123456789012"workspace
optional
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345The id of user who created this workspace
created_by_email
optional
[email protected]The email of the user who created this workspace
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
description
optional
example stringDescription of the workspace
evaluation_test_cases
optional
Evaluations
Show child properties
archived_at
optional
2023-01-01T00:00:00Zcreated_at
optional
2023-01-01T00:00:00Zcreated_by_user_email
optional
[email protected]created_by_user_id
optional
12345dataset
optional
Show child properties
created_at
optional
2023-01-01T00:00:00ZTime created at.
dataset_name
optional
example nameName of the dataset.
dataset_type
optional
EVALUATION_DATASET_TYPE_UNKNOWNdataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000UUID of the dataset.
file_size
optional
12345The size of the dataset uploaded file in bytes.
has_ground_truth
optional
trueDoes the dataset have a ground truth column?
row_count
optional
123Number of rows in the dataset.
dataset_name
optional
example namedataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000description
optional
example stringlatest_version_number_of_runs
optional
123metrics
optional
Show child properties
category
optional
METRIC_CATEGORY_UNSPECIFIEDdescription
optional
example stringevaluation_scope
optional
EVALUATION_SCOPE_UNSPECIFIEDScope that determines whether a metric belongs to agent evaluation or model evaluation. For backwards compatibility, UNSPECIFIED defaults to agent metrics only in list operations.
inverted
optional
trueIf true, the metric is inverted, meaning that a lower value is better.
is_metric_goal
optional
truemetric_name
optional
example namemetric_rank
optional
123metric_type
optional
METRIC_TYPE_UNSPECIFIEDmetric_uuid
optional
123e4567-e89b-12d3-a456-426614174000metric_value_type
optional
METRIC_VALUE_TYPE_UNSPECIFIEDrange_max
optional
123The maximum value for the metric.
range_min
optional
123The minimum value for the metric.
name
optional
example namestar_metric
optional
Show child properties
metric_uuid
optional
123e4567-e89b-12d3-a456-426614174000name
optional
example namesuccess_threshold
optional
123The success threshold for the star metric. This is a value that the metric must reach to be considered successful.
success_threshold_pct
optional
123The success threshold for the star metric. This is a percentage value between 0 and 100.
test_case_uuid
optional
123e4567-e89b-12d3-a456-426614174000total_runs
optional
123updated_at
optional
2023-01-01T00:00:00Zupdated_by_user_email
optional
[email protected]updated_by_user_id
optional
12345version
optional
123name
optional
example nameName of the workspace
updated_at
optional
2023-01-01T00:00:00ZUpdate date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"workspace": {
"agents": [],
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"created_by_email": "[email protected]",
"deleted_at": "2023-01-01T00:00:00Z",
"description": "example string",
"evaluation_test_cases": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET Retrieve an Existing Workspace
/v2/gen-ai/workspaces/{workspace_uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To retrieve details of a workspace, GET request to /v2/gen-ai/workspaces/{workspace_uuid}. The response body is a JSON object containing the workspace.
Path Parameters
workspace_uuid
required
"123e4567-e89b-12d3-a456-426614174000"Workspace UUID.
Request: /v2/gen-ai/workspaces/{workspace_uuid}
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/workspaces/c441bf77-81d6-11ef-bf8f-4e013e2ddde4"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
workspace
optional
Show child properties
agents
optional
Agents
Show child properties
anthropic_api_key
optional
Anthropic API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_key_infos
optional
Api key infos
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_keys
optional
Api keys
Show child properties
api_key
optional
example stringApi key
chatbot
optional
A Chatbot
Show child properties
allowed_domains
optional
["example string"]button_background_color
optional
example stringlogo
optional
example stringname
optional
example nameName of chatbot
primary_color
optional
example stringsecondary_color
optional
example stringstarting_message
optional
example stringchatbot_identifiers
optional
Chatbot identifiers
Show child properties
agent_chatbot_identifier
optional
123e4567-e89b-12d3-a456-426614174000Agent chatbot identifier
child_agents
optional
Child agents
conversation_logs_enabled
optional
trueWhether conversation logs are enabled for the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
deployment
optional
Description of deployment
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date / time
name
optional
example nameName
status
optional
STATUS_UNKNOWNupdated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your deployed agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
visibility
optional
VISIBILITY_UNKNOWN- VISIBILITY_UNKNOWN: The status of the deployment is unknown
- VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests
- VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state
- VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet
- VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys
description
optional
example stringDescription of agent
functions
optional
Show child properties
api_key
optional
example stringApi key
created_at
optional
2023-01-01T00:00:00ZCreation date / time
created_by
optional
12345Created by user id from DO
description
optional
example stringAgent description
faas_name
optional
example namefaas_namespace
optional
example nameinput_schema
optional
name
optional
example nameName
output_schema
optional
updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringDownload your agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
guardrails
optional
The guardrails the agent is attached to
Show child properties
agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000created_at
optional
2023-01-01T00:00:00Zdefault_response
optional
example stringdescription
optional
example stringguardrail_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_attached
optional
trueis_default
optional
truemetadata
optional
name
optional
example namepriority
optional
123type
optional
GUARDRAIL_TYPE_UNKNOWNupdated_at
optional
2023-01-01T00:00:00Zuuid
optional
123e4567-e89b-12d3-a456-426614174000if_case
optional
example stringinstruction
optional
example stringAgent instruction. Instructions help your agent to perform its job effectively. See Write Effective Agent Instructions for best practices.
k
optional
123knowledge_bases
optional
Knowledge bases
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
logging_config
optional
Show child properties
galileo_project_id
optional
123e4567-e89b-12d3-a456-426614174000Galileo project identifier
galileo_project_name
optional
example nameName of the Galileo project
insights_enabled
optional
trueWhether insights are enabled
insights_enabled_at
optional
2023-01-01T00:00:00ZTimestamp when insights were enabled
log_stream_id
optional
123e4567-e89b-12d3-a456-426614174000Identifier for the log stream
log_stream_name
optional
example nameName of the log stream
max_tokens
optional
123mcp_servers
optional
MCP (Model Context Protocol) servers attached to this agent
Show child properties
allowed_tools
optional
["example string"]Optional list of allowed tool names to expose from this server
authorization
optional
example stringOptional authorization header value for the MCP server
headers
optional
Optional additional headers to send to the MCP server
server_label
optional
example stringA label identifying this MCP server
server_url
optional
example stringThe URL of the MCP server
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
model_provider_key
optional
Show child properties
api_key_uuid
optional
123e4567-e89b-12d3-a456-426614174000API key ID
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
name
optional
example nameName of the key
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_at
optional
2023-01-01T00:00:00ZKey last updated date
model_router
optional
Model router
Show child properties
config
optional
created_at
optional
2023-01-01T00:00:00ZCreation date / time
description
optional
example stringDescription
name
optional
example nameName of the model router
regions
optional
["example string"]Target regions for the router
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameAgent name
openai_api_key
optional
OpenAI API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
parent_agents
optional
Parent agents
project_id
optional
123e4567-e89b-12d3-a456-426614174000provide_citations
optional
trueWhether the agent should provide in-response citations
reasoning_effort
optional
example stringThe reasoning effort for the agent
region
optional
example stringRegion code
retrieval_method
optional
RETRIEVAL_METHOD_UNKNOWN- RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown
- RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite
- RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back
- RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries
- RETRIEVAL_METHOD_NONE: The retrieval method is none
route_created_at
optional
2023-01-01T00:00:00ZCreation of route date / time
route_created_by
optional
12345route_name
optional
example nameRoute name
route_uuid
optional
123e4567-e89b-12d3-a456-426614174000tags
optional
["example string"]Agent tag to organize related resources
temperature
optional
123template
optional
Represents an AgentTemplate entity
Show child properties
created_at
optional
2023-01-01T00:00:00ZThe agent template's creation date
description
optional
example stringDeprecated - Use summary instead
guardrails
optional
List of guardrails associated with the agent template
instruction
optional
example stringInstructions for the agent template
k
optional
123The 'k' value for the agent template
knowledge_bases
optional
List of knowledge bases associated with the agent template
long_description
optional
The long description of the agent template
max_tokens
optional
123The max_tokens setting for the agent template
model
optional
Description of a Model
name
optional
example nameName of the agent template
short_description
optional
The short description of the agent template
summary
optional
example stringThe summary of the agent template
tags
optional
["example string"]List of tags associated with the agent template
temperature
optional
123The temperature setting for the agent template
template_type
optional
AGENT_TEMPLATE_TYPE_STANDARD- AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template
- AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template
top_p
optional
123The top_p setting for the agent template
updated_at
optional
2023-01-01T00:00:00ZThe agent template's last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
thinking_token_budget
optional
123The thinking token budget for Anthropic extended thinking (0 = disabled)
top_p
optional
123updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your agent under this url
user_id
optional
12345Id of user that created the agent
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique agent id
version_hash
optional
example stringThe latest version of the agent
vpc_egress_ips
optional
["example string"]VPC Egress IPs
vpc_uuid
optional
"12345678-1234-1234-1234-123456789012"workspace
optional
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345The id of user who created this workspace
created_by_email
optional
[email protected]The email of the user who created this workspace
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
description
optional
example stringDescription of the workspace
evaluation_test_cases
optional
Evaluations
Show child properties
archived_at
optional
2023-01-01T00:00:00Zcreated_at
optional
2023-01-01T00:00:00Zcreated_by_user_email
optional
[email protected]created_by_user_id
optional
12345dataset
optional
Show child properties
created_at
optional
2023-01-01T00:00:00ZTime created at.
dataset_name
optional
example nameName of the dataset.
dataset_type
optional
EVALUATION_DATASET_TYPE_UNKNOWNdataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000UUID of the dataset.
file_size
optional
12345The size of the dataset uploaded file in bytes.
has_ground_truth
optional
trueDoes the dataset have a ground truth column?
row_count
optional
123Number of rows in the dataset.
dataset_name
optional
example namedataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000description
optional
example stringlatest_version_number_of_runs
optional
123metrics
optional
Show child properties
category
optional
METRIC_CATEGORY_UNSPECIFIEDdescription
optional
example stringevaluation_scope
optional
EVALUATION_SCOPE_UNSPECIFIEDScope that determines whether a metric belongs to agent evaluation or model evaluation. For backwards compatibility, UNSPECIFIED defaults to agent metrics only in list operations.
inverted
optional
trueIf true, the metric is inverted, meaning that a lower value is better.
is_metric_goal
optional
truemetric_name
optional
example namemetric_rank
optional
123metric_type
optional
METRIC_TYPE_UNSPECIFIEDmetric_uuid
optional
123e4567-e89b-12d3-a456-426614174000metric_value_type
optional
METRIC_VALUE_TYPE_UNSPECIFIEDrange_max
optional
123The maximum value for the metric.
range_min
optional
123The minimum value for the metric.
name
optional
example namestar_metric
optional
Show child properties
metric_uuid
optional
123e4567-e89b-12d3-a456-426614174000name
optional
example namesuccess_threshold
optional
123The success threshold for the star metric. This is a value that the metric must reach to be considered successful.
success_threshold_pct
optional
123The success threshold for the star metric. This is a percentage value between 0 and 100.
test_case_uuid
optional
123e4567-e89b-12d3-a456-426614174000total_runs
optional
123updated_at
optional
2023-01-01T00:00:00Zupdated_by_user_email
optional
[email protected]updated_by_user_id
optional
12345version
optional
123name
optional
example nameName of the workspace
updated_at
optional
2023-01-01T00:00:00ZUpdate date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"workspace": {
"agents": [],
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"created_by_email": "[email protected]",
"deleted_at": "2023-01-01T00:00:00Z",
"description": "example string",
"evaluation_test_cases": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}PUT Update a Workspace
/v2/gen-ai/workspaces/{workspace_uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To update a workspace, send a PUT request to /v2/gen-ai/workspaces/{workspace_uuid}. The response body is a JSON object containing the workspace.
Path Parameters
workspace_uuid
required
"123e4567-e89b-12d3-a456-426614174000"Workspace UUID.
Request Body: application/json
description
optional
example stringThe new description of the workspace
name
optional
example nameThe new name of the workspace
workspace_uuid
optional
123e4567-e89b-12d3-a456-426614174000Workspace UUID.
Request: /v2/gen-ai/workspaces/{workspace_uuid}
{
"description": "example string",
"name": "example name",
"workspace_uuid": "123e4567-e89b-12d3-a456-426614174000"
}curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/workspaces/1b418231-b7d6-11ef-bf8f-4e013e2ddde4" \
-d '{
"workspace_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4",
"name": "rename-agent-api",
"description": "workspace description"
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
workspace
optional
Show child properties
agents
optional
Agents
Show child properties
anthropic_api_key
optional
Anthropic API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_key_infos
optional
Api key infos
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_keys
optional
Api keys
Show child properties
api_key
optional
example stringApi key
chatbot
optional
A Chatbot
Show child properties
allowed_domains
optional
["example string"]button_background_color
optional
example stringlogo
optional
example stringname
optional
example nameName of chatbot
primary_color
optional
example stringsecondary_color
optional
example stringstarting_message
optional
example stringchatbot_identifiers
optional
Chatbot identifiers
Show child properties
agent_chatbot_identifier
optional
123e4567-e89b-12d3-a456-426614174000Agent chatbot identifier
child_agents
optional
Child agents
conversation_logs_enabled
optional
trueWhether conversation logs are enabled for the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
deployment
optional
Description of deployment
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date / time
name
optional
example nameName
status
optional
STATUS_UNKNOWNupdated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your deployed agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
visibility
optional
VISIBILITY_UNKNOWN- VISIBILITY_UNKNOWN: The status of the deployment is unknown
- VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests
- VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state
- VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet
- VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys
description
optional
example stringDescription of agent
functions
optional
Show child properties
api_key
optional
example stringApi key
created_at
optional
2023-01-01T00:00:00ZCreation date / time
created_by
optional
12345Created by user id from DO
description
optional
example stringAgent description
faas_name
optional
example namefaas_namespace
optional
example nameinput_schema
optional
name
optional
example nameName
output_schema
optional
updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringDownload your agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
guardrails
optional
The guardrails the agent is attached to
Show child properties
agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000created_at
optional
2023-01-01T00:00:00Zdefault_response
optional
example stringdescription
optional
example stringguardrail_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_attached
optional
trueis_default
optional
truemetadata
optional
name
optional
example namepriority
optional
123type
optional
GUARDRAIL_TYPE_UNKNOWNupdated_at
optional
2023-01-01T00:00:00Zuuid
optional
123e4567-e89b-12d3-a456-426614174000if_case
optional
example stringinstruction
optional
example stringAgent instruction. Instructions help your agent to perform its job effectively. See Write Effective Agent Instructions for best practices.
k
optional
123knowledge_bases
optional
Knowledge bases
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
logging_config
optional
Show child properties
galileo_project_id
optional
123e4567-e89b-12d3-a456-426614174000Galileo project identifier
galileo_project_name
optional
example nameName of the Galileo project
insights_enabled
optional
trueWhether insights are enabled
insights_enabled_at
optional
2023-01-01T00:00:00ZTimestamp when insights were enabled
log_stream_id
optional
123e4567-e89b-12d3-a456-426614174000Identifier for the log stream
log_stream_name
optional
example nameName of the log stream
max_tokens
optional
123mcp_servers
optional
MCP (Model Context Protocol) servers attached to this agent
Show child properties
allowed_tools
optional
["example string"]Optional list of allowed tool names to expose from this server
authorization
optional
example stringOptional authorization header value for the MCP server
headers
optional
Optional additional headers to send to the MCP server
server_label
optional
example stringA label identifying this MCP server
server_url
optional
example stringThe URL of the MCP server
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
model_provider_key
optional
Show child properties
api_key_uuid
optional
123e4567-e89b-12d3-a456-426614174000API key ID
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
name
optional
example nameName of the key
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_at
optional
2023-01-01T00:00:00ZKey last updated date
model_router
optional
Model router
Show child properties
config
optional
created_at
optional
2023-01-01T00:00:00ZCreation date / time
description
optional
example stringDescription
name
optional
example nameName of the model router
regions
optional
["example string"]Target regions for the router
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameAgent name
openai_api_key
optional
OpenAI API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
parent_agents
optional
Parent agents
project_id
optional
123e4567-e89b-12d3-a456-426614174000provide_citations
optional
trueWhether the agent should provide in-response citations
reasoning_effort
optional
example stringThe reasoning effort for the agent
region
optional
example stringRegion code
retrieval_method
optional
RETRIEVAL_METHOD_UNKNOWN- RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown
- RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite
- RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back
- RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries
- RETRIEVAL_METHOD_NONE: The retrieval method is none
route_created_at
optional
2023-01-01T00:00:00ZCreation of route date / time
route_created_by
optional
12345route_name
optional
example nameRoute name
route_uuid
optional
123e4567-e89b-12d3-a456-426614174000tags
optional
["example string"]Agent tag to organize related resources
temperature
optional
123template
optional
Represents an AgentTemplate entity
Show child properties
created_at
optional
2023-01-01T00:00:00ZThe agent template's creation date
description
optional
example stringDeprecated - Use summary instead
guardrails
optional
List of guardrails associated with the agent template
instruction
optional
example stringInstructions for the agent template
k
optional
123The 'k' value for the agent template
knowledge_bases
optional
List of knowledge bases associated with the agent template
long_description
optional
The long description of the agent template
max_tokens
optional
123The max_tokens setting for the agent template
model
optional
Description of a Model
name
optional
example nameName of the agent template
short_description
optional
The short description of the agent template
summary
optional
example stringThe summary of the agent template
tags
optional
["example string"]List of tags associated with the agent template
temperature
optional
123The temperature setting for the agent template
template_type
optional
AGENT_TEMPLATE_TYPE_STANDARD- AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template
- AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template
top_p
optional
123The top_p setting for the agent template
updated_at
optional
2023-01-01T00:00:00ZThe agent template's last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
thinking_token_budget
optional
123The thinking token budget for Anthropic extended thinking (0 = disabled)
top_p
optional
123updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your agent under this url
user_id
optional
12345Id of user that created the agent
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique agent id
version_hash
optional
example stringThe latest version of the agent
vpc_egress_ips
optional
["example string"]VPC Egress IPs
vpc_uuid
optional
"12345678-1234-1234-1234-123456789012"workspace
optional
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345The id of user who created this workspace
created_by_email
optional
[email protected]The email of the user who created this workspace
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
description
optional
example stringDescription of the workspace
evaluation_test_cases
optional
Evaluations
Show child properties
archived_at
optional
2023-01-01T00:00:00Zcreated_at
optional
2023-01-01T00:00:00Zcreated_by_user_email
optional
[email protected]created_by_user_id
optional
12345dataset
optional
Show child properties
created_at
optional
2023-01-01T00:00:00ZTime created at.
dataset_name
optional
example nameName of the dataset.
dataset_type
optional
EVALUATION_DATASET_TYPE_UNKNOWNdataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000UUID of the dataset.
file_size
optional
12345The size of the dataset uploaded file in bytes.
has_ground_truth
optional
trueDoes the dataset have a ground truth column?
row_count
optional
123Number of rows in the dataset.
dataset_name
optional
example namedataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000description
optional
example stringlatest_version_number_of_runs
optional
123metrics
optional
Show child properties
category
optional
METRIC_CATEGORY_UNSPECIFIEDdescription
optional
example stringevaluation_scope
optional
EVALUATION_SCOPE_UNSPECIFIEDScope that determines whether a metric belongs to agent evaluation or model evaluation. For backwards compatibility, UNSPECIFIED defaults to agent metrics only in list operations.
inverted
optional
trueIf true, the metric is inverted, meaning that a lower value is better.
is_metric_goal
optional
truemetric_name
optional
example namemetric_rank
optional
123metric_type
optional
METRIC_TYPE_UNSPECIFIEDmetric_uuid
optional
123e4567-e89b-12d3-a456-426614174000metric_value_type
optional
METRIC_VALUE_TYPE_UNSPECIFIEDrange_max
optional
123The maximum value for the metric.
range_min
optional
123The minimum value for the metric.
name
optional
example namestar_metric
optional
Show child properties
metric_uuid
optional
123e4567-e89b-12d3-a456-426614174000name
optional
example namesuccess_threshold
optional
123The success threshold for the star metric. This is a value that the metric must reach to be considered successful.
success_threshold_pct
optional
123The success threshold for the star metric. This is a percentage value between 0 and 100.
test_case_uuid
optional
123e4567-e89b-12d3-a456-426614174000total_runs
optional
123updated_at
optional
2023-01-01T00:00:00Zupdated_by_user_email
optional
[email protected]updated_by_user_id
optional
12345version
optional
123name
optional
example nameName of the workspace
updated_at
optional
2023-01-01T00:00:00ZUpdate date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"workspace": {
"agents": [],
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"created_by_email": "[email protected]",
"deleted_at": "2023-01-01T00:00:00Z",
"description": "example string",
"evaluation_test_cases": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}DELETE Delete a Workspace
/v2/gen-ai/workspaces/{workspace_uuid}
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To delete a workspace, send a DELETE request to /v2/gen-ai/workspace/{workspace_uuid}.
Path Parameters
workspace_uuid
required
"123e4567-e89b-12d3-a456-426614174000"Workspace UUID.
Request: /v2/gen-ai/workspaces/{workspace_uuid}
curl -X DELETE \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/workspaces/5581a586-a745-11ef-bf8f-4e013e2ddde4"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
workspace_uuid
optional
123e4567-e89b-12d3-a456-426614174000Workspace
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"workspace_uuid": "123e4567-e89b-12d3-a456-426614174000"
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET List agents by Workspace
/v2/gen-ai/workspaces/{workspace_uuid}/agents
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To list all agents by a Workspace, send a GET request to /v2/gen-ai/workspaces/{workspace_uuid}/agents.
Path Parameters
workspace_uuid
required
"123e4567-e89b-12d3-a456-426614174000"Workspace UUID.
Query Parameters
only_deployed
optional
trueOnly list agents that are deployed.
page
optional
1Page number.
per_page
optional
1Items per page.
Request: /v2/gen-ai/workspaces/{workspace_uuid}/agents
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/workspaces/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4/agents"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
agents
optional
Show child properties
anthropic_api_key
optional
Anthropic API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_key_infos
optional
Api key infos
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_keys
optional
Api keys
Show child properties
api_key
optional
example stringApi key
chatbot
optional
A Chatbot
Show child properties
allowed_domains
optional
["example string"]button_background_color
optional
example stringlogo
optional
example stringname
optional
example nameName of chatbot
primary_color
optional
example stringsecondary_color
optional
example stringstarting_message
optional
example stringchatbot_identifiers
optional
Chatbot identifiers
Show child properties
agent_chatbot_identifier
optional
123e4567-e89b-12d3-a456-426614174000Agent chatbot identifier
child_agents
optional
Child agents
conversation_logs_enabled
optional
trueWhether conversation logs are enabled for the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
deployment
optional
Description of deployment
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date / time
name
optional
example nameName
status
optional
STATUS_UNKNOWNupdated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your deployed agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
visibility
optional
VISIBILITY_UNKNOWN- VISIBILITY_UNKNOWN: The status of the deployment is unknown
- VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests
- VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state
- VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet
- VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys
description
optional
example stringDescription of agent
functions
optional
Show child properties
api_key
optional
example stringApi key
created_at
optional
2023-01-01T00:00:00ZCreation date / time
created_by
optional
12345Created by user id from DO
description
optional
example stringAgent description
faas_name
optional
example namefaas_namespace
optional
example nameinput_schema
optional
name
optional
example nameName
output_schema
optional
updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringDownload your agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
guardrails
optional
The guardrails the agent is attached to
Show child properties
agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000created_at
optional
2023-01-01T00:00:00Zdefault_response
optional
example stringdescription
optional
example stringguardrail_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_attached
optional
trueis_default
optional
truemetadata
optional
name
optional
example namepriority
optional
123type
optional
GUARDRAIL_TYPE_UNKNOWNupdated_at
optional
2023-01-01T00:00:00Zuuid
optional
123e4567-e89b-12d3-a456-426614174000if_case
optional
example stringinstruction
optional
example stringAgent instruction. Instructions help your agent to perform its job effectively. See Write Effective Agent Instructions for best practices.
k
optional
123knowledge_bases
optional
Knowledge bases
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
Show child properties
completed_datasources
optional
123Number of datasources indexed completed
created_at
optional
2023-01-01T00:00:00ZCreation date / time
data_source_jobs
optional
Details on Data Sources included in the Indexing Job
data_source_uuids
optional
["example string"]finished_at
optional
2023-01-01T00:00:00Zis_report_available
optional
trueBoolean value to determine if the indexing job details are available
knowledge_base_uuid
optional
123e4567-e89b-12d3-a456-426614174000Knowledge base id
phase
optional
BATCH_JOB_PHASE_UNKNOWNstarted_at
optional
2023-01-01T00:00:00Zstatus
optional
INDEX_JOB_STATUS_UNKNOWNtokens
optional
123Number of tokens [This field is deprecated]
total_datasources
optional
123Number of datasources being indexed
total_tokens
optional
12345Total Tokens Consumed By the Indexing Job
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
Show child properties
enabled
optional
trueWhether reranking is enabled for retrieval
model
optional
"bge-reranker-v2-m3"Reranker model internal name
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
logging_config
optional
Show child properties
galileo_project_id
optional
123e4567-e89b-12d3-a456-426614174000Galileo project identifier
galileo_project_name
optional
example nameName of the Galileo project
insights_enabled
optional
trueWhether insights are enabled
insights_enabled_at
optional
2023-01-01T00:00:00ZTimestamp when insights were enabled
log_stream_id
optional
123e4567-e89b-12d3-a456-426614174000Identifier for the log stream
log_stream_name
optional
example nameName of the log stream
max_tokens
optional
123mcp_servers
optional
MCP (Model Context Protocol) servers attached to this agent
Show child properties
allowed_tools
optional
["example string"]Optional list of allowed tool names to expose from this server
authorization
optional
example stringOptional authorization header value for the MCP server
headers
optional
Optional additional headers to send to the MCP server
server_label
optional
example stringA label identifying this MCP server
server_url
optional
example stringThe URL of the MCP server
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
Show child properties
description
optional
example stringname
optional
example nameurl
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
Show child properties
capabilities
optional
["example string"]Capabilities supported by this endpoint (e.g. input_text, output_text, input_image)
endpoint
optional
/chat/responsesThe endpoint path (e.g. /chat/responses)
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
Show child properties
input
optional
["example string"]output
optional
["example string"]name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
Show child properties
default_string
optional
example stringString default value (for type="dropdown", e.g. "medium")
default_value
optional
0.7Numeric default value (for type="number")
max
optional
1Maximum allowed value (for type="number")
min
optional
0Minimum allowed value (for type="number")
name
optional
temperatureSetting key name (e.g. "max_tokens", "temperature", "resolution")
options
optional
["example string"]Allowed values for dropdown selections (for type="dropdown")
step
optional
123Step increment for numeric settings (for type="number")
type
optional
numberSetting value type: "number" or "dropdown"
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
Show child properties
major
optional
123Major version number
minor
optional
123Minor version number
patch
optional
123Patch version number
model_provider_key
optional
Show child properties
api_key_uuid
optional
123e4567-e89b-12d3-a456-426614174000API key ID
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the key
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_at
optional
2023-01-01T00:00:00ZKey last updated date
model_router
optional
Model router
Show child properties
config
optional
Show child properties
fallback_models
optional
["example string"]Router-level fallback models
policies
optional
Task routing policies
created_at
optional
2023-01-01T00:00:00ZCreation date / time
description
optional
example stringDescription
name
optional
example nameName of the model router
regions
optional
["example string"]Target regions for the router
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameAgent name
openai_api_key
optional
OpenAI API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
parent_agents
optional
Parent agents
project_id
optional
123e4567-e89b-12d3-a456-426614174000provide_citations
optional
trueWhether the agent should provide in-response citations
reasoning_effort
optional
example stringThe reasoning effort for the agent
region
optional
example stringRegion code
retrieval_method
optional
RETRIEVAL_METHOD_UNKNOWN- RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown
- RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite
- RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back
- RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries
- RETRIEVAL_METHOD_NONE: The retrieval method is none
route_created_at
optional
2023-01-01T00:00:00ZCreation of route date / time
route_created_by
optional
12345route_name
optional
example nameRoute name
route_uuid
optional
123e4567-e89b-12d3-a456-426614174000tags
optional
["example string"]Agent tag to organize related resources
temperature
optional
123template
optional
Represents an AgentTemplate entity
Show child properties
created_at
optional
2023-01-01T00:00:00ZThe agent template's creation date
description
optional
example stringDeprecated - Use summary instead
guardrails
optional
List of guardrails associated with the agent template
Show child properties
priority
optional
123Priority of the guardrail
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid of the guardrail
instruction
optional
example stringInstructions for the agent template
k
optional
123The 'k' value for the agent template
knowledge_bases
optional
List of knowledge bases associated with the agent template
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
long_description
optional
The long description of the agent template
max_tokens
optional
123The max_tokens setting for the agent template
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
name
optional
example nameName of the agent template
short_description
optional
The short description of the agent template
summary
optional
example stringThe summary of the agent template
tags
optional
["example string"]List of tags associated with the agent template
temperature
optional
123The temperature setting for the agent template
template_type
optional
AGENT_TEMPLATE_TYPE_STANDARD- AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template
- AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template
top_p
optional
123The top_p setting for the agent template
updated_at
optional
2023-01-01T00:00:00ZThe agent template's last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
thinking_token_budget
optional
123The thinking token budget for Anthropic extended thinking (0 = disabled)
top_p
optional
123updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your agent under this url
user_id
optional
12345Id of user that created the agent
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique agent id
version_hash
optional
example stringThe latest version of the agent
vpc_egress_ips
optional
["example string"]VPC Egress IPs
vpc_uuid
optional
"12345678-1234-1234-1234-123456789012"workspace
optional
Show child properties
agents
optional
Agents
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345The id of user who created this workspace
created_by_email
optional
[email protected]The email of the user who created this workspace
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
description
optional
example stringDescription of the workspace
evaluation_test_cases
optional
Evaluations
Show child properties
archived_at
optional
2023-01-01T00:00:00Zcreated_at
optional
2023-01-01T00:00:00Zcreated_by_user_email
optional
[email protected]created_by_user_id
optional
12345dataset
optional
dataset_name
optional
example namedataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000description
optional
example stringlatest_version_number_of_runs
optional
123metrics
optional
name
optional
example namestar_metric
optional
test_case_uuid
optional
123e4567-e89b-12d3-a456-426614174000total_runs
optional
123updated_at
optional
2023-01-01T00:00:00Zupdated_by_user_email
optional
[email protected]updated_by_user_id
optional
12345version
optional
123name
optional
example nameName of the workspace
updated_at
optional
2023-01-01T00:00:00ZUpdate date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
links
optional
Links to other pages
Show child properties
pages
optional
Information about how to reach other pages
Show child properties
first
optional
example stringFirst page
last
optional
example stringLast page
next
optional
example stringNext page
previous
optional
example stringPrevious page
meta
optional
Meta information about the data set
Show child properties
page
optional
123The current page
pages
optional
123Total number of pages
total
optional
123Total amount of items over all pages
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"agents": [
{
"api_key_infos": [],
"api_keys": [],
"chatbot_identifiers": [],
"child_agents": [],
"conversation_logs_enabled": true,
"created_at": "2023-01-01T00:00:00Z",
"description": "example string",
"functions": [],
"guardrails": [],
"if_case": "example string",
"instruction": "example string",
"k": 123,
"knowledge_bases": [],
"max_tokens": 123,
"mcp_servers": [],
"name": "example name",
"parent_agents": [],
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"provide_citations": true,
"reasoning_effort": "example string",
"region": "example string",
"retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",
"route_created_at": "2023-01-01T00:00:00Z",
"route_created_by": "12345",
"route_name": "example name",
"route_uuid": "123e4567-e89b-12d3-a456-426614174000",
"tags": [
"example string"
],
"temperature": 123,
"thinking_token_budget": 123,
"top_p": 123,
"updated_at": "2023-01-01T00:00:00Z",
"url": "example string",
"user_id": "12345",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"version_hash": "example string",
"vpc_egress_ips": [
"example string"
],
"vpc_uuid": "\"12345678-1234-1234-1234-123456789012\""
}
],
"links": {
"pages": {
"first": "example string",
"last": "example string",
"next": "example string",
"previous": "example string"
}
},
"meta": {
"page": 123,
"pages": 123,
"total": 123
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}PUT Move Agents to a Workspace
/v2/gen-ai/workspaces/{workspace_uuid}/agents
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To move all listed agents a given workspace, send a PUT request to /v2/gen-ai/workspaces/{workspace_uuid}/agents.
Path Parameters
workspace_uuid
required
"123e4567-e89b-12d3-a456-426614174000"Workspace uuid to move agents to
Request Body: application/json
agent_uuids
optional
["example string"]Agent uuids
workspace_uuid
optional
123e4567-e89b-12d3-a456-426614174000Workspace uuid to move agents to
Request: /v2/gen-ai/workspaces/{workspace_uuid}/agents
{
"agent_uuids": [
"example string"
],
"workspace_uuid": "123e4567-e89b-12d3-a456-426614174000"
}curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/workspaces/1b418231-b7d6-11ef-bf8f-4e013e2ddde4/agents" \
-d '{
"workspace_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4",
"agent_uuids": ["95ea6652-75ed-11ef-bf8f-4e013e2ddde4", "37455431-84bd-4fa2-94cf-e8486f8f8c5e"]
}'Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
workspace
optional
Show child properties
agents
optional
Agents
Show child properties
anthropic_api_key
optional
Anthropic API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_key_infos
optional
Api key infos
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345Created by
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
name
optional
example nameName
secret_key
optional
example stringuuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
api_keys
optional
Api keys
Show child properties
api_key
optional
example stringApi key
chatbot
optional
A Chatbot
Show child properties
allowed_domains
optional
["example string"]button_background_color
optional
example stringlogo
optional
example stringname
optional
example nameName of chatbot
primary_color
optional
example stringsecondary_color
optional
example stringstarting_message
optional
example stringchatbot_identifiers
optional
Chatbot identifiers
Show child properties
agent_chatbot_identifier
optional
123e4567-e89b-12d3-a456-426614174000Agent chatbot identifier
child_agents
optional
Child agents
conversation_logs_enabled
optional
trueWhether conversation logs are enabled for the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
deployment
optional
Description of deployment
Show child properties
created_at
optional
2023-01-01T00:00:00ZCreation date / time
name
optional
example nameName
status
optional
STATUS_UNKNOWNupdated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your deployed agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
visibility
optional
VISIBILITY_UNKNOWN- VISIBILITY_UNKNOWN: The status of the deployment is unknown
- VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests
- VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state
- VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet
- VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys
description
optional
example stringDescription of agent
functions
optional
Show child properties
api_key
optional
example stringApi key
created_at
optional
2023-01-01T00:00:00ZCreation date / time
created_by
optional
12345Created by user id from DO
description
optional
example stringAgent description
faas_name
optional
example namefaas_namespace
optional
example nameinput_schema
optional
name
optional
example nameName
output_schema
optional
updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringDownload your agent here
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
guardrails
optional
The guardrails the agent is attached to
Show child properties
agent_uuid
optional
123e4567-e89b-12d3-a456-426614174000created_at
optional
2023-01-01T00:00:00Zdefault_response
optional
example stringdescription
optional
example stringguardrail_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_attached
optional
trueis_default
optional
truemetadata
optional
name
optional
example namepriority
optional
123type
optional
GUARDRAIL_TYPE_UNKNOWNupdated_at
optional
2023-01-01T00:00:00Zuuid
optional
123e4567-e89b-12d3-a456-426614174000if_case
optional
example stringinstruction
optional
example stringAgent instruction. Instructions help your agent to perform its job effectively. See Write Effective Agent Instructions for best practices.
k
optional
123knowledge_bases
optional
Knowledge bases
Show child properties
added_to_agent_at
optional
2023-01-01T00:00:00ZTime when the knowledge base was added to the agent
created_at
optional
2023-01-01T00:00:00ZCreation date / time
database_id
optional
123e4567-e89b-12d3-a456-426614174000embedding_model_uuid
optional
123e4567-e89b-12d3-a456-426614174000is_public
optional
trueWhether the knowledge base is public or not
last_indexing_job
optional
IndexingJob description
name
optional
example nameName of knowledge base
project_id
optional
123e4567-e89b-12d3-a456-426614174000region
optional
example stringRegion code
reranking_config
optional
Configuration for cross-encoder reranking during retrieval.
tags
optional
["example string"]Tags to organize related resources
updated_at
optional
2023-01-01T00:00:00ZLast modified
user_id
optional
12345Id of user that created the knowledge base
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id for knowledge base
logging_config
optional
Show child properties
galileo_project_id
optional
123e4567-e89b-12d3-a456-426614174000Galileo project identifier
galileo_project_name
optional
example nameName of the Galileo project
insights_enabled
optional
trueWhether insights are enabled
insights_enabled_at
optional
2023-01-01T00:00:00ZTimestamp when insights were enabled
log_stream_id
optional
123e4567-e89b-12d3-a456-426614174000Identifier for the log stream
log_stream_name
optional
example nameName of the log stream
max_tokens
optional
123mcp_servers
optional
MCP (Model Context Protocol) servers attached to this agent
Show child properties
allowed_tools
optional
["example string"]Optional list of allowed tool names to expose from this server
authorization
optional
example stringOptional authorization header value for the MCP server
headers
optional
Optional additional headers to send to the MCP server
server_label
optional
example stringA label identifying this MCP server
server_url
optional
example stringThe URL of the MCP server
model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
benchmark_score
optional
Benchmark scores for this model, stored as arbitrary JSON
capabilities
optional
["example string"]High-level capabilities (e.g. tool_calling, vision, streaming)
context_window
optional
12345Context window size in tokens
created_at
optional
2023-01-01T00:00:00ZCreation date / time
endpoints
optional
Available endpoints and their capabilities
inference_name
optional
example nameInternally used name
inference_version
optional
example stringInternally used version
is_foundational
optional
trueTrue if it is a foundational model provided by do
kb_default_chunk_size
optional
123Default chunking size limit to show in UI
kb_max_chunk_size
optional
123Maximum chunk size limit of model
kb_min_chunk_size
optional
123Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase
lifecycle_status
optional
example stringLifecycle status of the model (internal, public-preview, active, deprecated, end_of_life)
metadata
optional
Additional meta data
modalities
optional
Input/output modalities
name
optional
example nameName of the model
parameter_count
optional
123Parameter count in billions
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANreasoning_efforts
optional
["example string"]Available reasoning efforts for this model
settings
optional
Playground settings derived from model metadata
thinking
optional
trueWhether this model supports extended thinking (Anthropic models)
type
optional
example stringModel type (chat, embedding, image, reasoning, coding)
updated_at
optional
2023-01-01T00:00:00ZLast modified
upload_complete
optional
trueModel has been fully uploaded
url
optional
example stringDownload url
usecases
optional
["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]Usecases of the model
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
version
optional
Version Information about a Model
model_provider_key
optional
Show child properties
api_key_uuid
optional
123e4567-e89b-12d3-a456-426614174000API key ID
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
name
optional
example nameName of the key
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_at
optional
2023-01-01T00:00:00ZKey last updated date
model_router
optional
Model router
Show child properties
config
optional
created_at
optional
2023-01-01T00:00:00ZCreation date / time
description
optional
example stringDescription
name
optional
example nameName of the model router
regions
optional
["example string"]Target regions for the router
updated_at
optional
2023-01-01T00:00:00ZLast modified
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
name
optional
example nameAgent name
openai_api_key
optional
OpenAI API Key Info
Show child properties
created_at
optional
2023-01-01T00:00:00ZKey creation date
created_by
optional
12345Created by user id from DO
deleted_at
optional
2023-01-01T00:00:00ZKey deleted date
models
optional
Models supported by the openAI api key
name
optional
example nameName
updated_at
optional
2023-01-01T00:00:00ZKey last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Uuid
parent_agents
optional
Parent agents
project_id
optional
123e4567-e89b-12d3-a456-426614174000provide_citations
optional
trueWhether the agent should provide in-response citations
reasoning_effort
optional
example stringThe reasoning effort for the agent
region
optional
example stringRegion code
retrieval_method
optional
RETRIEVAL_METHOD_UNKNOWN- RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown
- RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite
- RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back
- RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries
- RETRIEVAL_METHOD_NONE: The retrieval method is none
route_created_at
optional
2023-01-01T00:00:00ZCreation of route date / time
route_created_by
optional
12345route_name
optional
example nameRoute name
route_uuid
optional
123e4567-e89b-12d3-a456-426614174000tags
optional
["example string"]Agent tag to organize related resources
temperature
optional
123template
optional
Represents an AgentTemplate entity
Show child properties
created_at
optional
2023-01-01T00:00:00ZThe agent template's creation date
description
optional
example stringDeprecated - Use summary instead
guardrails
optional
List of guardrails associated with the agent template
instruction
optional
example stringInstructions for the agent template
k
optional
123The 'k' value for the agent template
knowledge_bases
optional
List of knowledge bases associated with the agent template
long_description
optional
The long description of the agent template
max_tokens
optional
123The max_tokens setting for the agent template
model
optional
Description of a Model
name
optional
example nameName of the agent template
short_description
optional
The short description of the agent template
summary
optional
example stringThe summary of the agent template
tags
optional
["example string"]List of tags associated with the agent template
temperature
optional
123The temperature setting for the agent template
template_type
optional
AGENT_TEMPLATE_TYPE_STANDARD- AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template
- AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template
top_p
optional
123The top_p setting for the agent template
updated_at
optional
2023-01-01T00:00:00ZThe agent template's last updated date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
thinking_token_budget
optional
123The thinking token budget for Anthropic extended thinking (0 = disabled)
top_p
optional
123updated_at
optional
2023-01-01T00:00:00ZLast modified
url
optional
example stringAccess your agent under this url
user_id
optional
12345Id of user that created the agent
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique agent id
version_hash
optional
example stringThe latest version of the agent
vpc_egress_ips
optional
["example string"]VPC Egress IPs
vpc_uuid
optional
"12345678-1234-1234-1234-123456789012"workspace
optional
created_at
optional
2023-01-01T00:00:00ZCreation date
created_by
optional
12345The id of user who created this workspace
created_by_email
optional
[email protected]The email of the user who created this workspace
deleted_at
optional
2023-01-01T00:00:00ZDeleted date
description
optional
example stringDescription of the workspace
evaluation_test_cases
optional
Evaluations
Show child properties
archived_at
optional
2023-01-01T00:00:00Zcreated_at
optional
2023-01-01T00:00:00Zcreated_by_user_email
optional
[email protected]created_by_user_id
optional
12345dataset
optional
Show child properties
created_at
optional
2023-01-01T00:00:00ZTime created at.
dataset_name
optional
example nameName of the dataset.
dataset_type
optional
EVALUATION_DATASET_TYPE_UNKNOWNdataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000UUID of the dataset.
file_size
optional
12345The size of the dataset uploaded file in bytes.
has_ground_truth
optional
trueDoes the dataset have a ground truth column?
row_count
optional
123Number of rows in the dataset.
dataset_name
optional
example namedataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000description
optional
example stringlatest_version_number_of_runs
optional
123metrics
optional
Show child properties
category
optional
METRIC_CATEGORY_UNSPECIFIEDdescription
optional
example stringevaluation_scope
optional
EVALUATION_SCOPE_UNSPECIFIEDScope that determines whether a metric belongs to agent evaluation or model evaluation. For backwards compatibility, UNSPECIFIED defaults to agent metrics only in list operations.
inverted
optional
trueIf true, the metric is inverted, meaning that a lower value is better.
is_metric_goal
optional
truemetric_name
optional
example namemetric_rank
optional
123metric_type
optional
METRIC_TYPE_UNSPECIFIEDmetric_uuid
optional
123e4567-e89b-12d3-a456-426614174000metric_value_type
optional
METRIC_VALUE_TYPE_UNSPECIFIEDrange_max
optional
123The maximum value for the metric.
range_min
optional
123The minimum value for the metric.
name
optional
example namestar_metric
optional
Show child properties
metric_uuid
optional
123e4567-e89b-12d3-a456-426614174000name
optional
example namesuccess_threshold
optional
123The success threshold for the star metric. This is a value that the metric must reach to be considered successful.
success_threshold_pct
optional
123The success threshold for the star metric. This is a percentage value between 0 and 100.
test_case_uuid
optional
123e4567-e89b-12d3-a456-426614174000total_runs
optional
123updated_at
optional
2023-01-01T00:00:00Zupdated_by_user_email
optional
[email protected]updated_by_user_id
optional
12345version
optional
123name
optional
example nameName of the workspace
updated_at
optional
2023-01-01T00:00:00ZUpdate date
uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"workspace": {
"agents": [],
"created_at": "2023-01-01T00:00:00Z",
"created_by": "12345",
"created_by_email": "[email protected]",
"deleted_at": "2023-01-01T00:00:00Z",
"description": "example string",
"evaluation_test_cases": [],
"name": "example name",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}GET List Evaluation Test Cases by Workspace
/v2/gen-ai/workspaces/{workspace_uuid}/evaluation_test_cases
Authorizations:
bearer_auth
(1 scope)
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 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 paneldoo_v1_for tokens generated by applications using the OAuth flowdor_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"
To list all evaluation test cases by a workspace, send a GET request to /v2/gen-ai/workspaces/{workspace_uuid}/evaluation_test_cases.
Path Parameters
workspace_uuid
required
"123e4567-e89b-12d3-a456-426614174000"Workspace UUID.
Request: /v2/gen-ai/workspaces/{workspace_uuid}/evaluation_test_cases
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/gen-ai/workspaces/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4/evaluation_test_cases"Responses
200
A successful response.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
evaluation_test_cases
optional
Show child properties
archived_at
optional
2023-01-01T00:00:00Zcreated_at
optional
2023-01-01T00:00:00Zcreated_by_user_email
optional
[email protected]created_by_user_id
optional
12345dataset
optional
Show child properties
created_at
optional
2023-01-01T00:00:00ZTime created at.
dataset_name
optional
example nameName of the dataset.
dataset_type
optional
EVALUATION_DATASET_TYPE_UNKNOWNdataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000UUID of the dataset.
file_size
optional
12345The size of the dataset uploaded file in bytes.
has_ground_truth
optional
trueDoes the dataset have a ground truth column?
row_count
optional
123Number of rows in the dataset.
dataset_name
optional
example namedataset_uuid
optional
123e4567-e89b-12d3-a456-426614174000description
optional
example stringlatest_version_number_of_runs
optional
123metrics
optional
Show child properties
category
optional
METRIC_CATEGORY_UNSPECIFIEDdescription
optional
example stringevaluation_scope
optional
EVALUATION_SCOPE_UNSPECIFIEDScope that determines whether a metric belongs to agent evaluation or model evaluation. For backwards compatibility, UNSPECIFIED defaults to agent metrics only in list operations.
inverted
optional
trueIf true, the metric is inverted, meaning that a lower value is better.
is_metric_goal
optional
truemetric_name
optional
example namemetric_rank
optional
123metric_type
optional
METRIC_TYPE_UNSPECIFIEDmetric_uuid
optional
123e4567-e89b-12d3-a456-426614174000metric_value_type
optional
METRIC_VALUE_TYPE_UNSPECIFIEDrange_max
optional
123The maximum value for the metric.
range_min
optional
123The minimum value for the metric.
name
optional
example namestar_metric
optional
Show child properties
metric_uuid
optional
123e4567-e89b-12d3-a456-426614174000name
optional
example namesuccess_threshold
optional
123The success threshold for the star metric. This is a value that the metric must reach to be considered successful.
success_threshold_pct
optional
123The success threshold for the star metric. This is a percentage value between 0 and 100.
test_case_uuid
optional
123e4567-e89b-12d3-a456-426614174000total_runs
optional
123updated_at
optional
2023-01-01T00:00:00Zupdated_by_user_email
optional
[email protected]updated_by_user_id
optional
12345version
optional
123
401
Authentication failed due to invalid credentials.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
404
The resource was not found.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429
The API rate limit has been exceeded.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500
There was a server error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
default
There was an unexpected error.
ratelimit-limit
The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute.
ratelimit-remaining
The number of requests in your hourly quota that remain before you hit your request limit. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
ratelimit-reset
The time when the oldest request will expire. The value is given in Unix epoch time. See https://docs.digitalocean.com/reference/api/reference/#rate-limit for information about how requests expire.
application/json
id
required
not_foundA short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
message
required
The resource you were accessing could not be found.A message providing additional information about the error, including details to help resolve it when possible.
request_id
optional
4d9d8375-3c56-4925-a3e7-eb137fed17e9Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Response
{
"evaluation_test_cases": [
{
"archived_at": "2023-01-01T00:00:00Z",
"created_at": "2023-01-01T00:00:00Z",
"created_by_user_email": "[email protected]",
"created_by_user_id": "12345",
"dataset_name": "example name",
"dataset_uuid": "123e4567-e89b-12d3-a456-426614174000",
"description": "example string",
"latest_version_number_of_runs": 123,
"metrics": [],
"name": "example name",
"test_case_uuid": "123e4567-e89b-12d3-a456-426614174000",
"total_runs": 123,
"updated_at": "2023-01-01T00:00:00Z",
"updated_by_user_email": "[email protected]",
"updated_by_user_id": "12345",
"version": 123
}
]
}{
"id": "unauthorized",
"message": "Unable to authenticate you."
}{
"id": "not_found",
"message": "The resource you requested could not be found."
}{
"id": "too_many_requests",
"message": "API rate limit exceeded."
}{
"id": "server_error",
"message": "Unexpected server-side error"
}{
"id": "example_error",
"message": "some error message"
}