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.
| Property | Type | Required | Description |
|---|---|---|---|
amount | number | Yes | Number of credits to spend |
message | string | Yes | Message shown to the user explaining the spend |
onAccept | () => void | No | Callback invoked when the user accepts |
onDecline | () => void | No | Callback invoked when the user declines |
Returns SdkResultAsync<SpendCreditsResult>:
| Property | Type | Description |
|---|---|---|
success | boolean | Whether the user confirmed the credit spend |