Documentation

API Documentation

Qubico/tts API Reference

Complete API documentation for the F5-TTS model supporting zero-shot voice cloning and text-to-speech generation.

Quick Start
Get started with F5-TTS model in minutes

Base URL

https://api.qubico.ai/v1/inference

Header Params

x-api-key: YOUR_API_KEY

Model ID

Qubico/tts
Zero-shot Text-to-Speech
Generate speech in any voice using a reference audio sample

Request Example

POST https://api.qubico.ai/v1/inference
Content-Type: application/json
x-api-key: YOUR_API_KEY

{
  "model": "Qubico/tts",
  "task_type": "zero-shot",
  "input": {
    "gen_text": "Hello, this is a demonstration of F5-TTS voice cloning technology. The quality is remarkably natural and expressive.",
    "ref_audio": "https://example.com/reference-voice.wav",
    "ref_text": "This is the reference audio transcript that matches exactly what was spoken." // Optional: improves quality
  },
  "config": {
    "service_mode": "public",
    "webhook_config": {
      "endpoint": "https://your-webhook.com/callback",
      "secret": "your_webhook_secret"
    }
  }
}

Response Example

{
  "task_id": "tts_12345678",
  "status": "pending",
  "model": "Qubico/tts",
  "task_type": "zero-shot",
  "created_at": "2024-01-15T10:30:00Z",
  "estimated_time": 8
}
Parameters Reference
Complete list of available parameters for F5-TTS model

Required Parameters

model
string
required

Model identifier. Must be "Qubico/tts"

task_type
string
required

Task type. Must be "zero-shot"

input.gen_text
string
required

Text to convert to speech. Maximum 10,000 characters. Required for zero-shot voice cloning.

input.ref_audio
string
required

URL to the reference audio file. Should be 3-30 seconds long, clear quality. Supports WAV, MP3, FLAC formats.

Optional Parameters

config.service_mode
string
optional

Service execution mode. Options: "public", "private". Default: "public"

input.ref_text
string
optional

The transcript of the reference audio. When provided, should match the spoken content in ref_audio for better quality. If not provided, the model will automatically transcribe the reference audio.

Configuration Parameters

config.webhook_config
object
optional

Webhook configuration for async notifications

endpoint - Webhook URL
secret - Webhook secret for verification
Response Format
Understanding API responses and status codes

Initial Response (202 Accepted)

{
  "task_id": "tts_12345678",
  "status": "pending",
  "model": "Qubico/tts",
  "task_type": "zero-shot",
  "created_at": "2024-01-15T10:30:00Z",
  "estimated_time": 8
}

Completed Response (GET /v1/tasks/task_id)

{
  "task_id": "tts_12345678",
  "status": "completed",
  "model": "Qubico/tts",
  "task_type": "zero-shot",
  "created_at": "2024-01-15T10:30:00Z",
  "completed_at": "2024-01-15T10:30:08Z",
  "results": [
    {
      "url": "https://cdn.qubico.ai/results/audio_1.wav",
      "duration": 12.5,
      "format": "wav",
      "sample_rate": 22050,
      "channels": 1
    }
  ],
  "usage": {
    "credits_used": 1,
    "character_count": 156
  }
}

Status Values

pending
Task is queued
processing
Task is being processed
completed
Task completed successfully
failed
Task failed with error
Error Handling
Common error codes and how to handle them

Error Response Format

{
  "error": {
    "code": "INVALID_REFERENCE_AUDIO",
    "message": "Reference audio file is too short. Minimum duration is 3 seconds.",
    "details": {
      "provided_duration": 1.2,
      "minimum_duration": 3.0,
      "audio_url": "https://example.com/short-audio.wav"
    }
  }
}
Code Examples
Ready-to-use code snippets in popular languages
curl -X POST https://api.qubico.ai/v1/inference \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "model": "Qubico/tts",
    "task_type": "zero-shot",
    "input": {
      "gen_text": "Hello, this is a demonstration of F5-TTS voice cloning technology.",
      "ref_audio": "https://example.com/reference-voice.wav"
    },
    "config": {
      "service_mode": "public"
    }
  }'
Rate Limits & Pricing
Usage limits and cost information

Rate Limits

Requests per minute:
30
Concurrent tasks:
5
Daily requests:
500

Pricing

Per 1000 characters:
$0.025
Free trial credits:
40,000 chars
Minimum purchase:
$5