From c87af6ca109eb8e575b3140ae580edf343b468d0 Mon Sep 17 00:00:00 2001 From: fishaudio-bot <242899544+fishaudio-bot@users.noreply.github.com> Date: Thu, 3 Dec 2026 05:11:23 +0000 Subject: [PATCH] chore: update OpenAPI schema --- api-reference/openapi.json | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/api-reference/openapi.json b/api-reference/openapi.json index 7d95c730..937fbe9b 100644 --- a/api-reference/openapi.json +++ b/api-reference/openapi.json @@ -26603,17 +26603,18 @@ { "in": "header", "name": "model", - "description": "Specify which TTS model to use. If omitted or set to an unrecognized value, the request falls back to `s2.1-pro`.", + "description": "Specify which TTS model to use. Use `s3-pro-free` for the free developer tier. If omitted or set to an unrecognized value, the request falls back to `s3-pro`.", "required": false, "schema": { - "default": "s2.1-pro", + "default": "s3-pro", "enum": [ "s1", "s2-pro", "s2.1-pro", "s2.1-pro-free", "drama-3", - "s3-pro" + "s3-pro", + "s3-pro-free" ], "title": "Model", "type": "string" @@ -26789,17 +26790,18 @@ { "in": "header", "name": "model", - "description": "Specify which TTS model to use. If omitted or set to an unrecognized value, the request falls back to `s2.1-pro`.", + "description": "Specify which TTS model to use. Use `s3-pro-free` for the free developer tier. If omitted or set to an unrecognized value, the request falls back to `s3-pro`.", "required": false, "schema": { - "default": "s2.1-pro", + "default": "s3-pro", "enum": [ "s1", "s2-pro", "s2.1-pro", "s2.1-pro-free", "drama-3", - "s3-pro" + "s3-pro", + "s3-pro-free" ], "title": "Model", "type": "string" @@ -27741,7 +27743,7 @@ "/v1/tts/live/with-timestamp": { "get": { "summary": "Text to Speech Live with Timestamps (WebSocket)", - "description": "Streaming text-to-speech over a WebSocket that returns word-level timestamps\nalongside the audio. Connect to `wss://api.fish.audio/v1/tts/live/with-timestamp`;\nthis is a WebSocket upgrade, not a plain HTTP request.\n\nUse it when you need to feed text in as it is produced — an LLM token stream,\na live caption feed — and want word timings for lip-sync, subtitles or\nhighlighting. For a one-shot request use `POST /v1/tts/stream/with-timestamp`\ninstead.\n\n## Handshake\n\nSend the same headers as any other API call:\n\n- `Authorization: Bearer `\n- `model: ` — optional, defaults to `s2.1-pro`.\n\n## Framing\n\nEvery frame in both directions is a MessagePack-encoded **binary** frame\nholding a map with an `event` key. Text frames are ignored by the server and\nshould be ignored by your client.\n\n## Client to server\n\nThe inbound protocol is identical to `/v1/tts/live`:\n\n- `start` — opens the session. Send it once per session, before any other\n event. Carries a `request` object with the same fields as the\n `POST /v1/tts` body; leave `text` empty and stream the words with `text`\n events. After a `finish` you may send another `start` to run a new session\n on the same socket.\n- `text` — appends a text fragment to the session buffer.\n- `flush` — forces buffered text through generation without waiting for the\n chunk to fill. The session stays open.\n- `stop` — ends the session. The server drains the buffer and answers with a\n final `finish` event.\n\n## Server to client\n\n- `audio` — one audio chunk. Beyond the `audio` bytes it carries `content`,\n `alignment`, `chunk_seq` and `chunk_audio_offset_sec`; these last three are\n what this endpoint adds over `/v1/tts/live`. Concatenate every `audio`\n payload in arrival order to reconstruct the full audio. Note that `audio`\n here is raw MessagePack `bin`, not the base64 string used by the SSE\n endpoint.\n- `finish` — terminal event, with `reason` of `stop` or `error`.\n- `error` — a request-level failure such as an invalid `start` request or a\n concurrency refusal; the socket closes afterwards.\n\n## Reading the alignment\n\n`alignment` is a **cumulative snapshot** for its `chunk_seq`, not a delta:\nwhen it is non-null, replace the alignment you stored for that chunk rather\nthan appending to it. A `null` alignment means nothing new has been committed\nfor the chunk yet, which is normal early on.\n\nSegment times inside `alignment` are relative to the start of their chunk.\n`chunk_audio_offset_sec` is the chunk's own start time within the full audio,\nso the absolute time of a word is `chunk_audio_offset_sec + segment.start`.\nBoth `chunk_seq` and `chunk_audio_offset_sec` are monotonically\nnon-decreasing. A frame may be labelled with the previous chunk's\n`chunk_seq` while carrying the next chunk's audio bytes, so never use\n`chunk_seq` to attribute audio bytes — only alignment.", + "description": "Streaming text-to-speech over a WebSocket that returns word-level timestamps\nalongside the audio. Connect to `wss://api.fish.audio/v1/tts/live/with-timestamp`;\nthis is a WebSocket upgrade, not a plain HTTP request.\n\nUse it when you need to feed text in as it is produced — an LLM token stream,\na live caption feed — and want word timings for lip-sync, subtitles or\nhighlighting. For a one-shot request use `POST /v1/tts/stream/with-timestamp`\ninstead.\n\n## Handshake\n\nSend the same headers as any other API call:\n\n- `Authorization: Bearer `\n- `model: ` — optional, defaults to `s3-pro`.\n\n## Framing\n\nEvery frame in both directions is a MessagePack-encoded **binary** frame\nholding a map with an `event` key. Text frames are ignored by the server and\nshould be ignored by your client.\n\n## Client to server\n\nThe inbound protocol is identical to `/v1/tts/live`:\n\n- `start` — opens the session. Send it once per session, before any other\n event. Carries a `request` object with the same fields as the\n `POST /v1/tts` body; leave `text` empty and stream the words with `text`\n events. After a `finish` you may send another `start` to run a new session\n on the same socket.\n- `text` — appends a text fragment to the session buffer.\n- `flush` — forces buffered text through generation without waiting for the\n chunk to fill. The session stays open.\n- `stop` — ends the session. The server drains the buffer and answers with a\n final `finish` event.\n\n## Server to client\n\n- `audio` — one audio chunk. Beyond the `audio` bytes it carries `content`,\n `alignment`, `chunk_seq` and `chunk_audio_offset_sec`; these last three are\n what this endpoint adds over `/v1/tts/live`. Concatenate every `audio`\n payload in arrival order to reconstruct the full audio. Note that `audio`\n here is raw MessagePack `bin`, not the base64 string used by the SSE\n endpoint.\n- `finish` — terminal event, with `reason` of `stop` or `error`.\n- `error` — a request-level failure such as an invalid `start` request or a\n concurrency refusal; the socket closes afterwards.\n\n## Reading the alignment\n\n`alignment` is a **cumulative snapshot** for its `chunk_seq`, not a delta:\nwhen it is non-null, replace the alignment you stored for that chunk rather\nthan appending to it. A `null` alignment means nothing new has been committed\nfor the chunk yet, which is normal early on.\n\nSegment times inside `alignment` are relative to the start of their chunk.\n`chunk_audio_offset_sec` is the chunk's own start time within the full audio,\nso the absolute time of a word is `chunk_audio_offset_sec + segment.start`.\nBoth `chunk_seq` and `chunk_audio_offset_sec` are monotonically\nnon-decreasing. A frame may be labelled with the previous chunk's\n`chunk_seq` while carrying the next chunk's audio bytes, so never use\n`chunk_seq` to attribute audio bytes — only alignment.", "security": [ { "BearerAuth": [] @@ -27751,17 +27753,18 @@ { "in": "header", "name": "model", - "description": "Specify which TTS model to use. If omitted or set to an unrecognized value, the request falls back to `s2.1-pro`.", + "description": "Specify which TTS model to use. Use `s3-pro-free` for the free developer tier. If omitted or set to an unrecognized value, the request falls back to `s3-pro`.", "required": false, "schema": { - "default": "s2.1-pro", + "default": "s3-pro", "enum": [ "s1", "s2-pro", "s2.1-pro", "s2.1-pro-free", "drama-3", - "s3-pro" + "s3-pro", + "s3-pro-free" ], "title": "Model", "type": "string" @@ -42639,7 +42642,7 @@ "type": "object" }, "TTSRequest": { - "description": "Request body for text-to-speech synthesis. Supports single-speaker synthesis on all compatible TTS models. Multi-speaker dialogue synthesis is available with `s3-pro`, the S2 family (`s2-pro`, `s2.1-pro`), and `drama-3`, not `s1`.\n\n## Single Speaker\nProvide either `reference_id` (string) pointing to a voice model, or `references` (array of ReferenceAudio) for zero-shot cloning.\n\n## Multiple Speakers (Dialogue — `s3-pro`, S2 family and `drama-3`)\nFor multi-speaker synthesis, provide:\n- `reference_id`: array of voice model IDs, e.g., [\"speaker-0-id\", \"speaker-1-id\"]\n- `text`: use speaker tags `<|speaker:0|>`, `<|speaker:1|>`, etc. to indicate speaker changes, e.g., \"<|speaker:0|>Hello!<|speaker:1|>Hi there!\"\n\nAlternatively, for zero-shot multi-speaker:\n- `references`: 2D array where each inner array contains references for one speaker\n- `reference_id`: array of identifiers (can be arbitrary strings for zero-shot)\n\n## Example (Multi-Speaker with Model IDs)\n```json\n{\n \"text\": \"<|speaker:0|>Good morning!<|speaker:1|>Good morning! How are you?<|speaker:0|>I'm great, thanks!\",\n \"reference_id\": [\"model-id-alice\", \"model-id-bob\"]\n}\n```", + "description": "Request body for text-to-speech synthesis. Supports single-speaker synthesis on all compatible TTS models. Multi-speaker dialogue synthesis is available with `s3-pro`, `s3-pro-free`, the S2 family (`s2-pro`, `s2.1-pro`), and `drama-3`, not `s1`.\n\n## Single Speaker\nProvide either `reference_id` (string) pointing to a voice model, or `references` (array of ReferenceAudio) for zero-shot cloning.\n\n## Multiple Speakers (Dialogue — `s3-pro`, `s3-pro-free`, S2 family and `drama-3`)\nFor multi-speaker synthesis, provide:\n- `reference_id`: array of voice model IDs, e.g., [\"speaker-0-id\", \"speaker-1-id\"]\n- `text`: use speaker tags `<|speaker:0|>`, `<|speaker:1|>`, etc. to indicate speaker changes, e.g., \"<|speaker:0|>Hello!<|speaker:1|>Hi there!\"\n\nAlternatively, for zero-shot multi-speaker:\n- `references`: 2D array where each inner array contains references for one speaker\n- `reference_id`: array of identifiers (can be arbitrary strings for zero-shot)\n\n## Example (Multi-Speaker with Model IDs)\n```json\n{\n \"text\": \"<|speaker:0|>Good morning!<|speaker:1|>Good morning! How are you?<|speaker:0|>I'm great, thanks!\",\n \"reference_id\": [\"model-id-alice\", \"model-id-bob\"]\n}\n```", "properties": { "text": { "description": "Text to convert to speech.", @@ -42685,7 +42688,7 @@ "type": "null" } ], - "description": "Inline voice references for zero-shot cloning. Requires MessagePack (not JSON). For single speaker, provide an array of ReferenceAudio objects. For multiple speakers, provide an array of arrays where each inner array contains references for one speaker. **Multi-speaker is available with `s3-pro`, the S2 family (`s2-pro`, `s2.1-pro`), and `drama-3`, not `s1`.** The speaker index corresponds to the index in reference_id array. Example for multi-speaker: [[{audio, text}], [{audio, text}, {audio, text}]] for 2 speakers where speaker 1 has 2 reference samples.", + "description": "Inline voice references for zero-shot cloning. Requires MessagePack (not JSON). For single speaker, provide an array of ReferenceAudio objects. For multiple speakers, provide an array of arrays where each inner array contains references for one speaker. **Multi-speaker is available with `s3-pro`, `s3-pro-free`, the S2 family (`s2-pro`, `s2.1-pro`), and `drama-3`, not `s1`.** The speaker index corresponds to the index in reference_id array. Example for multi-speaker: [[{audio, text}], [{audio, text}, {audio, text}]] for 2 speakers where speaker 1 has 2 reference samples.", "title": "References" }, "reference_id": { @@ -42706,7 +42709,7 @@ } ], "default": null, - "description": "Voice model ID(s) from Fish Audio library or your custom models. For single-speaker synthesis, provide a string. For multi-speaker synthesis (dialogue), provide an array of model IDs. **Multi-speaker is available with `s3-pro`, the S2 family (`s2-pro`, `s2.1-pro`), and `drama-3`, not `s1`.** When using multiple speakers, use speaker tags in your text like `<|speaker:0|>` and `<|speaker:1|>` to indicate speaker changes. Example: `<|speaker:0|>Hello!<|speaker:1|>Hi there!<|speaker:0|>How are you?` with `reference_id: [\"speaker-a-id\", \"speaker-b-id\"]`.", + "description": "Voice model ID(s) from Fish Audio library or your custom models. For single-speaker synthesis, provide a string. For multi-speaker synthesis (dialogue), provide an array of model IDs. **Multi-speaker is available with `s3-pro`, `s3-pro-free`, the S2 family (`s2-pro`, `s2.1-pro`), and `drama-3`, not `s1`.** When using multiple speakers, use speaker tags in your text like `<|speaker:0|>` and `<|speaker:1|>` to indicate speaker changes. Example: `<|speaker:0|>Hello!<|speaker:1|>Hi there!<|speaker:0|>How are you?` with `reference_id: [\"speaker-a-id\", \"speaker-b-id\"]`.", "title": "Reference Id" }, "prosody": { @@ -42938,7 +42941,7 @@ "type": "null" } ], - "description": "Inline voice references for zero-shot cloning. Requires MessagePack (not JSON). For single speaker, provide an array of ReferenceAudio objects. For multiple speakers, provide an array of arrays where each inner array contains references for one speaker. **Multi-speaker is available with `s3-pro`, the S2 family (`s2-pro`, `s2.1-pro`), and `drama-3`, not `s1`.** The speaker index corresponds to the index in reference_id array. Example for multi-speaker: [[{audio, text}], [{audio, text}, {audio, text}]] for 2 speakers where speaker 1 has 2 reference samples.", + "description": "Inline voice references for zero-shot cloning. Requires MessagePack (not JSON). For single speaker, provide an array of ReferenceAudio objects. For multiple speakers, provide an array of arrays where each inner array contains references for one speaker. **Multi-speaker is available with `s3-pro`, `s3-pro-free`, the S2 family (`s2-pro`, `s2.1-pro`), and `drama-3`, not `s1`.** The speaker index corresponds to the index in reference_id array. Example for multi-speaker: [[{audio, text}], [{audio, text}, {audio, text}]] for 2 speakers where speaker 1 has 2 reference samples.", "title": "References" }, "reference_id": { @@ -42959,7 +42962,7 @@ } ], "default": null, - "description": "Voice model ID(s) from Fish Audio library or your custom models. For single-speaker synthesis, provide a string. For multi-speaker synthesis (dialogue), provide an array of model IDs. **Multi-speaker is available with `s3-pro`, the S2 family (`s2-pro`, `s2.1-pro`), and `drama-3`, not `s1`.** When using multiple speakers, use speaker tags in your text like `<|speaker:0|>` and `<|speaker:1|>` to indicate speaker changes. Example: `<|speaker:0|>Hello!<|speaker:1|>Hi there!<|speaker:0|>How are you?` with `reference_id: [\"speaker-a-id\", \"speaker-b-id\"]`.", + "description": "Voice model ID(s) from Fish Audio library or your custom models. For single-speaker synthesis, provide a string. For multi-speaker synthesis (dialogue), provide an array of model IDs. **Multi-speaker is available with `s3-pro`, `s3-pro-free`, the S2 family (`s2-pro`, `s2.1-pro`), and `drama-3`, not `s1`.** When using multiple speakers, use speaker tags in your text like `<|speaker:0|>` and `<|speaker:1|>` to indicate speaker changes. Example: `<|speaker:0|>Hello!<|speaker:1|>Hi there!<|speaker:0|>How are you?` with `reference_id: [\"speaker-a-id\", \"speaker-b-id\"]`.", "title": "Reference Id" }, "prosody": {