Get usage statistics
client.promptly.getStats(PromptlyGetStatsParams { organizationId } query, RequestOptionsoptions?): PromptlyGetStatsResponse { activeTasks, failedRuns, successfulRuns, 4 more }
GET/api/promptly/stats
Retrieve task execution statistics for the organization
Parameters
Returns
Get usage statistics
import _0ct from '0ct';
const client = new _0ct({
apiKey: process.env['0CT_API_KEY'], // This is the default and can be omitted
});
const response = await client.promptly.getStats({
organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
});
console.log(response.activeTasks);{
"activeTasks": 0,
"failedRuns": 0,
"successfulRuns": 0,
"totalCostCents": 0,
"totalRuns": 0,
"totalTasks": 0,
"totalTokensUsed": 0
}Returns Examples
{
"activeTasks": 0,
"failedRuns": 0,
"successfulRuns": 0,
"totalCostCents": 0,
"totalRuns": 0,
"totalTasks": 0,
"totalTokensUsed": 0
}