Fish Audio S2.1 Pro
Production multilingual speech with stateless voice cloning — send a sample, get that voice back.
/v1/media/queueOverview
S2.1 Pro is Fish Audio's production text-to-speech model, built for multilingual voice applications, expressive narration, and dialogue synthesis. It is the only speech model on YepAPI that supports stateless voice cloning: attach a short reference sample to the request and the generated speech mimics that voice. There is no voice to create, upload, or manage beforehand.
| Property | Value |
|---|---|
| Model ID | fish-audio/s2.1-pro |
| Alias | fish |
| Upstream Model | fish-audio/s2.1-pro |
| Category | Text to Speech |
| Languages | multilingual |
| Output | mp3 (default) or pcm |
| Pricing | $0.0317 per 1,000 characters |
Usage
All media models use the async job queue. Submit a job, then poll for the result.
Step 1: Submit Job
const res = await fetch('https://api.yepapi.com/v1/media/queue', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
model: 'fish-audio/s2.1-pro',
prompt: 'Your text to speak goes here.',
}),
});
const { data } = await res.json();
// data.jobId — use this to poll for resultscurl -X POST https://api.yepapi.com/v1/media/queue \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "fish-audio/s2.1-pro", "prompt": "Your text to speak goes here."}'Step 2: Poll for Result
const status = await fetch(`https://api.yepapi.com/v1/media/status/${data.jobId}`, {
headers: { 'x-api-key': 'YOUR_API_KEY' },
});
const { data: job } = await status.json();
// job.status — "pending" | "processing" | "completed" | "failed"
// job.result.audio — { mimeType, base64 } when completedcurl https://api.yepapi.com/v1/media/status/JOB_ID \
-H "x-api-key: YOUR_API_KEY"Write the audio to a file:
import { writeFileSync } from 'node:fs';
writeFileSync('speech.mp3', Buffer.from(job.result.audio.base64, 'base64'));Request Body
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
model | string | Yes | fish-audio/s2.1-pro | — |
prompt | string | Yes | The text to speak (max 50,000 bytes) | — |
options.voice | string | No | Voice identifier | provider default |
options.outputFormat | string | No | mp3 (default) or pcm | mp3 |
options.speed | number | No | Playback speed multiplier. Honoured only by models that support it | 1.0 |
Voices
Fish Audio ships no fixed voice catalogue — omit options.voice and the provider selects its default, or steer the delivery through the input text itself.
Features
- Stateless voice cloning from a single reference sample
- No voice enrolment step — the sample travels with the request
- Open-ended natural-language control of speaking style
- Multilingual narration and dialogue synthesis
Voice cloning
Attach a reference sample and the generated speech mimics that voice. Nothing is stored — the sample travels with the request, so there is no voice to create or manage beforehand.
const res = await fetch('https://api.yepapi.com/v1/media/queue', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
model: 'fish-audio/s2.1-pro',
prompt: 'This sentence is spoken in the cloned voice.',
audioData: {
mimeType: 'audio/mpeg',
base64: '<base64-encoded voice sample>',
},
options: {
// Optional transcript of the sample — improves fidelity.
referenceText: 'I used to rule the world.',
},
}),
});| Parameter | Type | Required | Description |
|---|---|---|---|
audioData.mimeType | string | Yes | MIME type of the reference sample, e.g. audio/mpeg or audio/wav |
audioData.base64 | string | Yes | Base64-encoded reference audio (max 15 MB decoded) |
options.referenceText | string | No | Transcript of the sample — improves cloning fidelity |
audioData is rejected on every other speech model. Use fish-audio/s2.1-pro for cloning.
Billing
Speech is billed on the length of the input text, in UTF-8 bytes — for English text one byte is one character. The cost is known before synthesis starts, so the balance check at submit time quotes the exact final charge. Jobs have a $0.01 minimum.
Powered by OpenRouter's unified speech API.