Use Daytona in Sim to create and manage sandboxes, execute shell commands or Python, JavaScript, and TypeScript code, transfer files, and clone repositories. Authenticate with a Daytona API key. Stop or delete sandboxes when work finishes, and configure auto-stop and auto-delete intervals to manage idle resources.
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 Type Required Description apiKeystring Yes Daytona API key snapshotstring No ID or name of the snapshot to create the sandbox from (uses default if empty) namestring No Name for the sandbox (defaults to the sandbox ID) targetstring No Region where the sandbox will be created (e.g., us, eu) userstring No User associated with the sandbox envjson No Environment variables to set in the sandbox as key-value pairs labelsjson No Labels to attach to the sandbox as key-value pairs cpunumber No CPU cores to allocate to the sandbox memorynumber No Memory to allocate to the sandbox in GB disknumber No Disk space to allocate to the sandbox in GB autoStopIntervalnumber No Auto-stop interval in minutes (0 disables auto-stop) autoArchiveIntervalnumber No Auto-archive interval in minutes (0 uses the maximum interval) autoDeleteIntervalnumber No Auto-delete interval in minutes (negative disables, 0 deletes immediately on stop) publicboolean No Whether the sandbox HTTP preview is publicly accessible
Parameter Type Description sandboxjson The created sandbox
List Daytona sandboxes in the organization
Parameter Type Required Description apiKeystring Yes Daytona API key limitnumber No Maximum number of sandboxes to return (1-200) namestring No Filter sandboxes by name prefix (case-insensitive) labelsjson No Filter sandboxes by labels as key-value pairs cursorstring No Pagination cursor from a previous response
Parameter Type Description sandboxesarray Sandboxes in the organization nextCursorstring Cursor for the next page of results
Get details of a Daytona sandbox
Parameter Type Required Description apiKeystring Yes Daytona API key sandboxIdstring Yes ID or name of the sandbox
Parameter Type Description sandboxjson The sandbox details
Start a stopped Daytona sandbox
Parameter Type Required Description apiKeystring Yes Daytona API key sandboxIdstring Yes ID or name of the sandbox
Parameter Type Description sandboxjson The started sandbox
Stop a running Daytona sandbox
Parameter Type Required Description apiKeystring Yes Daytona API key sandboxIdstring Yes ID or name of the sandbox
Parameter Type Description sandboxjson The stopped sandbox
Delete a Daytona sandbox
Parameter Type Required Description apiKeystring Yes Daytona API key sandboxIdstring Yes ID or name of the sandbox
Parameter Type Description sandboxjson The deleted sandbox
Execute a shell command inside a Daytona sandbox
Parameter Type Required Description apiKeystring Yes Daytona API key sandboxIdstring Yes ID of the sandbox to execute the command in commandstring Yes Shell command to execute cwdstring No Working directory for the command (defaults to the sandbox working directory) envjson No Environment variables to set for the command as key-value pairs timeoutnumber No Timeout in seconds (defaults to 10 seconds)
Parameter Type Description 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 Type Required Description apiKeystring Yes Daytona API key sandboxIdstring Yes ID of the sandbox to run the code in codestring Yes Code to run languagestring Yes Language of the code: python, javascript, or typescript envjson No Environment variables to set for the run as key-value pairs timeoutnumber No Timeout in seconds (defaults to 10 seconds)
Parameter Type Description 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 Type Required Description apiKeystring Yes Daytona API key sandboxIdstring Yes ID of the sandbox to upload the file to destinationPathstring Yes Destination path in the sandbox (a trailing slash uploads into that directory using the file name) filefile No The file to upload fileNamestring No Optional file name override
Parameter Type Description 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 Type Required Description apiKeystring Yes Daytona API key sandboxIdstring Yes ID of the sandbox to download the file from filePathstring Yes Path of the file in the sandbox
Parameter Type Description 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 Type Required Description apiKeystring Yes Daytona API key sandboxIdstring Yes ID of the sandbox to list files in pathstring No Directory path to list (defaults to the sandbox working directory)
Parameter Type Description 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 Type Required Description apiKeystring Yes Daytona API key sandboxIdstring Yes ID of the sandbox to clone the repository into urlstring Yes URL of the Git repository to clone pathstring Yes Path in the sandbox to clone the repository into branchstring No Branch to clone (defaults to the default branch) commitIdstring No Specific commit to check out after cloning usernamestring No Username for authenticating to private repositories passwordstring No Password or personal access token for private repositories
Parameter Type Description repoUrlstring URL of the cloned repository clonePathstring Path the repository was cloned into