Code Interpreter API Developer Preview

Safely run untrusted code from your app.

Execute JavaScript, TypeScript, Python, Ruby or PHP in a sandboxed environment.

Try it out now:

Request

Initializing…

Response

exit_code
stdout
stderr

How it works

1

Write code to run in any supported language.

JavaScript, TypeScript, Python, Ruby or PHP.

2

POST it to the /v1/execute API endpoint.

Include command line args, stdin and env vars.

3

Riza safely runs the code and returns the output.

Your response includes the exit code, stdout, and stderr.

What is the Code Interpreter API?

A service for executing untrusted JavaScript, TypeScript, Python, Ruby and PHP.

How are people using it today?

Teams are using it to run code generated by LLMs, power data transformations, and extend their products for enterprise customers.

Why is it secure?

Code is executed inside a WebAssembly sandbox. Learn more in our security documentation.

What are the limitations of the developer preview?

These limitations are temporary. See our roadmap for more details.
  • Code only has access to data you provide, which includes command-line arguments, environment variables, and stdin.
  • No filesystem access.
  • No network access.
  • No external packages. Each interpreter has access to its language's standard library.
  • No support for alternative interpreter versions.
  • Execution time is limited to 30 seconds per invocation.
  • Memory consumption is limited to 128Mib per invocation.

How much does it cost?

During the developer preview the Code Interpreter API is free. We plan to charge based on usage once the API reaches general availability.

Can I self-host the Code Interpreter API?

Self-hosting is offered at your request on a case-by-case basis. Send an email to sales@riza.io or schedule a call.

What's coming next?

Our full roadmap is available in our documentation, but here are some highlights:
  • Allow interpreter customization via third-party packages and dependencies.
  • Allow outbound network requests, with customer-defined hostname and IP allowlists.
  • Allow filesystem access, with customer-defined capability controls.
  • Add support for more languages, including compiled languages like Go, Java, and Rust.
Please send us an email or join us on Discord if you have questions or suggestions.