check speech preview availability
speech-previews_get-optionsCheck before creating a speech preview whether it fits the free monthly TTS allowance or draws on paid usage, and flag billing or plan issues to resolve in Studio.
Instructions
Preflight one speech preview before speech-previews_create: confirm you can read projectId, then read the organization's text-to-speech billing state. It returns no price, so use it to tell the user before creating whether the preview fits the free monthly allowance (freeMonthlyLimits.tts used against max, when freeMonthlyLimits is not null) or will draw on paid usage, judged from hasActiveCredits, plan and billingVersion. If freeTtsExhausted or paymentFailureCountExceededLimit is true, tell the user to check their plan or billing in Studio instead of creating. Ignore freeGenerationsExhausted and the generations and sync3 counters; they cover other generations, not speech. available is always true when the call succeeds; if the project check or billing read fails, the call returns an error and no billing fields. Not for overall balance or spend (account_get-usage) or choosing a voice (voices_list). Does not synthesize or bill.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Project the speech preview is for, from projects_create or projects_list. Use the same id for speech-previews_create; an id you cannot access returns an error. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||