Daytona Run code and commands in secure cloud sandboxes
Integrate Daytona into your workflow to run AI-generated code in secure, isolated sandboxes. Create and manage sandboxes, execute shell commands, run Python, JavaScript, or TypeScript code, transfer files, and clone Git repositories.
Create a new Daytona sandbox for running AI-generated code in isolation
Parameter Typ Erforderlich Beschreibung apiKeystring Ja Daytona API key snapshotstring Nein ID or name of the snapshot to create the sandbox from (uses default if empty) namestring Nein Name for the sandbox (defaults to the sandbox ID) targetstring Nein Region where the sandbox will be created (e.g., us, eu) userstring Nein User associated with the sandbox envjson Nein Environment variables to set in the sandbox as key-value pairs labelsjson Nein Labels to attach to the sandbox as key-value pairs cpunumber Nein CPU cores to allocate to the sandbox memorynumber Nein Memory to allocate to the sandbox in GB disknumber Nein Disk space to allocate to the sandbox in GB autoStopIntervalnumber Nein Auto-stop interval in minutes (0 disables auto-stop) autoArchiveIntervalnumber Nein Auto-archive interval in minutes (0 uses the maximum interval) autoDeleteIntervalnumber Nein Auto-delete interval in minutes (negative disables, 0 deletes immediately on stop) publicboolean Nein Whether the sandbox HTTP preview is publicly accessible
Parameter Typ Beschreibung sandboxjson The created sandbox
List Daytona sandboxes in the organization
Parameter Typ Erforderlich Beschreibung apiKeystring Ja Daytona API key limitnumber Nein Maximum number of sandboxes to return (1-200) namestring Nein Filter sandboxes by name prefix (case-insensitive) labelsjson Nein Filter sandboxes by labels as key-value pairs cursorstring Nein Pagination cursor from a previous response
Parameter Typ Beschreibung sandboxesarray Sandboxes in the organization nextCursorstring Cursor for the next page of results
Get details of a Daytona sandbox
Parameter Typ Erforderlich Beschreibung apiKeystring Ja Daytona API key sandboxIdstring Ja ID or name of the sandbox
Parameter Typ Beschreibung sandboxjson The sandbox details
Start a stopped Daytona sandbox
Parameter Typ Erforderlich Beschreibung apiKeystring Ja Daytona API key sandboxIdstring Ja ID or name of the sandbox
Parameter Typ Beschreibung sandboxjson The started sandbox
Stop a running Daytona sandbox
Parameter Typ Erforderlich Beschreibung apiKeystring Ja Daytona API key sandboxIdstring Ja ID or name of the sandbox
Parameter Typ Beschreibung sandboxjson The stopped sandbox
Delete a Daytona sandbox
Parameter Typ Erforderlich Beschreibung apiKeystring Ja Daytona API key sandboxIdstring Ja ID or name of the sandbox
Parameter Typ Beschreibung sandboxjson The deleted sandbox
Execute a shell command inside a Daytona sandbox
Parameter Typ Erforderlich Beschreibung apiKeystring Ja Daytona API key sandboxIdstring Ja ID of the sandbox to execute the command in commandstring Ja Shell command to execute cwdstring Nein Working directory for the command (defaults to the sandbox working directory) envjson Nein Environment variables to set for the command as key-value pairs timeoutnumber Nein Timeout in seconds (defaults to 10 seconds)
Parameter Typ Beschreibung exitCodenumber Exit code of the command (-1 if missing from the response) resultstring Combined stdout/stderr output of the command
Run Python, JavaScript, or TypeScript code inside a Daytona sandbox
Parameter Typ Erforderlich Beschreibung apiKeystring Ja Daytona API key sandboxIdstring Ja ID of the sandbox to run the code in codestring Ja Code to run languagestring Ja Language of the code: python, javascript, or typescript envjson Nein Environment variables to set for the run as key-value pairs timeoutnumber Nein Timeout in seconds (defaults to 10 seconds)
Parameter Typ Beschreibung exitCodenumber Exit code of the code run (-1 if missing from the response) resultstring Combined stdout/stderr output of the code run artifactsjson Artifacts produced by the run (e.g., matplotlib charts)
Upload a file to a Daytona sandbox
Parameter Typ Erforderlich Beschreibung apiKeystring Ja Daytona API key sandboxIdstring Ja ID of the sandbox to upload the file to destinationPathstring Ja Destination path in the sandbox (a trailing slash uploads into that directory using the file name) filefile Nein The file to upload fileContentstring Nein Legacy: base64 encoded file content fileNamestring Nein Optional file name override
Parameter Typ Beschreibung uploadedPathstring Path of the uploaded file in the sandbox namestring Name of the uploaded file sizenumber Size of the uploaded file in bytes
Download a file from a Daytona sandbox
Parameter Typ Erforderlich Beschreibung apiKeystring Ja Daytona API key sandboxIdstring Ja ID of the sandbox to download the file from filePathstring Ja Path of the file in the sandbox
Parameter Typ Beschreibung filefile Downloaded file stored in execution files namestring Name of the downloaded file mimeTypestring MIME type of the downloaded file sizenumber Size of the downloaded file in bytes
List files in a directory of a Daytona sandbox
Parameter Typ Erforderlich Beschreibung apiKeystring Ja Daytona API key sandboxIdstring Ja ID of the sandbox to list files in pathstring Nein Directory path to list (defaults to the sandbox working directory)
Parameter Typ Beschreibung filesarray Files and directories at the given path ↳ name string File or directory name ↳ isDir boolean Whether the entry is a directory ↳ size number Size in bytes ↳ mode string File mode string ↳ permissions string Permission string ↳ owner string Owning user ↳ group string Owning group ↳ modifiedAt string Last modification timestamp
Clone a Git repository into a Daytona sandbox
Parameter Typ Erforderlich Beschreibung apiKeystring Ja Daytona API key sandboxIdstring Ja ID of the sandbox to clone the repository into urlstring Ja URL of the Git repository to clone pathstring Ja Path in the sandbox to clone the repository into branchstring Nein Branch to clone (defaults to the default branch) commitIdstring Nein Specific commit to check out after cloning usernamestring Nein Username for authenticating to private repositories passwordstring Nein Password or personal access token for private repositories
Parameter Typ Beschreibung repoUrlstring URL of the cloned repository clonePathstring Path the repository was cloned into