- Get Started
- Endpoints
- Song(Udio)
- Kling
- Hailuo
- Flux
- AI Hug
- LLM
- Midjourney
- Faceswap
- TTS
- Trellis
- Luma Dream Machine
- WanX
- Skyreels
- Framepack
- Hunyuan Video
- Mmaudio
- DiffRhythm
- Tools
- PiAPI Account Management
- Resources
- Legacy Documentation
Zeroshot Text-to-Speech F5-TTS
POST
/api/v1/task
Text-to-Speech
PiAPI Text-to-Speech API Documentation#
Overview#
Pricing#
Service | Price (USD) |
---|---|
Text-to-Speech | $0.025 per 1000 characters |
Model Information#
Request
Header Params
x-api-key
string
optional
Body Params application/json
model
enum<string>
required
Allowed value:
Qubico/tts
task_type
enum<string>
required
Allowed value:
zero-shot
input
object
required
gen_text
string
required
<= 10000 characters
ref_audio
string <uri>
required
ref_text
string
optional
config
object
required
service_mode
enum<string>
required
Allowed value:
public
webhook_config
object
optional
Example
{
"model": "Qubico/tts",
"task_type": "zero-shot",
"input": {
"gen_text": "string",
"ref_audio": "http://example.com",
"ref_text": "string"
},
"config": {
"service_mode": "public",
"webhook_config": {
"endpoint": "http://example.com",
"secret": "string"
}
}
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.piapi.ai/api/v1/task' \
--header 'x-api-key;' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "Qubico/tts",
"task_type": "zero-shot",
"input": {
"gen_text": "string",
"ref_audio": "http://example.com",
"ref_text": "string"
},
"config": {
"service_mode": "public",
"webhook_config": {
"endpoint": "http://example.com",
"secret": "string"
}
}
}'
Responses
🟢200OK
application/json
Body
code
enum<integer>
required
Allowed value:
200
message
string
required
data
object
required
task_id
string <uuid>
required
model
string
required
task_type
string
required
status
string
required
config
object
optional
input
object
required
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:22Z",
"started_at": "2019-08-24T14:15:22Z",
"ended_at": "2019-08-24T14:15:22Z",
"usage": {
"type": "string",
"consume": 0
}
}
}
}
Modified at 2025-04-03 02:46:55