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 execution = await client.executions.get('id');
console.log(execution.id);{
"duration": 123,
"exit_code": 123,
"id": "<string>",
"language": "python",
"started_at": "2023-11-07T05:31:56Z",
"details": {
"request": {
"env": [
{
"name": "<string>",
"secret_id": "<string>",
"value": "<string>"
}
],
"http": {
"allow": [
{
"auth": {
"basic": {
"password": "<string>",
"secret_id": "<string>",
"user_id": "<string>"
},
"bearer": {
"secret_id": "<string>",
"token": "<string>"
},
"query": {
"key": "<string>",
"secret_id": "<string>",
"value": "<string>"
}
},
"host": "<string>"
}
]
},
"input": "<unknown>",
"revision_id": "<string>"
},
"response": {
"execution": {
"duration": 123,
"exit_code": 123,
"id": "<string>",
"stderr": "<string>",
"stdout": "<string>"
},
"output": "<unknown>",
"output_status": "error"
},
"tool_id": "<string>",
"type": "tool"
}
}Retrieves an execution.
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 execution = await client.executions.get('id');
console.log(execution.id);{
"duration": 123,
"exit_code": 123,
"id": "<string>",
"language": "python",
"started_at": "2023-11-07T05:31:56Z",
"details": {
"request": {
"env": [
{
"name": "<string>",
"secret_id": "<string>",
"value": "<string>"
}
],
"http": {
"allow": [
{
"auth": {
"basic": {
"password": "<string>",
"secret_id": "<string>",
"user_id": "<string>"
},
"bearer": {
"secret_id": "<string>",
"token": "<string>"
},
"query": {
"key": "<string>",
"secret_id": "<string>",
"value": "<string>"
}
},
"host": "<string>"
}
]
},
"input": "<unknown>",
"revision_id": "<string>"
},
"response": {
"execution": {
"duration": 123,
"exit_code": 123,
"id": "<string>",
"stderr": "<string>",
"stdout": "<string>"
},
"output": "<unknown>",
"output_status": "error"
},
"tool_id": "<string>",
"type": "tool"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
OK
python, javascript, typescript, ruby, php Show child attributes
Show child attributes
Configuration for HTTP requests and authentication.
Show child attributes
List of allowed HTTP hosts and associated authentication.
Show child attributes
Authentication configuration for outbound requests to this host.
Show child attributes
The hostname to allow.
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.
Show child attributes
The execution details of the function.
Show child attributes
The execution time of the function in milliseconds.
The exit code returned by the function. Will often be '0' on success and non-zero on failure.
The ID of the execution.
The contents of 'stderr' after executing the function.
The contents of 'stdout' after executing the function.
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 tool