Skip to content

chore: update OpenAPI schema#95

Merged
Kilerd merged 1 commit into
mainfrom
chore/update-openapi-schema
Jul 9, 2026
Merged

chore: update OpenAPI schema#95
Kilerd merged 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
    • Updated text and examples for text-to-speech requests to highlight the recommended s2.1-pro-free model.
    • Expanded the list of supported model values shown in the API docs.
    • Added a documented 403 response for model lookup requests.
    • Refreshed sample requests to match the latest recommended model and clarified the multi-speaker example.

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 28a17062-3661-424f-89ed-00a2eb8f4906

📥 Commits

Reviewing files that changed from the base of the PR and between 70527c7 and 84670fd.

📒 Files selected for processing (1)
  • api-reference/openapi.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • api-reference/openapi.json

📝 Walkthrough

Walkthrough

The OpenAPI spec updates the documented TTS model header values and curl samples to s2.1-pro-free, and adds a 403 response definition to GET /model/{id}.

Changes

TTS OpenAPI Documentation Update

Layer / File(s) Summary
model parameter schema updates
api-reference/openapi.json
For POST /v1/tts and POST /v1/tts/stream/with-timestamp, the model header description now references s2.1-pro-free, the default changes to s2.1-pro-free, and the enum expands to include s2.1-pro and s2.1-pro-free.
curl code sample updates
api-reference/openapi.json
The POST /v1/tts and POST /v1/tts/stream/with-timestamp curl samples now send model: s2.1-pro-free, and the multi-speaker label changes to Multi Speaker (S2.1 Pro only).
model lookup forbidden response
api-reference/openapi.json
GET /model/{id} gains a 403 response with a JSON body schema containing status and message.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • fishaudio/docs#51: Directly edits the TTS model enum in openapi.json for POST /v1/tts.
  • fishaudio/docs#55: Modifies the POST /v1/tts model header documentation and examples in the same OpenAPI file.
  • fishaudio/docs#94: Also updates the documented TTS model lineup and free-tier model guidance.

Suggested reviewers: twangodev

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: an update to the OpenAPI schema.
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.
✨ 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.

@fishaudio-bot
fishaudio-bot force-pushed the chore/update-openapi-schema branch from 70527c7 to 84670fd Compare July 9, 2026 04:18
@Kilerd
Kilerd merged commit 3ec13d5 into main Jul 9, 2026
6 checks passed
@Kilerd
Kilerd deleted the chore/update-openapi-schema branch July 9, 2026 04:41
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.

2 participants