import { Crevio } from "@crevio/sdk";
const crevio = new Crevio({
apiKey: process.env["CREVIO_API_KEY"] ?? "",
});
async function run() {
const result = await crevio.taskRuns.get({
id: "<id>",
});
console.log(result);
}
run();{
"id": "<string>",
"object": "<string>",
"task_id": "<string>",
"status": "pending",
"summary": "<string>",
"error_message": "<string>",
"input_tokens": 123,
"output_tokens": 123,
"credits_consumed": 123,
"tool_calls_count": 123,
"duration_ms": 123,
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Returns a specific task run record.
import { Crevio } from "@crevio/sdk";
const crevio = new Crevio({
apiKey: process.env["CREVIO_API_KEY"] ?? "",
});
async function run() {
const result = await crevio.taskRuns.get({
id: "<id>",
});
console.log(result);
}
run();{
"id": "<string>",
"object": "<string>",
"task_id": "<string>",
"status": "pending",
"summary": "<string>",
"error_message": "<string>",
"input_tokens": 123,
"output_tokens": 123,
"credits_consumed": 123,
"tool_calls_count": 123,
"duration_ms": 123,
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}API key in the format: Bearer {api_token}
The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")
Task run details
pending, running, completed, failed, needs_input Was this page helpful?