---
title: "Create a sandbox"
method: POST
path: "/v1/sandboxes"
tags: ["Sandboxes"]
---

# Create a sandbox

`POST /v1/sandboxes`

## Request

- Base URL: `https://api.dexto.ai`
- URL: `https://api.dexto.ai/v1/sandboxes`
- Auth: HTTP bearer

Create a named sandbox in the API key's Cloud project, not started. A name that already exists returns that sandbox with 200, so retries never create a second one; the same name with another size is a 409. The body is required.

## Headers

- `Idempotency-Key` string, required

## Request body

- object
  - `name` string, required: Unique among the project's sandboxes: 1-63 lowercase letters, digits and hyphens, starting and ending with a letter or digit.
  - `size` 'large', required: large is 4 vCPU and 8 GiB of memory. More sizes will follow.

## Response `200`

Returned the existing sandbox with this name.

- object
  - `created_at` string, date-time, required
  - `id` string, uuid, required
  - `name` string, required
  - `object` 'sandbox', required
  - `size` 'small' | 'large', required
  - `status` 'not_started' | 'running' | 'paused' | 'terminated', required: terminated means the workspace is gone; starting the sandbox again begins with an empty one.
  - `updated_at` string, date-time, required

## Other responses

- `201`: Created the sandbox.
- `400`: Invalid JSON or request fields.
- `401`: Missing or invalid API key.
- `402`: The account has insufficient credits.
- `403`: The account cannot perform this operation.
- `404`: The requested resource was not found.
- `409`: The request conflicts with existing resource state.
- `429`: The account exceeded this operation's request rate.
- `500`: Unexpected Dexto failure.
- `502`: The upstream model provider failed.
- `503`: A required Dexto service is temporarily unavailable.

---

[API](https://skmtc.dev/dexto/apis/dexto-api.md) - [All operations](https://skmtc.dev/dexto/apis/dexto-api/llms.txt) - [OpenAPI document](https://skmtc.dev/dexto/apis/dexto-api/revisions/47eb880cffa5?raw)
