For most customers, our hosted Code Interpreter API offers the best solution to safely execute untrusted Python, JavaScript, Ruby or PHP in an isolated and secure sandbox, powered by WebAssembly.

However, you may want to deploy the Code Interpreter API into your network for security, compliance, or performance reasons.

Unlike other code interpreter solutions, the Riza Code Interpreter is easy to deploy. It’s deployed as a stateless, horizontally scalable service using a single Docker image, with easy-to-meet system requirements.

  • The container does not require privileged mode.
  • The container does not require specialized instances types, such as AWS metal instances.

Running the service

The rizaio/code-interpreter image supports Linux AMD64 and ARM64/v8.

$ docker pull rizaio/code-interpreter

Running the service requires a license key.

$ docker run --rm -p3003:3003 -it rizaio/code-interpreter
-----> Validating license key...
       ERROR: The 'RIZA_LICENSE_KEY' environment variable is not set

Obtaining a license key

Please reach out to hello@riza.io to get a trial license.

Once you’ve obtained a license key, add it to the environment under the RIZA_LICENSE_KEY environment variable.

$ docker run -p3003:3003 -e RIZA_LICENSE_KEY=riza_license_xxx --rm -it rizaio/code-interpreter
-----> Validating license key...
       License key provided via 'RIZA_LICENSE_KEY' environment variable
       Success.

-----> Loading Python (cached)

-----> Loading JavaScript / TypeScript (cached)

-----> Listening on 0.0.0.0:3003

The port can be configured using the PORT environment variable.

Using the API

The self-hosted Code Interpreter API is a drop-in replacement for our hosted API.

Our client libraries support self-hosted instances by setting the base URL of the client. When running locally, this will default to http://localhost:3003.