Actions16
- Signal Actions
- Usage Actions
- Customer Actions
- Agent Actions
- Analytics Actions
- Invoice Actions
- Webhook Actions
- Cost Guard Actions
- Reconciliation Actions
Overview
This node interacts with the AgentBill API to validate AI requests against budget limits before spending. It is useful for managing and controlling AI usage costs by checking if a request fits within daily or monthly budget constraints. For example, it can be used to prevent exceeding allocated budgets for AI model usage in applications that rely on AI-generated content or chatbots.
Use Case Examples
- Validate an AI chat request by providing customer ID, AI model, chat messages, estimated input/output tokens, and optional budget overrides to ensure the request is within budget before execution.
- Use it to monitor and control AI usage costs in real-time by validating requests before they are sent to AI providers.
Properties
| Name | Meaning |
|---|---|
| Customer ID | Your customer identifier (max 255 characters) |
| Model | AI model name (e.g., gpt-4o-mini, claude-sonnet-4-5) |
| Messages (JSON) | Chat messages array in JSON format |
| Estimated Input Tokens | Estimated input tokens (~4 chars per token) |
| Estimated Output Tokens | Expected max output tokens |
| Daily Budget Override | Optional daily budget limit in USD (0 = use account default) |
| Monthly Budget Override | Optional monthly budget limit in USD (0 = use account default) |
Output
JSON
estimated_cost- Estimated cost of the AI request in USDvalid- Boolean indicating if the request is within budget limitsmessage- Additional message or information about the validation result
Dependencies
- AgentBill API key credential
Troubleshooting
- Ensure Customer ID is provided and does not exceed 255 characters; otherwise, the node throws an error.
- Model name must be provided and be less than 100 characters.
- Messages must be a valid JSON array; invalid JSON will cause an error.
- If the API key credential is missing or invalid, the node will fail to authenticate with the AgentBill API.
- Network issues or incorrect base URL configuration can cause HTTP request failures.
Links
- AgentBill API Documentation - Official API documentation for AgentBill, detailing endpoints and usage.