AptlyStar

Daytona

Run code and commands in secure cloud sandboxes

Instructions d'utilisation

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.

Outils

daytona_create_sandbox

Create a new Daytona sandbox for running AI-generated code in isolation

Entrée

ParamètreTypeObligatoireDescription
apiKeystringOuiDaytona API key
snapshotstringNonID or name of the snapshot to create the sandbox from (uses default if empty)
namestringNonName for the sandbox (defaults to the sandbox ID)
targetstringNonRegion where the sandbox will be created (e.g., us, eu)
userstringNonUser associated with the sandbox
envjsonNonEnvironment variables to set in the sandbox as key-value pairs
labelsjsonNonLabels to attach to the sandbox as key-value pairs
cpunumberNonCPU cores to allocate to the sandbox
memorynumberNonMemory to allocate to the sandbox in GB
disknumberNonDisk space to allocate to the sandbox in GB
autoStopIntervalnumberNonAuto-stop interval in minutes (0 disables auto-stop)
autoArchiveIntervalnumberNonAuto-archive interval in minutes (0 uses the maximum interval)
autoDeleteIntervalnumberNonAuto-delete interval in minutes (negative disables, 0 deletes immediately on stop)
publicbooleanNonWhether the sandbox HTTP preview is publicly accessible

Sortie

ParamètreTypeDescription
sandboxjsonThe created sandbox

daytona_list_sandboxes

List Daytona sandboxes in the organization

Entrée

ParamètreTypeObligatoireDescription
apiKeystringOuiDaytona API key
limitnumberNonMaximum number of sandboxes to return (1-200)
namestringNonFilter sandboxes by name prefix (case-insensitive)
labelsjsonNonFilter sandboxes by labels as key-value pairs
cursorstringNonPagination cursor from a previous response

Sortie

ParamètreTypeDescription
sandboxesarraySandboxes in the organization
nextCursorstringCursor for the next page of results

daytona_get_sandbox

Get details of a Daytona sandbox

Entrée

ParamètreTypeObligatoireDescription
apiKeystringOuiDaytona API key
sandboxIdstringOuiID or name of the sandbox

Sortie

ParamètreTypeDescription
sandboxjsonThe sandbox details

daytona_start_sandbox

Start a stopped Daytona sandbox

Entrée

ParamètreTypeObligatoireDescription
apiKeystringOuiDaytona API key
sandboxIdstringOuiID or name of the sandbox

Sortie

ParamètreTypeDescription
sandboxjsonThe started sandbox

daytona_stop_sandbox

Stop a running Daytona sandbox

Entrée

ParamètreTypeObligatoireDescription
apiKeystringOuiDaytona API key
sandboxIdstringOuiID or name of the sandbox

Sortie

ParamètreTypeDescription
sandboxjsonThe stopped sandbox

daytona_delete_sandbox

Delete a Daytona sandbox

Entrée

ParamètreTypeObligatoireDescription
apiKeystringOuiDaytona API key
sandboxIdstringOuiID or name of the sandbox

Sortie

ParamètreTypeDescription
sandboxjsonThe deleted sandbox

daytona_execute_command

Execute a shell command inside a Daytona sandbox

Entrée

ParamètreTypeObligatoireDescription
apiKeystringOuiDaytona API key
sandboxIdstringOuiID of the sandbox to execute the command in
commandstringOuiShell command to execute
cwdstringNonWorking directory for the command (defaults to the sandbox working directory)
envjsonNonEnvironment variables to set for the command as key-value pairs
timeoutnumberNonTimeout in seconds (defaults to 10 seconds)

Sortie

ParamètreTypeDescription
exitCodenumberExit code of the command (-1 if missing from the response)
resultstringCombined stdout/stderr output of the command

daytona_run_code

Run Python, JavaScript, or TypeScript code inside a Daytona sandbox

Entrée

ParamètreTypeObligatoireDescription
apiKeystringOuiDaytona API key
sandboxIdstringOuiID of the sandbox to run the code in
codestringOuiCode to run
languagestringOuiLanguage of the code: python, javascript, or typescript
envjsonNonEnvironment variables to set for the run as key-value pairs
timeoutnumberNonTimeout in seconds (defaults to 10 seconds)

Sortie

ParamètreTypeDescription
exitCodenumberExit code of the code run (-1 if missing from the response)
resultstringCombined stdout/stderr output of the code run
artifactsjsonArtifacts produced by the run (e.g., matplotlib charts)

daytona_upload_file

Upload a file to a Daytona sandbox

Entrée

ParamètreTypeObligatoireDescription
apiKeystringOuiDaytona API key
sandboxIdstringOuiID of the sandbox to upload the file to
destinationPathstringOuiDestination path in the sandbox (a trailing slash uploads into that directory using the file name)
filefileNonThe file to upload
fileContentstringNonLegacy: base64 encoded file content
fileNamestringNonOptional file name override

Sortie

ParamètreTypeDescription
uploadedPathstringPath of the uploaded file in the sandbox
namestringName of the uploaded file
sizenumberSize of the uploaded file in bytes

daytona_download_file

Download a file from a Daytona sandbox

Entrée

ParamètreTypeObligatoireDescription
apiKeystringOuiDaytona API key
sandboxIdstringOuiID of the sandbox to download the file from
filePathstringOuiPath of the file in the sandbox

Sortie

ParamètreTypeDescription
filefileDownloaded file stored in execution files
namestringName of the downloaded file
mimeTypestringMIME type of the downloaded file
sizenumberSize of the downloaded file in bytes

daytona_list_files

List files in a directory of a Daytona sandbox

Entrée

ParamètreTypeObligatoireDescription
apiKeystringOuiDaytona API key
sandboxIdstringOuiID of the sandbox to list files in
pathstringNonDirectory path to list (defaults to the sandbox working directory)

Sortie

ParamètreTypeDescription
filesarrayFiles and directories at the given path
↳ namestringFile or directory name
↳ isDirbooleanWhether the entry is a directory
↳ sizenumberSize in bytes
↳ modestringFile mode string
↳ permissionsstringPermission string
↳ ownerstringOwning user
↳ groupstringOwning group
↳ modifiedAtstringLast modification timestamp

daytona_git_clone

Clone a Git repository into a Daytona sandbox

Entrée

ParamètreTypeObligatoireDescription
apiKeystringOuiDaytona API key
sandboxIdstringOuiID of the sandbox to clone the repository into
urlstringOuiURL of the Git repository to clone
pathstringOuiPath in the sandbox to clone the repository into
branchstringNonBranch to clone (defaults to the default branch)
commitIdstringNonSpecific commit to check out after cloning
usernamestringNonUsername for authenticating to private repositories
passwordstringNonPassword or personal access token for private repositories

Sortie

ParamètreTypeDescription
repoUrlstringURL of the cloned repository
clonePathstringPath the repository was cloned into

On this page