This document introduces the integration guide for the Fish Model API, which is fully compatible with the Fish Audio Official OpenAPI. It includes:Documentation Index
Fetch the complete documentation index at: https://docs.xhuoapi.ai/llms.txt
Use this file to discover all available pages before exploring further.
POST /fish/model: Create a new cloned voice model based on audio samples.GET /fish/model: Paginate and query the list of voice models visible to the current account or across the platform.
Application Process
To use the API, you need to apply for the corresponding service on the Fish Model API page. After entering the page, click the “Acquire” button. If you are not logged in or registered, you will be automatically redirected to the login page to register and log in. After logging in or registering, you will be automatically returned to the current page. A free quota is granted upon the first application, allowing free use of this API.Differences from the Official API
- Authentication method: Uses
Authorization: Bearer {token}, where{token}is the key applied for on this platform. - Sample upload when creating a model: This interface currently only supports submission in JSON format, passing audio sample URLs through the
voicesfield. The official Fish API supports direct binary upload via multipart/msgpack, which is not yet implemented on this platform. The URL method covers about 80% of common scenarios. - Response structure: Both
POST /fish/modelandGET /fish/modeldirectly forward the upstream Fish responses without platform envelope wrapping. Errors use the platform standard structure{success:false, error:{code,message}, trace_id}.
Create Voice Model (POST /fish/model)
The minimum creation request requires thetitle and voices fields. voices is a list of audio sample URLs, with each file recommended to be longer than 30 seconds and sampled at 16kHz or higher.
_id can be used as the value for the reference_id field in subsequent POST /fish/tts requests to synthesize speech using the cloned voice model.
Query Voice Model List (GET /fish/model)
page_size: Number of items per page, default is 10.page_number: Page number, starting from 1.title: Fuzzy search by title.tag: Filter by tag.self: When set totrue, only returns voice models created by the current account.author_id: Filter by creator.language: Filter by voice model language.title_language: Filter by title language.
Billing Information
This interface only charges when “creating a voice model” (POST /fish/model with voices field in the request body). “Querying voice model list” (GET /fish/model) is free of charge.
Error Handling
400 token_mismatched: Bad request, possibly due to missing or invalid parameters.400 api_not_implemented: Bad request, possibly due to missing or invalid parameters.401 invalid_token: Unauthorized, invalid or missing authorization token.429 too_many_requests: Too many requests, you have exceeded the rate limit.500 api_error: Internal server error, something went wrong on the server.
Error Response Example
Conclusion
The Fish Model API is fully compatible with the Fish Audio Official OpenAPI ModelEntity interface, allowing migration of existing cloned voice management code with zero code changes. The created voice model_id can be directly used as the reference_id field in the Fish TTS API for speech synthesis.
