Light Mode
Zeroshot Text-to-Speech F5-TTS
POST
/api/v1/taskPiAPI Text-to-Speech API Documentation
Overview
PiAPI's Text-to-Speech (TTS) service provides voice cloning and speech synthesis capabilities using zero-shot learning technology. This service allows you to generate speech audio using a reference voice sample, making it possible to create natural-sounding speech in any voice.
Pricing
Service | Price (USD) |
---|---|
Text-to-Speech | $0.025 per 1000 characters |
Model Information
Currently supported model:
- Model Name: Qubico/tts
- Task Type: zero-shot
- Capabilities: Voice cloning and text-to-speech synthesis
Request
Header Params
x-api-key
string
optional
your api key
Body Params application/json
model
enum<string>
required
Model name for TTS generation
Allowed value:
Qubico/tts
task_type
enum<string>
required
Task type for TTS generation
Allowed value:
zero-shot
input
object
required
gen_text
string
required
Text to be converted to speech
<= 10000 characters
ref_audio
string <uri>
required
Reference audio URL or base64 encoded audio data
ref_text
string
optional
Optional text corresponding to the reference audio
config
object
required
service_mode
enum<string>
required
Service mode for the request
Allowed value:
public
webhook_config
object
optional
Example
Empty Data
Request samples
Responses
OK(200)
HTTP Code: 200
Content Type : JSONapplication/json
Successful response
Data Schema
code
enum<integer>
required
Response status code
Allowed value:
200
message
string
required
Response message
data
object
required
task_id
string <uuid>
required
Unique task identifier
model
string
required
Model used for generation
task_type
string
required
Type of task performed
status
string
required
Current status of the task
config
object
optional
Task configuration
input
object
required
Input parameters
output
object
required
meta
object
required
Example
{
"code": 200,
"message": "string",
"data": {
"task_id": "736fde4d-9029-4915-8189-01353d6982cb",
"model": "string",
"task_type": "string",
"status": "string",
"config": {},
"input": {},
"output": {
"audio_url": "http://example.com",
"status": 0,
"message": "string"
},
"meta": {
"created_at": "2019-08-24T14:15:22.123Z",
"started_at": "2019-08-24T14:15:22.123Z",
"ended_at": "2019-08-24T14:15:22.123Z",
"usage": {
"type": "string",
"consume": 0
}
}
}
}
Last modified: 2 months ago