Skip to main content
GET
Get Task Llm Usage
Retrieve LLM token usage statistics for a specific task, including input/output token counts and the number of tool actions performed.

Path Parameters

string
required
Unique identifier of the task (UUID format)

Response

string
Unique identifier of the task
integer
Total number of LLM tokens consumed (input + output)
integer
Number of input (prompt) tokens consumed
integer
Number of output (completion) tokens generated
integer
Number of tool actions performed during the task
boolean
Whether the task used a Bring Your Own Key (BYOK) model configuration
number
Estimated USD cost for non-BYOK executions in this task, rounded to 5 decimal places. 0.0 means no billable usage (empty task or fully BYOK).

Example Request

Example Response

Use Cases

  • Track token consumption - Monitor LLM token usage for individual tasks
  • Cost tracking - cost is returned directly in USD, rounded to 5 decimal places (excludes BYOK executions)
  • Usage auditing - Review resource consumption across tasks
  • BYOK tracking - Identify which tasks ran with your own API keys vs. platform-provided keys

Authorizations

x-api-key
string
header
required

API Key for authentication

Path Parameters

task_id
string
required

Response

Successful Response