For AI agents: a documentation index is available at /llms.txt. Markdown versions of all documentation pages are available by appending .md to the URL path.
Outcome: A manifest.json referencing a narrated MP3 + cover art image,
both generated from a single article URL passed on the command line.
Approx cost: ~$0.11 per episode.
#!/bin/bash
set -euo pipefail
ARTICLE_URL="$1"
REF_VOICE_URL="${REF_VOICE_URL:?set REF_VOICE_URL to a public mp3/wav voice sample to narrate in}"
# 1. Pull the article + summarize into a podcast script
curl -sL "$ARTICLE_URL" \
| visa-cli run-llm --json --yes - \
--system 'You are converting a web article into a 2-minute podcast script. Return strict JSON: {"title":"...","script":"...","soundbites":["...","..."]}.' \
| jq -r '.text' > script.json
TITLE=$(jq -r '.title' < script.json)
SCRIPT_TEXT=$(jq -r '.script' < script.json)
# 2. Narrate the script in your reference voice
AUDIO=$(echo "$SCRIPT_TEXT" \
| visa-cli generate speech --json --yes - \
--ref-audio-url "$REF_VOICE_URL" \
| jq -r '.urls[0] // .filePath')
# 3. Cover art derived from the title
COVER=$(visa-cli generate image "podcast cover art for: $TITLE, 1:1, bold typography" --json --yes \
| jq -r '.urls[0] // .filePath')
# 4. Manifest
jq -n --arg title "$TITLE" --arg audio "$AUDIO" --arg cover "$COVER" \
'{title:$title,audio:$audio,cover:$cover}' > manifest.json
echo "Episode bundled: $(cat manifest.json | jq -c .)"
| Step | Tool | Approx |
|---|---|---|
| Article → script | or-claude-sonnet |
$0.04 |
| Narration | fal-metavoice |
$0.03 |
| Cover art | fal-flux-pro |
$0.04 |
| Total | ~$0.11 |