|
1 | 1 | --- |
2 | 2 | title: Depot API Overview |
3 | 3 | ogTitle: Overview of the Depot API |
4 | | -description: Create and manage Depot projects and builders for running image builds on behalf of your own users. |
| 4 | +description: Programmatic access to Depot, from running container image builds on behalf of your own users to managing Depot CI workflows, runs, and jobs. |
5 | 5 | --- |
6 | 6 |
|
7 | | -The Depot API is a collection of endpoints that grant access to the underlying architecture. Organizations can manage projects, acquire BuildKit endpoints, and run image builds for their applications or services programmatically. |
| 7 | +import {NoteCallout} from '~/components/blog/NoteCallout' |
8 | 8 |
|
9 | | -The API uses Connect, offering [multiprotocol support](https://connectrpc.com/docs/introduction#seamless-multi-protocol-support) for gRPC and HTTP JSON. Depot provides the following SDKs for interacting with the API: |
| 9 | +The Depot APIs are collections of endpoints that grant access to the underlying architecture and primitives. The APIs use Connect, offering [multiprotocol support](https://connectrpc.com/docs/introduction#seamless-multi-protocol-support) for gRPC and HTTP JSON. |
10 | 10 |
|
11 | | -- [Node](https://github.com/depot/sdk-node) |
12 | | -- [Go](https://github.com/depot/depot-go) |
| 11 | +## Depot CI API |
| 12 | + |
| 13 | +[Depot CI](/docs/ci/overview) has its own API for working with workflows programmatically: dispatching and rerunning workflows, listing runs, checking status, fetching logs and metrics, retrying and cancelling jobs, and downloading artifacts. See the [Depot CI API reference](/docs/api/ci/reference) for all endpoints and examples. |
| 14 | + |
| 15 | +## Container Builds API |
| 16 | + |
| 17 | +Organizations can manage projects, acquire BuildKit endpoints, and run image builds for their applications or services programmatically. Depot provides the following SDKs for interacting with the Container Builds API: |
| 18 | + |
| 19 | +- [`depot/sdk-node`](https://github.com/depot/sdk-node) |
| 20 | +- [`depot/depot-go`](https://github.com/depot/depot-go) |
13 | 21 |
|
14 | 22 | For detailed documentation on all available endpoints, parameters, and examples, see the [SDK Reference](/docs/api/sdk-reference). |
15 | 23 |
|
16 | | -## Authentication |
| 24 | +### Security |
17 | 25 |
|
18 | | -Authenticate to the API using an `Authorization` header with an Organization Token that you generate in your [organization settings](/orgs/_/settings). See the [Authentication docs](/docs/api/authentication) for more details. |
| 26 | +If you're using the Container Builds API to build untrusted code, you need **one Depot project per customer entity in your organization**. A separate project per customer ensures secure cache isolation so that one customer's build can't access another customer's build cache. |
| 27 | + |
| 28 | +## Sandbox API |
19 | 29 |
|
20 | | -## Security |
| 30 | +<NoteCallout variant="beta" title> |
| 31 | + The Sandbox SDK is in private beta. Methods might change before the SDK becomes generally available. Sandboxes are |
| 32 | + billed per vCPU-second at the Depot CI compute rate. [Contact us](/help) to request access for your organization. |
| 33 | +</NoteCallout> |
21 | 34 |
|
22 | | -If you're using the Depot API to build untrusted code, you need **one Depot project per customer entity in your organization**. A separate project per customer ensures secure cache isolation so that one customer's build can't access another customer's build cache. |
| 35 | +Run untrusted or agent-generated code in isolated, ephemeral sandboxes: create a sandbox, run commands and stream their output, and work with the sandbox file system through a `node:fs/promises`-shaped interface. Depot provides the following SDK for interacting with the Sandbox API: |
| 36 | + |
| 37 | +- [`depot/sandbox-sdk`](https://github.com/depot/sandbox-sdk) |
| 38 | + |
| 39 | +For detailed documentation on all available methods, parameters, and examples, see the [Sandbox SDK reference](/docs/api/sandbox-sdk-reference). |
| 40 | + |
| 41 | +Sandboxes are billed by compute usage, at the same per-second rate as Depot CI compute: the number of vCPUs you request x how long the sandbox runs, with no one-minute minimum. See the Depot CI sandbox table on the [pricing page](/pricing) for details. |
| 42 | + |
| 43 | +## Authentication |
| 44 | + |
| 45 | +Authenticate to the API using an `Authorization` header with an Organization Token that you generate in your [organization settings](/orgs/_/settings). See the [Authentication docs](/docs/api/authentication) for more details. |
0 commit comments