← All tutorialsAudio

Text-to-speech podcast snippet

Turn a blog post into a 60-second ElevenLabs audio teaser. Cache the MP3, post to your CDN.

Cost~$0.30 per minute
Operations
text_generation.generatespeech.synthesize

Prerequisites

  • speech.synthesize enabled (ElevenLabs).
  • A voice_id picked in the ElevenLabs dashboard.

Walkthrough

1. Tighten the copy

GPT-4o rewrites your blog post into 150 spoken words. Spoken cadence differs from written cadence.

2. Synthesize

Returns a binary MP3 (base64 in `audio_b64`). Decode and upload to your CDN.

bash# ElevenLabs synth call. Output is a base64-encoded MP3.
curl -X POST https://www.upivia.com/v1/service-requests \
  -H "Authorization: Bearer $AGENT_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "service":"speech",
    "operation":"synthesize",
    "payload":{"text":"<the tightened copy>","voice_id":"21m00Tcm4TlvDq8ikWAM"}
  }'

Next steps

Audit every call at /audit-logs, watch spend at /usage, and tune budgets per service on the agent's page.

Create an account →