Jingles
Create a jingle generation request
POST
https://api.tunio.ai/ v1/ jingles/ requestsQueue a jingle for the generator the control panel uses: a voice over a generated music bed (full), music only (instrumental) or voice only (voice). Poll GET /v1/jingles/requests/{request_id} until the state is completed; the jingle is then a file of the caller's library (jingle_id, also listed by GET /v1/jingles) that can be added to bundles. Credits are charged once, only when generation succeeds (ledger type jingle_generation); a failed request costs nothing. Up to 20 requests may be pending or processing per account. Rate limited to 60 calls per minute per account across the jingle request endpoints.
Request body
Jingle parameters
| Name | Type | Description |
|---|---|---|
| end_pause_seconds | integer | Silence added at the end in seconds, 0..5 (default 0). |
| generation_type | string | full (voice over a generated music bed, default), instrumental (music only) or voice (voice only). |
| model_id | string | Voice (model_id from GET /v1/tts/models, including the caller's cloned voices); required for full and voice. |
| music_duration | integer | Music length in seconds, 5..30; required for instrumental and ignored otherwise. |
| style_prompt | string | Description of the music bed, up to 800 characters; required for full and instrumental, ignored for voice. |
| text | string | What the voice says, up to 600 characters; required for full and voice, ignored for instrumental. |
| voice_effect | string | none (default) or telephone; ignored for instrumental. |
Request example
01{02 "end_pause_seconds": 0,03 "generation_type": "full",04 "model_id": "string",05 "music_duration": 10,06 "style_prompt": "Upbeat pop radio ident, bright synths, 120 BPM",07 "text": "Tunio radio. Music for your business.",08 "voice_effect": "none"09}
Responses
| Name | Type | Description |
|---|---|---|
| request | object | The queued jingle request. |
| audio_url | string | Always null on create. |
| completed_at | string | Always null on create. |
| cost | integer | Estimated cost in credits; charged only when generation succeeds. |
| created_at | string | When the request was accepted. |
| duration | integer | Always null on create. |
| end_pause_seconds | integer | Silence added at the end in seconds. |
| error | string | Always null on create. |
| generation_type | string | full, instrumental or voice. |
| jingle_id | string | Always null on create. |
| model_id | string | Voice the text is spoken with, null for instrumental. |
| music_duration | integer | Requested music length in seconds for instrumental jingles. |
| request_id | string | Request ID. |
| state | string | Always pending on create. |
| style_prompt | string | Description of the music bed; empty for voice. |
| text | string | What the voice says; empty for instrumental. |
| title | string | Always null on create. |
| voice_effect | string | none or telephone. |
| success | boolean | Always true. |
| Name | Type | Description |
|---|---|---|
| max_length | integer | Maximum length in characters, set with text_too_long (600) and style_prompt_too_long (800). |
| message | string | Error code. |
| success | boolean | Always false. |
| Name | Type | Description |
|---|---|---|
| message | string | Error code or human-readable error details. |
| success | boolean | Always false for error payloads. |
| Name | Type | Description |
|---|---|---|
| available_credits | string | Credits available on the account, as a decimal string. |
| message | string | Always insufficient_balance. |
| music_credits | string | Credits for the music bed alone, as a decimal string. |
| music_seconds_billed | integer | Seconds of music bed billed (estimated from the text for full, music_duration for instrumental, 0 for voice). |
| required_credits | string | Credits the jingle costs, as a decimal string. |
| success | boolean | Always false. |
| tts_multiplier_applied | string | TTS price multiplier applied to the voice part, as a decimal string. |
| Name | Type | Description |
|---|---|---|
| message | string | Error code or human-readable error details. |
| success | boolean | Always false for error payloads. |
| Name | Type | Description |
|---|---|---|
| max_pending | integer | Maximum number of pending or processing requests per account, set with too_many_pending_requests. |
| message | string | too_many_pending_requests (the account already has max_pending requests pending or processing) or rate_limited (more than 60 calls a minute; see Retry-After). |
| success | boolean | Always false. |
| Name | Type | Description |
|---|---|---|
| message | string | Error code or human-readable error details. |
| success | boolean | Always false for error payloads. |