fish-audio-api-reference

Complete working knowledge of the Fish Audio API — text-to-speech generation, voice cloning, real-time streaming audio via WebSocket, and speech-to-text transcription. Installs a full API reference in

SKILL.md

GitHub

Fish Audio API Reference - Skill 30

TYP Required: Read this entire SKILL.md before executing any install steps or making any Fish Audio API calls.


What Is This Skill?

This skill gives your AI agent complete working knowledge of the Fish Audio API. It installs a full API reference document into your master files and indexes it with Gemini Engine so the agent can look up exact endpoints, parameters, and curl examples at query time - without guessing.

What this enables:

  • Text-to-speech generation via API (podcasts, phone calls, voicemails, content)
  • Voice cloning and model management
  • Real-time streaming audio via WebSocket
  • Speech-to-text transcription (ASR)

This skill is standalone. No other skill is required. The Voice Call Plugin (formerly Skill 30) has been retired; Fish Audio API Reference is now Skill 30.


TYP - Teach Yourself Protocol

Before making ANY Fish Audio API call, the agent MUST:

  1. Read references/fish-audio-api-reference.md OR run a Gemini Engine search to find the specific section needed
  2. Never guess at endpoints, parameters, or syntax
  3. Always use exact parameter names and values from the reference doc

Gemini Engine search pattern:

python3 ~/.openclaw/scripts/gemini-search.py "fish audio tts endpoint parameters"
python3 ~/.openclaw/scripts/gemini-search.py "fish audio websocket streaming"
python3 ~/.openclaw/scripts/gemini-search.py "fish audio voice cloning"

Direct reference path:

~/Downloads/openclaw-master-files/service-integrations/fish-audio/fish-audio-api-reference.md

Quick Reference Card

Item Value
Base URL https://api.fish.audio
TTS Endpoint POST /v1/tts (same endpoint for paid and free tiers)
Auth Header Authorization: Bearer $FISH_AUDIO_API_KEY
Model Header model: drama-3 — a HEADER value, never a request-body field. Same mechanic as prior gens (headers: { model: "drama-3" }).
Default Model (client/production) drama-3 (PAID). Explicit FISH_AUDIO_MODEL=s2.1-pro is permitted; never silently downgrade. Reject s1, s2-pro, free tiers and unknown models.
Free Dev Model (operator-internal ONLY) s2.1-pro-free — see "Model Selection: Paid vs Free" below before touching this. Never client production.
Voice ID $FISH_AUDIO_VOICE_ID, matched to a separately approved, company-bound fingerprint before use

Model Selection: Paid vs Free (Read Before Any TTS Call)

Fish Audio ships Drama-3 as the current production release on the same POST /v1/tts endpoint (one header change from S2.1 Pro). S2.1 Pro remains available as a prior generation. Both tiers select the model the same way — via the HTTP model HEADER, never the JSON/msgpack request body. Confirmed by Fish Audio's own free-tier JS example: headers: { model: "s2.1-pro-free" } (source: https://fish.audio/blog/s2-1-pro-free-api/).

drama-3 — PAID — the client/production default

Drama-3 (Oct 13, 2026 announcement) is the current release: plain-language direction, sounds, pauses, and paired word-level tags. Same POST /v1/tts endpoint, model chosen by the HTTP model header. Sources: https://fish.audio/blog/fish-audio-drama-3/, https://docs.fish.audio/features/text-to-speech.

s2.1-pro — PAID prior generation

Use this prior generation only when the client or operator explicitly selects FISH_AUDIO_MODEL=s2.1-pro. It is never an automatic fallback. The BlackCEO default remains drama-3, as adopted in onboarding PR #2754. Paid-tier considerations:

  • SLA + latency guarantee — the tier Fish Audio contrasts against when it says the free tier has "no SLA" and "no latency guarantee"
  • Commercial-safe for production / revenue-generating use
  • Not subject to the free tier's "requests may be used to improve model quality" data-retention notice

s2.1-pro-free — FREE — operator-internal dev/prototyping ONLY

Do NOT use for client production, ever. Straight from Fish Audio's own announcement (https://fish.audio/blog/s2-1-pro-free-api/) and docs (https://docs.fish.audio/features/text-to-speech):

  • No SLA / no uptime / no latency guarantee. Fish Audio's own words: "No SLA: No uptime/TTFA guarantees; built for experimentation and prototyping" and "No latency guarantee: Best-effort, not contractual." Client-facing calls cannot run on a best-effort, non-contractual tier.
  • Data retention risk. Free-tier requests "may be used to improve model quality" — a client-data / sovereignty risk we do not accept for client production content.
  • Commercial restriction. Fish Audio: "Products generating more than $1M ARR should contact us before using S2.1 Pro Free." Client production is commercial use; we hold no such clearance from Fish Audio and are not seeking one.
  • Time-limited. Free access was originally "available till July 24, 2026," then Fish Audio announced "extending the free window to cover all of July" — free access ends END OF JULY 2026, with advance notice promised before further changes. Anything built on this tier can break or reprice on short notice.

⚠️ NEVER hardcode s2.1-pro-free anywhere as a durable default. It is a time-boxed, no-SLA, no-retention-guarantee dev convenience that expires end of July 2026 and whose cost/availability can change without much warning. If you see it hardcoded as a default in client-facing code, flag it and fix it back to drama-3.

Capability refresh (S2.1 Pro, both tiers — July 2026 announcement)

  • 83 languages — one model, no per-language endpoint, no per-language pricing
  • ~90ms TTFA (time-to-first-audio) on the standard API; ~70ms TTFA on a single request
  • 61% win rate vs the prior S2 Pro model in head-to-head listening evaluations
  • Voice cloning via reference_id (a trained voice model) plus a reference audio sample
  • Requests accept both application/msgpack and application/json
  • format is selectable (e.g., mp3, wav — see the full parameter table in references/fish-audio-api-reference.md)

Sources: https://fish.audio/blog/s2-1-pro-free-api/ (S2.1 Pro Free announcement), https://docs.fish.audio/features/text-to-speech (model reference).


BlackCEO Standard Settings

Use Case Model Latency Bitrate Normalize Format
Phone calls drama-3 normal 64 kbps true mp3
Podcasts / content drama-3 normal 192 kbps true mp3
  • Normal latency always - best quality output
  • Balanced latency (~300ms) only for real-time live AI calling
  • Pricing: confirm the selected model's current rate before a paid call; S2.1 pricing must not be used to estimate Drama-3

Production Generation (Phone Calls and Content)

Use scripts/fish_audio_config.py so every request passes the same voice and model preflight as install QC. Resolve OC_ROOT with the installed lib-shared.sh first. See client voice approval for the independent owner approval record.

# Read-only preflight. No network calls and no secret values in output.
bash "$SKILL_DIR/qc-fish-audio-api-reference.sh"

# Paid call: announce provider, selected model and estimated USD, and honor the
# client's budget/approval before executing. Text comes from a UTF-8 file.
python3 "$SKILL_DIR/scripts/fish_audio_config.py" tts --root "$OC_ROOT" \
  --text-file approved-script.txt --output output.mp3 --use-case phone
# For podcasts/content, use --use-case content (192 kbps instead of 64).

production-policy.json is the source of truth for the default and permitted explicit models. The helper always sends the model HTTP header, never a body field. A missing or wrong client voice, invalid approval, disallowed model, provider error or non-audio response fails without substituting another voice or model. API reference curl snippets explain the wire format; they do not replace this production preflight.


Long-Form Content (Over 15,000 Characters)

The Fish Audio web platform has a 15,000 character limit. The API has no documented hard limit but for reliability, split long scripts into chunks of ~4,000 characters and stitch with FFmpeg:

# After generating chunk_1.mp3, chunk_2.mp3, chunk_3.mp3:
ffmpeg -i "concat:chunk_1.mp3|chunk_2.mp3|chunk_3.mp3" -acodec copy full_podcast.mp3

Emotion Tags (Drama-3 / S2.1 Pro Natural Language)

Drama-3 adds paired word-level tags alongside the global bracket direction, e.g. <emphasis>do not open that door.</emphasis> for words between the tags. Global direction still goes in square brackets at line start, e.g. [barely holding it together, forcing a smile].

S2.1 Pro uses natural language in square brackets. Place before the sentence or phrase:

[excited] Big announcement today!
[calm and professional] Here is your briefing.
[whispering] Keep this between us.
[laughing slightly] That's actually funny.

Paralanguage effects (insert inline):

  • (breath) - breathing sound
  • (break) - short pause
  • (long-break) - longer pause
  • (laugh) - laughter
  • (sigh) - sighing sound
  • um, uh - natural filler words

Pending Setup Behavior

If credentials, MC_COMPANY_ID, or the independently approved client voice record are missing, the installer writes a pending entry to ~/.openclaw/skills/.pending-setup.md.

The agent should:

  1. Remind the client once per session if status is PENDING
  2. When credentials are provided:
    • Run INSTALL.md Step 4 exactly as written. It resolves the canonical secrets store through lib-shared.sh ($SECRETS_ENV — ~/.openclaw/secrets/.env on Mac, /data/.openclaw/secrets/.env on VPS) and writes FISH_AUDIO_API_KEY and FISH_AUDIO_VOICE_ID there.
    • Do not hand-write either value into ~/.clawdbot/clawdbot.json or ~/clawd/secrets/.env. Those are pre-rename paths; qc-fish-audio-api-reference.sh does not read them, so a credential written there is reported absent on a correctly configured box.
    • Confirm presence only (SET / NOT-SET) — never print a credential value.
    • Run python3 ~/.openclaw/scripts/gemini-indexer.py to re-index
    • Follow references/client-voice-approval.md using the client's independently confirmed voice selection. Never generate the expected fingerprint from the active FISH_AUDIO_VOICE_ID.
    • Run the bundled configuration QC. Mark COMPLETE only after it passes and the separate approved live test/listening review confirms the intended voice.

Fish Audio Voice Behavior (Drama-3, S2 / S2.1 Pro)

TYP Deep Reference: fish-audio-voice-sop.md is a large document written for the S2/S2.1 Pro tag system; Drama-3 keeps the same bracket syntax and adds paired word-level tags plus plain-language direction. Do NOT load it into core files. Read it once using TYP, internalize the rules, then apply them when generating voice output.

When generating any Fish Audio S2 voice output (phone calls OR podcast/content), the agent must:

  1. Read fish-audio-voice-sop.md using TYP before the first voice generation session
  2. Apply the 12 Universal Operating Rules (spoken language, short chunks, pause system, tag system)
  3. Use Phone Call SOP (Part 3) for live call interactions
  4. Use Podcast SOP (Part 4) for content/podcast/audio generation at 192 kbps
  5. Run the 8-step AI Decision Logic (Part 5) before every voice response

The core principle: Do not speak like written text. Speak like a human being thinking out loud in real time.


Files in This Skill

File Purpose
production-policy.json Canonical production model and voice-record contract, vendored with a SHA-256 pin into Command Center
scripts/fish_audio_config.py Read-only configuration check and guarded production TTS
references/client-voice-approval.md Independent client approval and migration procedure
SKILL.md This file - TYP, quick reference, standard templates
INSTALL.md Step-by-step installation checklist
README.md One-page summary
fish-audio-voice-sop.md Deep reference - Fish Audio S2 voice behavior SOP v3.0 (TYP required, do not load into core)
references/fish-audio-api-reference.md Full API reference (all endpoints, parameters, examples)