Fish Audio S2.1 Pro
Fish Audio S2.1 Pro is a audio model from Fish Audio, callable through the AgentSky API as fish_audio/s2.1-pro and billed per byte ($0.00003).
Turn text into spoken audio, in a saved or cloned voice.
Overview
Converts text into speech using either a saved voice referenced by id or a voice cloned on the fly from reference audio and its transcript. This is the current recommended model, at the same price per byte as the other paid tiers. Output encoding is selectable across compressed and uncompressed containers with bitrate control. A latency mode trades time-to-first-audio against quality, and a chunk length governs how the text is segmented for synthesis, which keeps prosody consistent across long passages. Text normalisation expands numbers, dates, and abbreviations into the way they are spoken.
The audio, returned inline with its media type and size in bytes; with `timestamps` or `stream`, also the spoken spans with their start and end times. Billing counts the bytes of text submitted.
Input
These go in the input object of the run request.
| Field | Type | Required | Description |
|---|---|---|---|
| text | string | Yes | What to say. Maximum: 100000 |
| reference_id | string | No | The id of a public library voice, or of a voice this account saved with voice-create. |
| reference_audio_base64 | base64 | No | Audio carrying a voice to clone inline. Supply it together with reference_text; the reference is used only for this request. |
| reference_text | string | No | The exact words spoken in reference_audio_base64. Required whenever inline reference audio is supplied. |
| format | string | No | Audio container to return. Allowed: wav, pcm, mp3, opus Default: "mp3" |
| mp3_bitrate | integer | No | Bitrate when returning MP3. Allowed: 64, 128, 192 Default: 128 |
| chunk_length | integer | No | How much text to synthesise at a time. Default: 300Minimum: 100 Maximum: 300 |
| latency | string | No | Trade responsiveness against quality. Allowed: low, balanced, normal Default: "normal" |
| normalize | boolean | No | Expand numbers, dates, and abbreviations before speaking them. Default: true |
| timestamps | boolean | No | Also return when each span of text is spoken, as absolute start and end times in seconds. Default: false |
| stream | boolean | No | Respond with server-sent events: a `fish_audio.audio_chunk` event per audio chunk as it is synthesised, then `run.completed` with the complete audio and its timestamps. Default: false |
Requests up to 15 MB, audio up to 10 MB, text up to 100,000 characters.
Example
Use your own API key and a saved idempotency key for each new job. Replace image or media placeholders with your own publicly reachable HTTPS URLs. Keep the same key and request body when recovering a timeout.
# Set once per job; reuse this key and the identical body after a timeout.
: "${AGENTSKY_IDEMPOTENCY_KEY:?Set a unique, saved key for this job}"
curl --fail-with-body https://gateway.agentsky.dev/v1/run \
-H "authorization: Bearer $AGENTSKY_API_KEY" \
-H "content-type: application/json" \
-H "Idempotency-Key: $AGENTSKY_IDEMPOTENCY_KEY" \
-d '{"provider":"fish_audio","endpoint":"s2.1-pro","input":{"text":"Hello, and welcome back to the show.","format":"mp3","mp3_bitrate":128,"latency":"normal"}}'
# If status is READY/RUNNING, poll GET /v1/runs/{runId} with the same API key.Pricing
$0.00003 per byte using your plan when signed in. Read the final customer charge from price.amount.value after the run finishes. A RUNNING response is not the final bill.
