Skip to main content
Verify that a user has enough credits and budget for an AI action before executing it.

Endpoint

POST /functions/v1/check-ai-budget

Request body

ParameterTypeDescription
actionstringThe action to check (e.g., generate_reel)
estimated_costnumberEstimated cost of the action

Response

{
  "allowed": true,
  "remaining_budget": 4.85,
  "credits_balance": 45
}