Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions api-reference/endpoint/model/create-model.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,27 @@ iconType: "solid"
requests. Let your HTTP client set the multipart `Content-Type` boundary
automatically.
</Warning>

## Uploading voice files

`type`, `title`, `train_mode`, and `voices` are required. Send each audio file
as a `voices` form field, repeating the field to upload several clips.

```bash curl

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use a valid language tag for the code fence.

Change ```bash curl to ```bash; the current info string may prevent MDX renderers from recognizing the block as Bash. As per coding guidelines, all code blocks must include language tags and examples must follow the project’s formatting conventions.

🤖 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/endpoint/model/create-model.mdx` at line 20, Update the code
fence preceding the curl example in the create-model documentation from the
invalid “bash curl” info string to the valid “bash” language tag, preserving the
example content and project formatting conventions.

Source: Coding guidelines

curl --request POST https://api.fish.audio/model \
--header "Authorization: Bearer $FISH_API_KEY" \
--form type=tts \
--form train_mode=fast \
--form title="My Voice" \
--form voices=@a.wav \
--form voices=@b.wav
```

To send your own transcripts, add one `texts` field per clip, in the same order
as the `voices` fields. Omit `texts` and ASR runs on the uploaded audio instead.

<Note>
`samples` is not a request field, so there is nothing to supply for it. It
appears only on the model returned by this endpoint, where it defaults to an
empty list and holds the preview clips once they exist.
</Note>