import { Crevio } from "@crevio/sdk";
const crevio = new Crevio({
apiKey: process.env["CREVIO_API_KEY"] ?? "",
});
async function run() {
const result = await crevio.tasks.list({});
console.log(result);
}
run();{
"object": "list",
"data": [
{
"id": "<string>",
"object": "<string>",
"name": "<string>",
"description": "<string>",
"prompt": "<string>",
"trigger_type": "immediate",
"cron_expression": "<string>",
"interval_seconds": 123,
"scheduled_at": "2023-11-07T05:31:56Z",
"timezone": "<string>",
"delivery_method": "notification",
"approval_mode": "autonomous",
"model_id": "<string>",
"active": true,
"expires_at": "2023-11-07T05:31:56Z",
"next_run_at": "2023-11-07T05:31:56Z",
"last_run_at": "2023-11-07T05:31:56Z",
"total_runs_count": 123,
"consecutive_failure_count": 123,
"total_credits_consumed": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"has_more": true,
"url": "<string>"
}Returns a list of AI tasks for the current account. Supports filtering by trigger_type and active status, and searching by name or description.
import { Crevio } from "@crevio/sdk";
const crevio = new Crevio({
apiKey: process.env["CREVIO_API_KEY"] ?? "",
});
async function run() {
const result = await crevio.tasks.list({});
console.log(result);
}
run();{
"object": "list",
"data": [
{
"id": "<string>",
"object": "<string>",
"name": "<string>",
"description": "<string>",
"prompt": "<string>",
"trigger_type": "immediate",
"cron_expression": "<string>",
"interval_seconds": 123,
"scheduled_at": "2023-11-07T05:31:56Z",
"timezone": "<string>",
"delivery_method": "notification",
"approval_mode": "autonomous",
"model_id": "<string>",
"active": true,
"expires_at": "2023-11-07T05:31:56Z",
"next_run_at": "2023-11-07T05:31:56Z",
"last_run_at": "2023-11-07T05:31:56Z",
"total_runs_count": 123,
"consecutive_failure_count": 123,
"total_credits_consumed": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"has_more": true,
"url": "<string>"
}API key in the format: Bearer {api_token}
Filter by trigger type
immediate, cron, interval, once, event Filter by active flag
Search by task name or description
Cursor for pagination — the ID of the last item in the previous page
Items per page
1 <= x <= 100Was this page helpful?