Reference for the resources and methods in DoTs, the official TypeScript client for the DigitalOcean API.
DoTs
Last verified 20 Nov 2026
DoTs is DigitalOcean’s official TypeScript client library for the DigitalOcean API, which lets you programmatically manage Droplets, Kubernetes clusters, databases, and other DigitalOcean resources with conventional HTTP requests. It is generated from the DigitalOcean OpenAPI specification.
Installation
Prerequisites: Node.js 18+, TypeScript 5+, and "type": "module" in your package.json.
Install the package:
npm i @digitalocean/dotsQuickstart
Authenticate with a personal access token. Set your token as an environment variable before running the example:
export DIGITALOCEAN_TOKEN=<your-api-token>Create a client and list your Droplets:
import {
createDigitalOceanClient,
DigitalOceanApiKeyAuthenticationProvider,
FetchRequestAdapter,
} from "@digitalocean/dots";
const token = process.env.DIGITALOCEAN_TOKEN;
const authProvider = new DigitalOceanApiKeyAuthenticationProvider(token!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);
const resp = await client.v2.droplets.get();
if (resp?.droplets) {
for (const droplet of resp.droplets) {
console.log(`${droplet.id}: ${droplet.name}`);
}
}For serverless inference, use InferenceClient from @digitalocean/dots. See the Inference how-tos for examples.
For managed agents, use the @digitalocean/dots/harness-runtime module to create sessions from agent manifests, stream agent activity, respond to approval requests, fork sessions, keep files in a persistent workspace, and start runs from schedules or webhooks.