Get Task LLM Usage
Get LLM token usage for a specific task
Retrieve LLM token usage statistics for a specific task, including input/output token counts and the number of tool actions performed.Documentation Index
Fetch the complete documentation index at: https://docs.xpander.ai/llms.txt
Use this file to discover all available pages before exploring further.
Path Parameters
Response
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 -
costis 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
API Key for authentication
Path Parameters
Response
Successful Response
LLM usage summary for a single task, including aggregated tokens, tool actions, BYOK indicator, and estimated USD cost (excludes BYOK executions).
Total LLM tokens consumed (input + output).
Number of input (prompt) tokens consumed.
Number of output (completion) tokens generated.
Number of tool actions performed during the task.
True if any execution in this task used BYOK (customer-provided LLM credentials). When True, cost reflects only the non-BYOK executions; BYOK executions are billed by the customer's own provider and are excluded from the figure.
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).

