ByteChef LogoByteChef

Daytona

Daytona provides secure and elastic infrastructure for running AI-generated code in isolated sandboxes.

Categories: Developer Tools, Artificial Intelligence

Type: daytona/v1


Connections

Version: 1

Bearer Token

Properties

NameLabelTypeDescriptionRequired
tokenAPI KeySTRINGYour Daytona API key.true
baseUrlBase URLSTRINGThe Daytona API base URL. Change only for self-hosted deployments.true

Actions

Execute Code

Name: executeCode

Generates and runs code in a secure, isolated Daytona sandbox and returns its output. Use this to execute AI-generated code (data analysis, calculations, scripts) safely and get the result back.

Properties

NameLabelTypeDescriptionRequired
languageLanguageSTRING
Options python, typescript, javascript, bash
The programming language of the code to execute.true
codeCodeSTRINGThe source code to execute in the sandbox.true
sandboxIdSandbox IDSTRINGRun in an existing sandbox to preserve state across turns. Leave empty to create a fresh, ephemeral sandbox for this run. A reused sandbox is never deleted by this action.false
keepSandboxKeep SandboxBOOLEAN
Options true, false
When creating a new sandbox, keep it alive after the run (instead of deleting it) so it can be reused via its returned Sandbox ID. Ignored when a Sandbox ID is supplied.false
timeoutTimeoutINTEGERMaximum time in seconds to wait for the code to finish executing.false

Example JSON Structure

{
  "label" : "Execute Code",
  "name" : "executeCode",
  "parameters" : {
    "language" : "",
    "code" : "",
    "sandboxId" : "",
    "keepSandbox" : false,
    "timeout" : 1
  },
  "type" : "daytona/v1/executeCode"
}

Output

Type: OBJECT

Properties

NameTypeDescription
exitCodeINTEGERThe exit code of the executed code (0 indicates success).
stdoutSTRINGThe standard output produced by the code.
successBOOLEAN
Options true, false
Whether the code finished with a zero exit code.
sandboxIdSTRINGThe sandbox the code ran in (reuse it to preserve state).
chartsARRAY
Items []
Chart artifacts (e.g. matplotlib) captured during execution, if any.

Output Example

{
  "exitCode" : 1,
  "stdout" : "",
  "success" : false,
  "sandboxId" : "",
  "charts" : [ ]
}

Create Sandbox

Name: createSandbox

Creates a persistent, isolated Daytona sandbox and returns its ID. Reuse the ID across executeCode and uploadFile calls to preserve state, then delete it with deleteSandbox when done.

Properties

NameLabelTypeDescriptionRequired
languageLanguageSTRING
Options python, typescript, javascript, bash
The default language runtime for the sandbox.false

Example JSON Structure

{
  "label" : "Create Sandbox",
  "name" : "createSandbox",
  "parameters" : {
    "language" : ""
  },
  "type" : "daytona/v1/createSandbox"
}

Output

Type: OBJECT

Properties

NameTypeDescription
sandboxIdSTRINGThe ID of the created sandbox.

Output Example

{
  "sandboxId" : ""
}

Delete Sandbox

Name: deleteSandbox

Deletes a Daytona sandbox and frees its resources.

Properties

NameLabelTypeDescriptionRequired
sandboxIdSandbox IDSTRINGThe ID of the sandbox to delete.true

Example JSON Structure

{
  "label" : "Delete Sandbox",
  "name" : "deleteSandbox",
  "parameters" : {
    "sandboxId" : ""
  },
  "type" : "daytona/v1/deleteSandbox"
}

Output

Type: OBJECT

Properties

NameTypeDescription
deletedBOOLEAN
Options true, false
Whether the sandbox was deleted.

Output Example

{
  "deleted" : false
}

Upload File

Name: uploadFile

Uploads a file into a Daytona sandbox at the given path.

Properties

NameLabelTypeDescriptionRequired
sandboxIdSandbox IDSTRINGThe ID of the sandbox to upload the file into.true
pathPathSTRINGThe absolute destination path inside the sandbox (e.g. /home/daytona/data.csv).true
fileFileFILE_ENTRYThe file to upload.true

Example JSON Structure

{
  "label" : "Upload File",
  "name" : "uploadFile",
  "parameters" : {
    "sandboxId" : "",
    "path" : "",
    "file" : {
      "extension" : "",
      "mimeType" : "",
      "name" : "",
      "url" : ""
    }
  },
  "type" : "daytona/v1/uploadFile"
}

Output

Type: OBJECT

Properties

NameTypeDescription
pathSTRINGThe destination path the file was uploaded to.

Output Example

{
  "path" : ""
}

How is this guide?

Last updated on

On this page