Skip to main content
Use the code-interpreter template when you want notebook-style execution inside a hosted machine. It adds stateful cells, package installation, stdout/stderr callbacks, structured results, artifacts, and language contexts on templates that include them. Use raw Commands instead when you only need a process to run and return stdout or stderr.

Quick Example

When To Use It

Core Concepts

Package Installs

Package installs affect the running machine. Use Templates when the same libraries should be available on every create.

Rich Output

Rich result objects (result.png, result.data, captured plt.show() output) are SDK-only. Via the CLI or HTTP API, save the figure to a file and fetch it with code artifact download or a filesystem read.

Guides

Analyze data with AI

Run stateful Python, R, JavaScript, TypeScript, Java, or Bash cells.

Charts and visualizations

Generate static charts, interactive HTML outputs, and downloadable files.

Supported languages

Choose a kernel and keep state in language-specific contexts.

Streaming

Stream stdout, stderr, results, artifacts, and errors as code executes.