Skip to main content
Version: 0.0.1

AI API Reference

kittl.ai — AI-related operations.

Scope: ai:credit:spend

spendCredits(options)​

Prompts the user with a confirmation dialog before spending AI credits.

PropertyTypeRequiredDescription
amountnumberYesNumber of credits to spend
messagestringYesMessage shown to the user explaining the spend
onAccept() => voidNoCallback invoked when the user accepts
onDecline() => voidNoCallback invoked when the user declines

Returns SdkResultAsync<SpendCreditsResult>:

PropertyTypeDescription
successbooleanWhether the user confirmed the credit spend