Actions8
Daily Costs
AI-generatedSummary
Fetches daily cost data from Alephant's cockpit analytics endpoint (GET /api/v1/cockpit/daily-costs) for a selected time period, authenticated with the configured virtual key.
Inputs
- Period — Time window for the daily cost breakdown: 24h, 7d, 30d, or 90d. Defaults to 7d. Sent as the
periodquery parameter. In AI tool mode the model can fill this in. The 'filled by AI' option maps to 7d.
Output shape
One output item per input item, with the JSON response from the Alephant daily-costs endpoint as the item's json. Items are paired to their input item.
The response fields aren't defined in the node source and are passed through as returned. In AI tool mode the response is returned as a JSON string. Requests are made against the SaaS base URL (default https://alephant.io), with a Bearer virtual key and an optional X-Workspace-Id header. A transient network error is retried once. HTTP errors are raised as NodeApiError. Requires the alephantVirtualKeyApi credential.
Examples
Example 1: Chart AI spend per day over the last month
Operation: Daily Costs; Period: 30 Days. Pass the output to a chart or spreadsheet node.
Example 2: Let an AI agent answer questions about recent daily spend
Connect the node to an AI Agent as a tool. The model chooses operation=dailyCosts and a period such as 7d.