Generate a sound effect
generate_sound_effectCreate a NEW short sound effect (up to 4 s) from a description and return a WAV file URL with its duration. Not music and not voice. Check list_sound_effects first: it has 75 ready-made effects (whooshes, clicks, pops, impacts, cash register, applause…) that cost nothing. This one spends 15 AI credits per sound, so download it and reuse it instead of asking for the same one twice. SPENDS AI CREDITS ONLY WITH confirm: true. Call it first without confirm: nothing runs and nothing is charged, you get the quote (what it will do and the credits). Tell the user, in your own words, exactly that — including the options you chose, so they can change them — and wait for a clear yes before calling again with the same arguments and confirm: true. One yes covers the plan they approved (e.g. every line of an approved voice-over with the chosen voice); anything new or different needs a new yes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | true ONLY after the user said yes to the quote (what it does and the credits). Without it nothing runs and nothing is charged. | |
| description | Yes | The sound in a few words (3-160 characters), e.g. "quick whoosh transition" or "soft notification pop". | |
| workspaceId | No | Workspace to work on (an id from list_workspaces). Not needed when this connection is tied to one workspace, or when you pass an account: the account's workspace is used. | |
| idempotencyKey | No | Optional. A unique id for this action (16-128 chars: letters, digits, _ : . -). If you are unsure whether a call went through (timeout, network error), repeat it with the SAME idempotencyKey and the same arguments: you get the original result and nothing is done twice. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public URL of the WAV file. It expires after 7 days: download it into the project. | |
| mediaType | No | ||
| durationSec | No | Exact length of the audio, in seconds. | |
| confirmToken | No | ||
| creditsCharged | No | ||
| creditsRemaining | No | Credits left this month. null = this organization has no monthly credit cap. | |
| estimatedCredits | No | ||
| needsConfirmation | No | true = this is only the quote: nothing was done or charged. |