Introducing the self-hosted Riza Code Interpreter

We're Riza and we make running untrusted code safe and easy. Today we're letting you run our Code Interpreter API locally via our rizaio/code-interpreter image.

When you self-host our Code Interpreter API in your own environment, all data stays on your system. Our default Python and JavaScript runtime environments are initialized by default.

$ docker run -e RIZA_LICENSE_KEY= --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

License key required

To use this image, you'll need to obtain a license key. Please reach out to hello@riza.io for access to one for a free trial.

With the image running, you can use our SDKs to talk to the API. You'll need to configure the base URL to point at the locally running server.

import rizaio

riza = rizaio.Riza(
    # Talk to the locally-running API server
    base_url = "http://localhost:3003",
    api_key = "my-demo-key", # Required, but can be any value
)

resp = riza.command.exec(
    language="PYTHON",
    code="print('Hello, Riza CLI!')",
)

print(resp.stdout)

No Docker? No problem

If you aren't looking to use Docker, downloads are available for Linux or macOS. Additional operating system and architecture support is coming soon.

When using the riza command directly, the default runtimes will need to be initialized, which will take a few minutes the first time it's run.

$ riza serve

This is an early release of the CLI. If you'd like to see any additional features, drop us a message in Discord.