The Code Interpreter API is shutting down on October 1st, 2025. Read more here.
import Riza from '@riza-io/api';
const client = new Riza({
apiKey: process.env['RIZA_API_KEY'], // This is the default and can be omitted
});
const response = await client.tools.exec('id');
console.log(response.execution);{
"execution": {
"duration": 123,
"exit_code": 123,
"id": "<string>",
"stderr": "<string>",
"stdout": "<string>"
},
"output": "<unknown>",
"output_status": "error"
}Execute a tool with a given input. The input is validated against the tool’s input schema.
import Riza from '@riza-io/api';
const client = new Riza({
apiKey: process.env['RIZA_API_KEY'], // This is the default and can be omitted
});
const response = await client.tools.exec('id');
console.log(response.execution);{
"execution": {
"duration": 123,
"exit_code": 123,
"id": "<string>",
"stderr": "<string>",
"stdout": "<string>"
},
"output": "<unknown>",
"output_status": "error"
}Documentation Index
Fetch the complete documentation index at: https://docs.riza.io/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Set of key-value pairs to add to the tool's execution environment.
Show child attributes
Configuration for HTTP requests and authentication.
Show child attributes
The input to the tool. This must be a valid JSON-serializable object. It will be validated against the tool's input schema.
The Tool revision ID to execute. This optional parmeter is used to pin executions to specific versions of the Tool. If not provided, the latest (current) version of the Tool will be executed.
OK
The execution details of the function.
Show child attributes
The returned value of the Tool's execute function.
The status of the output. "valid" means your Tool executed successfully and returned a valid JSON-serializable object, or void. "json_serialization_error" means your Tool executed successfully, but returned a nonserializable object. "error" means your Tool failed to execute.
error, json_serialization_error, valid