---
title: DoTs
description: Official TypeScript client for the DigitalOcean API. Install with npm, authenticate with a personal access token, and call API operations with the …
product: Reference
url: https://docs.digitalocean.com/reference/dots/
last_updated: "2026-10-21"
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# DoTs

DoTs is DigitalOcean’s official TypeScript client library for the DigitalOcean API.

## Installation

**Prerequisites:** Node.js 18+, TypeScript 5+, and `"type": "module"` in your `package.json`.

Install the package:

```bash
npm i @digitalocean/dots
```

## Quickstart

Authenticate with a [personal access token](https://docs.digitalocean.com/reference/api/create-personal-access-token/index.html.md). Set your token as an environment variable before running the example:

```bash
export DIGITALOCEAN_TOKEN=<your-api-token>
```

Create a client and list your Droplets:

```typescript
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](https://docs.digitalocean.com/products/inference/how-to/index.html.md) for examples.

## More Information

[GitHub - digitalocean/dots](https://github.com/digitalocean/dots): The DoTs GitHub repository.

[SDK and Client Libraries](https://docs.digitalocean.com/reference/libraries/index.html.md): All official and community client libraries.