Skip to main content
GET
/
api
/
v1
/
voice-templates
/
{voice_template_id}
/
demo
# Request 1: Generate demo for a specific voice template
curl -X GET "https://app.talkover.ai/api/v1/voice-templates/voice-template-uuid-1/demo" \
  -H "Authorization: Bearer talq_your_environment_token_here"
{
  "mp3_url": "https://example.com/storage/demo-audio/signed-url-here.mp3"
}

Documentation Index

Fetch the complete documentation index at: https://docs.talkover.ai/llms.txt

Use this file to discover all available pages before exploring further.

Generate Voice Template Demo

Generate a demo audio file for a specific voice template. This endpoint creates a sample audio file that demonstrates how the voice template sounds, allowing you to test and evaluate voice templates before using them in your agents.

Endpoint

GET /api/v1/voice-templates/{voice_template_id}/demo

Path Parameters

voice_template_id
string
required
The unique identifier of the voice template. You can find this in the voice templates list.

Request Headers

Authorization
string
required
Bearer token for authentication. Format: Bearer talq_your_environment_token_here

Example Requests

# Request 1: Generate demo for a specific voice template
curl -X GET "https://app.talkover.ai/api/v1/voice-templates/voice-template-uuid-1/demo" \
  -H "Authorization: Bearer talq_your_environment_token_here"
# Request 2: Generate demo with error handling
curl -X GET "https://app.talkover.ai/api/v1/voice-templates/voice-template-uuid-1/demo" \
  -H "Authorization: Bearer talq_your_environment_token_here" \
  -w "\nHTTP Status: %{http_code}\n"

Response

Success Response (200 OK)

{
  "mp3_url": "https://example.com/storage/demo-audio/signed-url-here.mp3"
}

Response Fields

mp3_url
string
required
A signed URL to the generated demo audio file in MP3 format. This URL is temporary and will expire.

Error Responses

404 Not Found

{
  "success": false,
  "message": "Voice template not found"
}

401 Unauthorized

{
  "success": false,
  "message": "Unauthorized"
}

500 Server Error

{
  "error": "Failed to generate demo audio"
}

Error Codes

CodeDescriptionHTTP Status
VOICE_TEMPLATE_NOT_FOUNDSpecified voice template does not exist404
INVALID_TOKENAuthentication token is invalid or missing401
DEMO_GENERATION_FAILEDFailed to generate demo audio500

Important Notes

Temporary URLs. The demo audio URL is temporary and will expire after a certain time period.
Demo content. The demo audio contains a sample text that showcases the voice template’s capabilities.
Generation time. Demo audio generation may take a few seconds to complete.

Best Practices

  1. Test before using - Always generate a demo to test voice templates before selecting them
  2. Handle URL expiration - Download or use the demo URL quickly as it expires
  3. Error handling - Implement proper error handling for generation failures
  4. Cache demos - Consider caching demo URLs for frequently accessed voice templates
  5. Test different quality tiers - Generate demos for different quality tiers to compare
  • List Voice Templates: GET /api/v1/voice-templates
  • List Phone Numbers: GET /api/v1/phone-numbers