Skip to main content

Code Interpreter (OpenAI)

The Code Interpreter tool (openai_code_interpreter) is a powerful native OpenAI tool that can run Python code in a secure sandbox. This makes advanced calculations, data analysis and file processing possible.

Only in assistants, lessons and workflows

Code execution is always off in standard chats, even if the environment or your personal settings say otherwise. Switch the tool on in the tool settings of an assistant, lesson or workflow that needs calculations or file editing. Code execution can take longer and add costs.

How it works​

The AI can write Python code and run it immediately. This is useful for calculations, data analysis, creating charts and processing files.

Usage examples​

  • "Analyse these sales figures and create a chart"
  • "Calculate the ROI of this investment proposal"
  • "Convert this Excel file into a summary"
  • "Create a visualisation of our quarterly results"

Settings​

SettingValue
Tool keyopenai_code_interpreter
Default statusAuto
Available forSuitable OpenAI models

Capabilities​

Data analysis​

  • Analyse CSV and Excel files
  • Perform statistical calculations
  • Identify trends and patterns
  • Generate summaries

Visualisations​

  • Create graphs and diagrams
  • Build dashboards
  • Present data visually
  • Generate reports

Calculations​

  • Financial analyses
  • Mathematical models
  • Running simulations
  • Scenario analyses

Business applications​

  • Finance: Financial models and forecasting
  • Marketing: Analysis of campaign results
  • HR: Staff statistics and trends
  • Operations: Process optimisation and analysis

File formats​

The tool supports various file formats:

FormatSupport
CSV✅ Full
Excel✅ Full
JSON✅ Full
TXT✅ Full
PDF⚠️ Limited

Security​

  • Code runs in an isolated sandbox
  • No access to external systems
  • Files are processed temporarily
  • Complies with security standards