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
});
// Automatically fetches more pages as needed.
for await (const execution of client.executions.list()) {
console.log(execution.id);
}
{
"data": [
{
"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": "<any>",
"revision_id": "<string>"
},
"response": {
"execution": {
"duration": 123,
"exit_code": 123,
"id": "<string>",
"stderr": "<string>",
"stdout": "<string>"
},
"output": "<any>",
"output_status": "error"
},
"tool_id": "<string>",
"type": "tool"
},
"duration": 123,
"exit_code": 123,
"id": "<string>",
"language": "python",
"started_at": "2023-11-07T05:31:56Z"
}
]
}
Returns a list of executions in your project.
import Riza from '@riza-io/api';
const client = new Riza({
apiKey: process.env['RIZA_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const execution of client.executions.list()) {
console.log(execution.id);
}
{
"data": [
{
"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": "<any>",
"revision_id": "<string>"
},
"response": {
"execution": {
"duration": 123,
"exit_code": 123,
"id": "<string>",
"stderr": "<string>",
"stdout": "<string>"
},
"output": "<any>",
"output_status": "error"
},
"tool_id": "<string>",
"type": "tool"
},
"duration": 123,
"exit_code": 123,
"id": "<string>",
"language": "python",
"started_at": "2023-11-07T05:31:56Z"
}
]
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
The ID of the item to start after. To get the next page of results, set this to the ID of the last item in the current page.
The number of items to return. Defaults to 100. Maximum is 100.
If true, only show executions where the exit code is not 0, indicating an execution error. Defaults to false.
OK
The response is of type object
.