Code Interpreter API logo

Code Interpreter API

Free

About Open source implementation of the ChatGPT Code Interpreter ![GitHub Repo stars](https://img.shields.io/github/stars/shroominic/codeinterpreter-api?style=social)

FreeFree tier
Inputs: text, fileOutputs: text, file, image
Type
Open Source

About Code Interpreter API

Code Interpreter API is an open-source LangChain implementation of ChatGPT's Code Interpreter. It uses CodeBoxes as a backend for sandboxed Python code execution, allowing users to run code safely. The tool supports dataset analysis, stock charting, image manipulation, and more. It can be run locally with your own OpenAI API key and features internet access, automatic Python package installation, and conversation memory. Input and output support text and files (including images). Installation is via pip, and it is designed for both local experiments and production scaling via the CodeBox API.

Key Features

Sandboxed Python code execution via CodeBox backend
Dataset analysis, stock charting, and image manipulation capabilities
Internet access and automatic Python package installation
Input text and files, output text and files (including images)
Conversation memory for context-aware responses
Runs everything locally except the OpenAI API (uses your own API key)
Use CodeBox API for easy scaling in production
Installable via pip (pip install codeinterpreterapi[all])

Pros & Cons

Pros
  • Open source and free to use
  • Sandboxed execution ensures safety
  • Can run locally with only an OpenAI API key
  • Supports file input and output including images
  • Includes conversation memory for context
  • Easy setup via pip
Cons
  • Requires an OpenAI API key (not fully local LLM)
  • Production scaling via CodeBox API is still in early stages
  • There are remaining TODOs in the code; active development needed
  • Limited to Python code execution

Best For

Data analysis and visualization of datasetsStock charting and financial data plottingImage manipulation and generationAutomated Python script execution with safety sandboxBuilding AI assistants with code execution capabilities

FAQ

Is Code Interpreter API free?
Yes, it is open source and free to use. You only need to provide your own OpenAI API key for the language model.
Can I run it locally?
Yes, you can run everything locally except the OpenAI API. The package uses CodeBox as a backend for sandboxed Python execution.
What can I do with it?
It supports dataset analysis, stock charting, image manipulation, internet access, and automatic Python package installation. You can input text and files, and receive text and files as output.
How do I install it?
Install via pip: pip install codeinterpreterapi[all] for local experiments, or pip install codeinterpreterapi for deployments.