Actions2
Get Token Usage
AI-generatedSummary
Fetch token usage details from a completed n8n execution using its execution ID to obtain prompt, completion, and total tokens used across LLM calls.
Inputs
- Execution ID (required) — The unique identifier of the execution to retrieve token usage data from. This is required when using the 'Get Token Usage' operation.
Output shape
a single JSON object containing the execution ID, aggregated total token counts (promptTokens, completionTokens, totalTokens), and an array of details per LLM call including node name, token usage breakdown, model, messages, and estimated tokens.
The output includes a warning field if no token usage data is found for the provided execution ID. The operation requires n8nApi credentials with apiKey and baseUrl set. The Execution ID input is mandatory and must correspond to a completed execution containing token usage data.
