Skip to main content

At a glance

Credentials

Set these per environment. See Connect an integration.
VariableRequiredDescription
DAYTONA_API_KEYYesDaytona API key created in the Dashboard under API Keys; same env var used by the Daytona SDKs and CLI Docs.

Setup

  1. Create a Daytona account: Sign up at https://app.daytona.io - new accounts include free usage credits, so no payment method is needed to test.
  2. Create an API key: In the Daytona Dashboard go to API Keys and create a new key (it is shown only once at creation time).
  3. Set the environment variable: Copy the key into your .env as DAYTONA_API_KEY.
  4. Verify access: Run List Sandboxes to confirm the key works, then create a sandbox and execute a simple command like echo hello.
  • The API is served on https://app.daytona.io/api and authenticates with Authorization: Bearer <API key>
  • Sandboxes auto-stop after the autoStopInterval (default 15 minutes) unless set to 0
  • Execute Command requires the sandbox to be in the started state
  • Execute Command uses the legacy /toolbox REST route, which Daytona marks deprecated in favor of its SDKs; the richer per-sandbox toolbox API (files, git, sessions) is SDK-first and not covered here
  • Creating sandboxes consumes billable compute - delete sandboxes you no longer need
Provider API reference: https://www.daytona.io/docs/en/tools/api/

Tools

ToolAccessDescription
List SandboxesReadList sandboxes in the organization with optional name, label, and state filtering
Create SandboxWriteCreate a new sandbox, optionally from a snapshot and with custom resources (starts billable compute)
Get SandboxReadGet sandbox details by ID or name, including state, snapshot, resources, and timestamps
Delete SandboxWriteDelete a sandbox by ID or name, discarding its state and filesystem
Execute CommandWriteExecute a shell command inside a running sandbox via the toolbox and return its exit code and output (legacy REST route; Daytona’s current toolbox API is SDK-first)
Start SandboxWriteStart a stopped sandbox - required before Execute Command, since sandboxes auto-stop after the autoStopInterval (15 minutes by default)
Stop SandboxWriteStop a running sandbox to pause billable compute without destroying its state
List SnapshotsReadList available snapshots (sandbox base images) - use these names or IDs in the snapshot field of Create Sandbox

Example prompts

  • List my Daytona sandboxes with their state, snapshot, and resources.
  • Create a new Daytona sandbox and confirm it reaches the started state.
  • Run the shell command I give you inside the Daytona sandbox I name and show me the output and exit code.