GradientAI Platform
Generated on 3 Apr 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.
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-426614174000created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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,
"name": "My Agent",
"project_id": "12345678-1234-1234-1234-123456789012",
"provide_citations": true,
"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,
"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
model_provider_key_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
region
optional
"tor1"The DigitalOcean region to deploy your agent in
tags
optional
["example string"]Agent tag to organize related resources
workspace_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"
],
"model_provider_key_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\"",
"region": "\"tor1\"",
"tags": [
"example string"
],
"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
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
123model
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-426614174000created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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,
"model": {
"created_at": "2023-01-01T00:00:00Z",
"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,
"name": "example name",
"parent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"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"
},
"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,
"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"
},
"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
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
123model
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-426614174000created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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,
"model": {
"created_at": "2023-01-01T00:00:00Z",
"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,
"name": "example name",
"parent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"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"
},
"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,
"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"
},
"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
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
123model
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-426614174000created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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,
"model": {
"created_at": "2023-01-01T00:00:00Z",
"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,
"name": "example name",
"parent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"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"
},
"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,
"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"
},
"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
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
123model
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-426614174000created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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,
"model": {
"created_at": "2023-01-01T00:00:00Z",
"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,
"name": "example name",
"parent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"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"
},
"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,
"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"
},
"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
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
123model
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-426614174000created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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,
"model": {
"created_at": "2023-01-01T00:00:00Z",
"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,
"name": "example name",
"parent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"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"
},
"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,
"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"
},
"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
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
123model
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-426614174000created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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,
"model": {
"created_at": "2023-01-01T00:00:00Z",
"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,
"name": "example name",
"parent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"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"
},
"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,
"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"
},
"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
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
123model
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-426614174000created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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,
"model": {
"created_at": "2023-01-01T00:00:00Z",
"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,
"name": "example name",
"parent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"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"
},
"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,
"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"
},
"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
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
123model
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-426614174000created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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,
"model": {
"created_at": "2023-01-01T00:00:00Z",
"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,
"name": "example name",
"parent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"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"
},
"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,
"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"
},
"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
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
123model
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-426614174000created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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,
"model": {
"created_at": "2023-01-01T00:00:00Z",
"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,
"name": "example name",
"parent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"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"
},
"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,
"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"
},
"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
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
123model
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-426614174000created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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,
"model": {
"created_at": "2023-01-01T00:00:00Z",
"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,
"name": "example name",
"parent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"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"
},
"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,
"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"
},
"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
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.
model_provider_key_uuid
optional
"12345678-1234-1234-1234-123456789012"Optional Model Provider uuid for use with provider models
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
trueretrieval_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"]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.
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.
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\"",
"conversation_logs_enabled": true,
"description": "\"My Agent Description\"",
"instruction": "\"You are an agent who thinks deeply about the world\"",
"k": 5,
"max_tokens": 100,
"model_provider_key_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,
"retrieval_method": "RETRIEVAL_METHOD_UNKNOWN",
"tags": [
"example string"
],
"temperature": 0.7,
"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
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
123model
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-426614174000created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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,
"model": {
"created_at": "2023-01-01T00:00:00Z",
"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,
"name": "example name",
"parent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"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"
},
"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,
"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"
},
"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
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
123model
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-426614174000created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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,
"model": {
"created_at": "2023-01-01T00:00:00Z",
"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,
"name": "example name",
"parent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"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"
},
"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,
"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"
},
"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
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
123model
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-426614174000created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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,
"name": "example name",
"parent_agents": [],
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"provide_citations": true,
"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,
"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
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
123model
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-426614174000created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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,
"model": {
"created_at": "2023-01-01T00:00:00Z",
"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,
"name": "example name",
"parent_uuid": "123e4567-e89b-12d3-a456-426614174000",
"provider": "MODEL_PROVIDER_DIGITALOCEAN",
"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"
},
"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,
"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"
},
"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
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
123model
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-426614174000created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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,
"name": "example name",
"parent_agents": [],
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"provide_citations": true,
"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,
"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"
}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 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 stringinverted
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",
"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.
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.
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_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 stringinverted
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_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 stringinverted
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_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
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
The data sources to use for this knowledge base. See Organize Data Sources for more information on data sources 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_SECTION_BASEDThe chunking algorithm to use for processing data sources.
Note: This feature requires enabling the knowledgebase enhancements feature preview flag.
chunking_options
optional
Configuration options for the chunking algorithm.
Note: This feature requires enabling the knowledgebase enhancements feature preview flag.
Show child properties
child_chunk_size
optional
350Hierarchical options
max_chunk_size
optional
750Section_Based and Fixed_Length 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.
tags
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_SECTION_BASED",
"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\"",
"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"
}'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
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",
"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_SECTION_BASEDThe chunking algorithm to use for processing data sources.
Note: This feature requires enabling the knowledgebase enhancements feature preview flag.
chunking_options
optional
Configuration options for the chunking algorithm.
Note: This feature requires enabling the knowledgebase enhancements feature preview flag.
Show child properties
child_chunk_size
optional
350Hierarchical options
max_chunk_size
optional
750Section_Based and Fixed_Length 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_SECTION_BASED",
"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_SECTION_BASEDThe chunking algorithm to use for processing data sources.
Note: This feature requires enabling the knowledgebase enhancements feature preview flag.
chunking_options
optional
Configuration options for the chunking algorithm.
Note: This feature requires enabling the knowledgebase enhancements feature preview flag.
Show child properties
child_chunk_size
optional
350Hierarchical options
max_chunk_size
optional
750Section_Based and Fixed_Length 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_SECTION_BASED",
"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_SECTION_BASEDThe chunking algorithm to use for processing data sources.
Note: This feature requires enabling the knowledgebase enhancements feature preview flag.
chunking_options
optional
Configuration options for the chunking algorithm.
Note: This feature requires enabling the knowledgebase enhancements feature preview flag.
Show child properties
child_chunk_size
optional
350Hierarchical options
max_chunk_size
optional
750Section_Based and Fixed_Length 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_SECTION_BASED",
"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_SECTION_BASEDThe chunking algorithm to use for processing data sources.
Note: This feature requires enabling the knowledgebase enhancements feature preview flag.
chunking_options
optional
Configuration options for the chunking algorithm.
Note: This feature requires enabling the knowledgebase enhancements feature preview flag.
Show child properties
child_chunk_size
optional
350Hierarchical options
max_chunk_size
optional
750Section_Based and Fixed_Length options
parent_chunk_size
optional
1000Hierarchical options
semantic_threshold
optional
0.5Semantic options
data_source_uuid
optional
98765432-1234-1234-1234-123456789012Data Source ID (Path Parameter)
knowledge_base_uuid
optional
12345678-1234-1234-1234-123456789012Knowledge Base ID (Path Parameter)
Request: /v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources/{data_source_uuid}
{
"chunking_algorithm": "CHUNKING_ALGORITHM_SECTION_BASED",
"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_SECTION_BASEDThe chunking algorithm to use for processing data sources.
Note: This feature requires enabling the knowledgebase enhancements feature preview flag.
chunking_options
optional
Configuration options for the chunking algorithm.
Note: This feature requires enabling the knowledgebase enhancements feature preview flag.
Show child properties
child_chunk_size
optional
350Hierarchical options
max_chunk_size
optional
750Section_Based and Fixed_Length 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_SECTION_BASED",
"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
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",
"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, optiona.
embedding_model_uuid
optional
"12345678-1234-1234-1234-123456789012"Identifier for the foundation model.
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
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\"",
"embedding_model_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"name": "\"My Knowledge Base\"",
"project_id": "\"12345678-1234-1234-1234-123456789012\"",
"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"
}'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
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",
"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"
}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-426614174000created_at
optional
2021-01-01T00:00:00ZCreation date / time
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
name
optional
Llama 3.3 Instruct (70B)Display name of the model
parent_uuid
optional
"12345678-1234-1234-1234-123456789012"Unique id of the model, this model is based on
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": [
{
"created_at": "2021-01-01T00:00:00Z",
"id": "llama3.3-70b-instruct",
"is_foundational": true,
"kb_default_chunk_size": 123,
"kb_max_chunk_size": 123,
"kb_min_chunk_size": 123,
"name": "Llama 3.3 Instruct (70B)",
"parent_uuid": "\"12345678-1234-1234-1234-123456789012\"",
"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"
}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-426614174000created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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-426614174000created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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-426614174000created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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-426614174000created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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-426614174000created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
123model
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-426614174000created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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,
"name": "example name",
"parent_agents": [],
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"provide_citations": true,
"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,
"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
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
123model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
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
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_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 stringinverted
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
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
123model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
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
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_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 stringinverted
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
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
123model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
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
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_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 stringinverted
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
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
123model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
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
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_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 stringinverted
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
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
123model
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-426614174000created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
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
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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,
"name": "example name",
"parent_agents": [],
"project_id": "123e4567-e89b-12d3-a456-426614174000",
"provide_citations": true,
"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,
"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
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
123model
optional
Description of a Model
Show child properties
agreement
optional
Agreement Description
created_at
optional
2023-01-01T00:00:00ZCreation date / time
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
metadata
optional
Additional meta data
name
optional
example nameName of the model
parent_uuid
optional
123e4567-e89b-12d3-a456-426614174000Unique id of the model, this model is based on
provider
optional
MODEL_PROVIDER_DIGITALOCEANupdated_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
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
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
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_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 stringinverted
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_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 stringinverted
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"
}