Skip to content

chore: update OpenAPI schema#95

Open
fishaudio-bot wants to merge 1 commit into
mainfrom
chore/update-openapi-schema
Open

chore: update OpenAPI schema#95
fishaudio-bot wants to merge 1 commit into
mainfrom
chore/update-openapi-schema

Conversation

@fishaudio-bot

@fishaudio-bot fishaudio-bot commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Auto-generated update from https://api.fish.audio/openapi.json

Summary by CodeRabbit

  • Documentation
    • Added new text-to-speech model options (s2-pro, s2.1-pro, s2.1-pro-free) for TTS requests.
    • Updated the default model to s2.1-pro-free for text-to-speech endpoints.
    • Updated API documentation examples to reflect the new model recommendations.

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The OpenAPI spec for POST /v1/tts and POST /v1/tts/stream/with-timestamp is updated to change the model header parameter: the description, default value, and enum are updated to s2.1-pro-free with the enum expanded to include s2.1-pro and s2.1-pro-free. Curl code samples across both endpoints are updated to match.

Changes

TTS Model Documentation Update

Layer / File(s) Summary
model parameter schema for both TTS endpoints
api-reference/openapi.json
For both POST /v1/tts and POST /v1/tts/stream/with-timestamp, the model header description now references s2.1-pro-free, the default changes from s2-pro to s2.1-pro-free, and the enum expands from ["s1","s2-pro"] to ["s1","s2-pro","s2.1-pro","s2.1-pro-free"].
curl code samples for both TTS endpoints
api-reference/openapi.json
x-codeSamples curl commands for POST /v1/tts (single-speaker and multi-speaker) and POST /v1/tts/stream/with-timestamp are updated to use model: s2.1-pro-free; the multi-speaker label is renamed to "Multi Speaker (S2.1 Pro only)".

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • fishaudio/docs#51: Directly edits the TTS model enum in openapi.json, removing deprecated model identifiers from POST /v1/tts.
  • fishaudio/docs#55: Modifies the POST /v1/tts model header default and enum to newer TTS model identifiers in api-reference/openapi.json.

Poem

🐇 Hop hop, the models grow!
s2.1-pro-free steals the show,
Old defaults quietly retire,
New enums climb a little higher.
The docs now gleam with fresh delight —
A rabbit tidied things up right! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'chore: update OpenAPI schema' is generic and does not convey the specific nature of the changes, which involve updating model references and enums in the TTS API documentation. Consider a more specific title such as 'chore: update OpenAPI schema for TTS model versions' to better reflect the actual changes made.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/update-openapi-schema

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@api-reference/openapi.json`:
- Around line 2591-2594: The label for the multi-speaker bash example currently
reads "Multi Speaker (S2.1 Pro only)" which incorrectly restricts the feature to
only the paid tier. Update this label to remove the "Pro only" restriction and
clarify that multi-speaker synthesis is supported on both s2.1-pro and
s2.1-pro-free models, since the example curl command correctly demonstrates the
feature working with s2.1-pro-free.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 871884b6-3e12-403f-a0e8-8909087f96b1

📥 Commits

Reviewing files that changed from the base of the PR and between 10493bf and 87f8fd9.

📒 Files selected for processing (1)
  • api-reference/openapi.json

Comment on lines 2591 to +2594
{
"lang": "bash",
"label": "Multi Speaker (S2-Pro only)",
"source": "curl --request POST \\\n --url https://api.fish.audio/v1/tts \\\n --header 'Authorization: Bearer <token>' \\\n --header 'Content-Type: application/json' \\\n --header 'model: s2-pro' \\\n --data '{\n \"text\": \"<|speaker:0|>Hello!<|speaker:1|>Hi there!\",\n \"reference_id\": [\"speaker-a-id\", \"speaker-b-id\"],\n \"temperature\": 0.7,\n \"top_p\": 0.7,\n \"prosody\": {\n \"speed\": 1,\n \"volume\": 0,\n \"normalize_loudness\": true\n },\n \"chunk_length\": 300,\n \"normalize\": true,\n \"format\": \"mp3\",\n \"sample_rate\": 44100,\n \"mp3_bitrate\": 128,\n \"latency\": \"normal\",\n \"max_new_tokens\": 1024,\n \"repetition_penalty\": 1.2,\n \"min_chunk_length\": 50,\n \"condition_on_previous_chunks\": true,\n \"early_stop_threshold\": 1\n }'"
"label": "Multi Speaker (S2.1 Pro only)",
"source": "curl --request POST \\\n --url https://api.fish.audio/v1/tts \\\n --header 'Authorization: Bearer <token>' \\\n --header 'Content-Type: application/json' \\\n --header 'model: s2.1-pro-free' \\\n --data '{\n \"text\": \"<|speaker:0|>Hello!<|speaker:1|>Hi there!\",\n \"reference_id\": [\"speaker-a-id\", \"speaker-b-id\"],\n \"temperature\": 0.7,\n \"top_p\": 0.7,\n \"prosody\": {\n \"speed\": 1,\n \"volume\": 0,\n \"normalize_loudness\": true\n },\n \"chunk_length\": 300,\n \"normalize\": true,\n \"format\": \"mp3\",\n \"sample_rate\": 44100,\n \"mp3_bitrate\": 128,\n \"latency\": \"normal\",\n \"max_new_tokens\": 1024,\n \"repetition_penalty\": 1.2,\n \"min_chunk_length\": 50,\n \"condition_on_previous_chunks\": true,\n \"early_stop_threshold\": 1\n }'"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

Fish Audio TTS multi-speaker support s2.1-pro-free vs s2.1-pro model

💡 Result:

Both the s2.1-pro and s2.1-pro-free models are variations of the same Fish Audio S2.1-Pro architecture [1][2], which supports multi-speaker dialogue synthesis [3][4]. The capability is a core feature of the S2-Pro series, not a differentiator between the paid and free tiers [3][5][4]. To utilize multi-speaker support, you must use the s2-pro model identifier [6][4] (which represents the S2.1-Pro series) and format your request as follows: 1. Text Formatting: Use inline speaker tags, such as <|speaker:0|> and <|speaker:1|>, within your text to indicate speaker changes [3][5][1]. 2. Voice Mapping: Instead of providing a single reference_id or voice, you must provide an array of model IDs (e.g., ["speaker-a-id", "speaker-b-id"]) that correspond to the speaker indices defined in your text [3][5][1]. The model handles turn-taking, pacing, and natural pauses between the speakers automatically [5]. Note that the speech.voices (array) and speech.voice (singular) parameters are mutually exclusive; using the array format is required to enable the multi-speaker functionality [5][1]. The s2.1-pro-free tier provides access to these same technical capabilities, typically optimized for development, testing, or lower-latency needs [2].

Citations:


🏁 Script executed:

# Find and verify the openapi.json file
fd -name "openapi.json" -type f

# Check lines 2591-2594 and surrounding context
sed -n '2585,2600p' api-reference/openapi.json

Repository: fishaudio/docs

Length of output: 2370


Update the label to remove the "Pro only" restriction; multi-speaker is supported on both s2.1-pro and s2.1-pro-free.

The label reads "Multi Speaker (S2.1 Pro only)" but according to Fish Audio's documentation, multi-speaker synthesis is a core feature available on both the s2.1-pro and s2.1-pro-free models—it is not exclusive to the paid tier. The curl sample correctly uses s2.1-pro-free, but the label is misleading and should be updated to reflect that multi-speaker works on both tier variants.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@api-reference/openapi.json` around lines 2591 - 2594, The label for the
multi-speaker bash example currently reads "Multi Speaker (S2.1 Pro only)" which
incorrectly restricts the feature to only the paid tier. Update this label to
remove the "Pro only" restriction and clarify that multi-speaker synthesis is
supported on both s2.1-pro and s2.1-pro-free models, since the example curl
command correctly demonstrates the feature working with s2.1-pro-free.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant