KingCong API
Operational
Select Theme
Log In Sign Up
Get started / Overview

Introduction

KingCong is the unified text-to-speech AI API for developers.

Generate expressive speech and synchronized SRT subtitles across all premier AI models (ElevenLabs, MiniMax, KingCong Studio, Edge TTS, Kokoro) through one uniform REST API.

Authentication & API Key

All requests require authentication via HTTP header using xi-api-key, Authorization: Bearer, or X-API-Key.

Personal API Key

Not Logged In

Login Required

Log in to your account to create and manage your API keys.

Log In
LLM PROMPT

AI Agent Markdown Specification (English)

Copy this complete specification directly into Cursor, Windsurf, Claude, or ChatGPT to implement integration code in seconds.

# KingCong Studio Public TTS API Specification (v1.0)

## 1. System Overview
KingCong Studio provides a unified, high-throughput Text-to-Speech (TTS) REST API capable of synthesizing studio-quality speech and word-level timestamped SRT subtitles across multiple AI speech engines with a single API key:
- **ElevenLabs**: Expressive multilingual speech, emotional nuance, voice cloning (`eleven_multilingual_v2`, `eleven_turbo_v2_5`).
- **MiniMax**: Fast, long-form conversational and storytelling speech (`speech-01-turbo`, `speech-01-hd`).
- **KingCong Studio**: Native Vietnamese voices (e.g., CD Team 2), word-level SRT subtitle export, speed/pitch/vol adjustment (`vieten_speech`, `lingual_speech_v2`).
- **Edge TTS**: Microsoft Azure multi-language voices with 99.9% uptime and high throughput.
- **Kokoro**: Lightweight open-source models with sub-second response times.

---

## 2. Base URL & Authentication
- **Base URL**: `https://api.kingcongstudio.com`
- **Authentication**: All endpoints require an API Key supplied in request headers.
  The API supports any of the following standard header formats:
  ```http
  xi-api-key: kingcongapikey_<48_hex_chars>  ```
  ```http
  Authorization: Bearer kingcongapikey_<48_hex_chars>  ```
  ```http
  X-API-Key: kingcongapikey_<48_hex_chars>  ```
- **Access Prerequisite**: An initial Credit deposit (minimum 50,000 VND) is required on your KingCong Studio account (`https://kingcongstudio.com/ai/kingcong/billing`) to activate API access.

---

## 3. Endpoints Specification

### 3.1 Health Check (Liveness Probe)
Verifies API availability and validates authentication keys.
- **Method**: `GET /v1/health-check`
- **Headers**: `xi-api-key: $API_KEY`
- **Response (200 OK)**:
  ```json
  {
    "status": "success",
    "data": {
      "service": "kingcong-api",
      "ok": true,
      "time": "2026-10-03T02:12:54+00:00"
    }
  }
  ```

### 3.2 Account Credits Balance
Queries remaining character credits associated with the caller's API key.
- **Method**: `GET /v1/credits`
- **Headers**: `xi-api-key: $API_KEY`
- **Response (200 OK)**:
  ```json
  {
    "status": "success",
    "data": {
      "credits": 250000,
      "email": "[email protected]"
    }
  }
  ```

### 3.3 List Supported Providers
Retrieves metadata and supported features for all active speech engines.
- **Method**: `GET /v1/providers`
- **Headers**: `xi-api-key: $API_KEY`

### 3.4 List Models
Retrieves available model IDs filtered by provider.
- **Method**: `GET /v1/models?provider={provider}`
- **Query Parameters**:
  - `provider` (optional): `kingcong` | `elevenlabs` | `minimax` | `edge_tts` | `kokoro`. Omit to return all.

### 3.5 Search & List Voice Library
Fetches paginated voices with search filtering.
- **Method**: `GET /v1/voices`
- **Query Parameters**:
  - `provider` (optional): Filter by provider name.
  - `search` (optional): Substring filter for voice name or language.
  - `page` (optional, default: 1): Page number.
  - `limit` (optional, default: 20, max: 100): Page size.

### 3.6 Create Speech (Text-to-Speech)
Submits an asynchronous text-to-speech task.
- **Method**: `POST /v1/text-to-speech/{voice_id}`
- **Headers**:
  - `Content-Type: application/json`
  - `xi-api-key: $API_KEY`
- **Path Parameter**:
  - `voice_id` (string, required): Unique identifier of target voice (e.g. `BGC20Gf5f36lf17lw2Y1N` for CD Team 2).
- **Request Body (JSON)**:
  ```json
  {
    "text": "Your text to synthesize into natural speech. Minimum 100 characters required for KingCong native engine.",
    "provider": "kingcong",
    "model_id": "vieten_speech",
    "voice_name": "CD Team 2",
    "speed": 1.0,
    "pitch": 1.0,
    "vol": 1.0,
    "export_srt": true,
    "with_transcript": true
  }
  ```
- **Field Constraints**:
  - `text` (string, REQUIRED): Text content. Minimum length is 100 characters when `provider` is `kingcong`.
  - `provider` (string, optional, default: `elevenlabs`): `kingcong`, `elevenlabs`, `minimax`, `edge_tts`, `kokoro`.
  - `model_id` (string, optional): Specific model identifier from `/v1/models`.
  - `voice_name` (string, optional): Display label stored with task metadata.
  - `speed` (float, optional, default: 1.0): Playback rate from `0.5` to `2.0`.
  - `pitch` (float, optional, default: 1.0): Voice pitch adjustment from `0.5` to `1.5`.
  - `vol` (float, optional, default: 1.0): Volume multiplier from `0.1` to `2.0`.
  - `export_srt` (boolean, optional, default: false): Enables word-accurate `.srt` subtitle generation for Vietnamese models.
- **Response (200 OK - Task Submitted)**:
  ```json
  {
    "status": "success",
    "task_id": "Z2v8I9HgPVaIl_2lWZ0Xx",
    "task_status": "pending",
    "credit_cost": 221,
    "new_balance": 7212133,
    "provider": "kingcong",
    "message": "Task created successfully"
  }
  ```

### 3.7 Poll Task Status & Retrieve Audio
Polls task execution status until completion.
- **Method**: `GET /v1/task/{task_id}`
- **Headers**: `xi-api-key: $API_KEY`
- **Status Lifecycle**:
  - `pending` / `queued`: Task is waiting in processing queue.
  - `processing`: AI model is currently rendering audio and subtitles.
  - `done` / `completed`: Synthesis finished. `audio_url` and optional `srt_url` are populated.
  - `failed`: Task failed. Check `error` or `message` property for details. Credits are refunded.
- **Response (200 OK - Completed Task)**:
  ```json
  {
    "status": "success",
    "task_status": "done",
    "progress": 100,
    "audio_url": "https://r2.kingcongstudio.com/users/12/tts_audio/kc_audio_abc123.mp3",
    "srt_url": "https://r2.kingcongstudio.com/users/12/tts_audio/kc_srt_abc123.srt",
    "json_url": "",
    "credit_cost": 221
  }
  ```

### 3.8 List Recent Tasks (History)
- **Method**: `GET /v1/tasks?page=1&limit=20`
- **Headers**: `xi-api-key: $API_KEY`

---

## 4. Production Client Code

### Python Implementation (Task Submission + Polling Loop)
```python
import time
import requests

API_KEY = "kingcongapikey_YOUR_KEY"
BASE_URL = "https://api.kingcongstudio.com"
HEADERS = {
    "Content-Type": "application/json",
    "xi-api-key": API_KEY
}

# 1. Create Speech Task
voice_id = "BGC20Gf5f36lf17lw2Y1N"  # CD Team 2
payload = {
    "text": "Chào mừng bạn đến với KingCong Studio API. Đây là giải pháp chuyển văn bản thành giọng nói tự nhiên với phụ đề SRT chuẩn xác.",
    "provider": "kingcong",
    "model_id": "vieten_speech",
    "voice_name": "CD Team 2",
    "speed": 1.0,
    "export_srt": True
}

res = requests.post(f"{BASE_URL}/v1/text-to-speech/{voice_id}", json=payload, headers=HEADERS)
res_data = res.json()
if res.status_code != 200 or res_data.get("status") != "success":
    raise RuntimeError(f"Task creation failed: {res_data}")

task_id = res_data["task_id"]
print(f"Task submitted successfully! ID: {task_id}")

# 2. Polling Loop
while True:
    poll = requests.get(f"{BASE_URL}/v1/task/{task_id}", headers=HEADERS).json()
    status = poll.get("task_status") or poll.get("status")
    print(f"Polling task status: {status}...")
    
    if status in ("done", "completed"):
        print("Success! Audio URL:", poll.get("audio_url"))
        if poll.get("srt_url"):
            print("Subtitles SRT URL:", poll.get("srt_url"))
        break
    elif status == "failed":
        raise RuntimeError(f"Synthesis failed: {poll.get('error') or poll.get('message')}")
        
    time.sleep(1.5)
```

### TypeScript / Node.js Implementation
```typescript
const API_KEY = "kingcongapikey_YOUR_KEY";
const BASE_URL = "https://api.kingcongstudio.com";

interface TTSResult {
  audioUrl: string;
  srtUrl?: string;
  creditCost: number;
}

async function synthesizeSpeech(text: string, voiceId = "BGC20Gf5f36lf17lw2Y1N"): Promise {
  const headers = {
    "Content-Type": "application/json",
    "xi-api-key": API_KEY
  };

  // 1. Submit Task
  const createRes = await fetch(`${BASE_URL}/v1/text-to-speech/${voiceId}`, {
    method: "POST",
    headers,
    body: JSON.stringify({
      text,
      provider: "kingcong",
      model_id: "vieten_speech",
      speed: 1.0,
      export_srt: true
    })
  });

  const createData = await createRes.json();
  if (!createRes.ok || createData.status !== "success") {
    throw new Error(`TTS creation failed: ${createData.message || createRes.statusText}`);
  }

  const taskId = createData.task_id;

  // 2. Poll until Done
  while (true) {
    await new Promise((resolve) => setTimeout(resolve, 1500));
    const pollRes = await fetch(`${BASE_URL}/v1/task/${taskId}`, { headers });
    const pollData = await pollRes.json();
    const status = pollData.task_status || pollData.status;

    if (status === "done" || status === "completed") {
      return {
        audioUrl: pollData.audio_url,
        srtUrl: pollData.srt_url,
        creditCost: pollData.credit_cost
      };
    }
    if (status === "failed") {
      throw new Error(`TTS synthesis error: ${pollData.error || pollData.message}`);
    }
  }
}
```

---

## 5. HTTP Error Code Reference
| Code | Error Meaning | Resolution |
|:---|:---|:---|
| `401 Unauthorized` | Invalid or absent API key | Check the `xi-api-key` header value |
| `403 Forbidden` | Account has not purchased Credits | Top up credits at `https://kingcongstudio.com/ai/kingcong/billing` to activate API access |
| `400 Bad Request` | Invalid payload or text < 100 chars | Verify input text length and JSON payload structure |
| `404 Not Found` | Target voice ID or task ID not found | Verify voice ID via `GET /v1/voices` |
| `500 Server Error` | Backend speech synthesis failure | Retry request; failed tasks do not deduct credits |

---

## 6. Pricing & Credit Deduction Rates
Billing is strictly consumption-based on character count, base model rate, and optional add-on multipliers:
`Total Credits = Characters × Base Rate × Multipliers`

### 6.1 Base Rates (Credits / Character)
| Engine | Model ID | Display Name | Base Rate (Credits/Char) |
|:---|:---|:---|:---|
| **ElevenLabs** | `eleven_v3` | Eleven v3 | 1.12 |
| ElevenLabs | `eleven_multilingual_v2` | Eleven Multilingual v2 | 1.12 |
| ElevenLabs | `eleven_flash_v2_5` | Eleven Flash v2.5 | 0.56 |
| ElevenLabs | `eleven_turbo_v2_5` | Eleven Turbo v2.5 | 0.56 |
| ElevenLabs | `eleven_turbo_v2` | Eleven Turbo v2 | 0.56 |
| ElevenLabs | `eleven_flash_v2` | Eleven Flash v2 | 0.56 |
| **MiniMax** | `speech-2.8-hd` | MiniMax Speech 2.8 HD | 1.12 |
| MiniMax | `speech-2.6-hd` | MiniMax Speech 2.6 HD | 1.40 |
| MiniMax | `speech-2.5-hd-preview` | MiniMax Speech 2.5 HD | 1.40 |
| MiniMax | `speech-02-hd` | MiniMax Speech 02 HD | 1.40 |
| MiniMax | `speech-01-hd` | MiniMax Speech 01 HD | 1.40 |
| MiniMax | `speech-2.8-turbo` | MiniMax Speech 2.8 Turbo | 1.232 |
| MiniMax | `speech-2.6-turbo` | MiniMax Speech 2.6 Turbo | 1.232 |
| MiniMax | `speech-2.5-turbo-preview` | MiniMax Speech 2.5 Turbo | 1.232 |
| MiniMax | `speech-02-turbo` | MiniMax Speech 02 Turbo | 1.232 |
| MiniMax | `speech-01-turbo` | MiniMax Speech 01 Turbo | 1.232 |
| **KingCong Studio** | `lingual_speech_v2` | KingCong Speech V2 | 1.12 |
| KingCong Studio | `lingual_speech_v1` | KingCong Speech V1 | 1.12 |
| KingCong Studio | `lingual_speech_base` | KingCong Speech Base | 1.12 |
| KingCong Studio | `vieten_speech` | KingCong Vieten Speech | 1.12 |
| KingCong Studio | `jeck_speech` | KingCong Speech+ | 2.24 |

### 6.2 Add-on Multipliers
| Feature Add-on | Multiplier | Notes |
|:---|:---|:---|
| Standard Voice | `x1.00` | Included in base rate |
| Cloned Voice (MiniMax / KingCong) | `x1.15` | Applied when using custom voice clone |
| Export Word-level SRT Subtitles | `x1.15` | Applied when `export_srt: true` or `with_transcript: true` |
| Cloned Voice + Export SRT | `x1.3225` | Compounded multiplier (1.15 × 1.15) |

### 6.3 Quick Examples (Effective Credits / Character)
| Configuration Scenario | Effective Rate (Credits/Char) | Calculation |
|:---|:---|:---|
| ElevenLabs Full (`eleven_v3` / `multilingual_v2`) + SRT | **1.288** | 1.12 × 1.15 |
| ElevenLabs Flash / Turbo + SRT | **0.644** | 0.56 × 1.15 |
| MiniMax HD Cloned Voice | **1.288** | 1.12 × 1.15 |
| MiniMax HD Cloned Voice + SRT | **1.4812** | 1.12 × 1.3225 |
| MiniMax Turbo Cloned Voice | **0.7728** | 0.672 × 1.15 |
| MiniMax Turbo Cloned Voice + SRT | **0.88872** | 0.672 × 1.3225 |
| KingCong Standard Clone (`lingual_speech_v2`) | **1.288** | 1.12 × 1.15 |
| KingCong Standard Clone + SRT | **1.4812** | 1.12 × 1.3225 |
| KingCong Speech+ (`jeck_speech`) + SRT | **2.576** | 2.24 × 1.15 |
| KingCong Speech+ (`jeck_speech`) Clone | **2.576** | 2.24 × 1.15 |
| KingCong Speech+ (`jeck_speech`) Clone + SRT | **2.9576** | 2.24 × 1.3225 |

### 6.4 Cost Estimation for 80,000 Characters
| Configuration Scenario | Total Credits (80k chars) | Effective Rate |
|:---|:---|:---|
| ElevenLabs `eleven_v3` / `eleven_multilingual_v2` | **89,600** | 1.12 |
| ElevenLabs `flash` / `turbo` | **44,800** | 0.56 |
| ElevenLabs Full + SRT | **103,040** | 1.288 |
| ElevenLabs Flash/Turbo + SRT | **51,520** | 0.644 |
| MiniMax HD (Standard) | **89,600** | 1.12 |
| MiniMax Turbo (Standard) | **53,760** | 0.672 |
| MiniMax HD Clone (or HD + SRT) | **103,040** | 1.288 |
| MiniMax Turbo Clone (or Turbo + SRT) | **61,824** | 0.7728 |
| MiniMax HD Clone + SRT | **118,496** | 1.4812 |
| MiniMax Turbo Clone + SRT | **71,098** | 0.88872 |
| KingCong Standard (`lingual_speech_v2`, `vieten_speech`) | **89,600** | 1.12 |
| KingCong Clone (or Standard + SRT) | **103,040** | 1.288 |
| KingCong Clone + SRT | **118,496** | 1.4812 |
| KingCong Speech+ (`jeck_speech`) | **179,200** | 2.24 |
| KingCong Speech+ (`jeck_speech`) + SRT | **206,080** | 2.576 |
GET

Health Check

/v1/health-check

Verify server operational status and validate API connection.

curl -X GET "https://api.kingcongstudio.com/v1/health-check" \
  -H "xi-api-key: $API_KEY"
GET

Credits Balance

/v1/credits

Retrieve the available character credits associated with the provided key.

curl -X GET "https://api.kingcongstudio.com/v1/credits" \
  -H "xi-api-key: $API_KEY"
GET

Providers & Models

/v1/providers | /v1/models

List supported text-to-speech providers and available AI model IDs.

GET /v1/models?provider=kingcong
curl -X GET "https://api.kingcongstudio.com/v1/models?provider=kingcong" \
  -H "xi-api-key: $API_KEY"
GET

Voice Library

/v1/voices

Search and paginate through voice library with over 20,000+ ElevenLabs voices (including 6,665 Vietnamese voices), KingCong native voices, MiniMax, and Edge TTS.

Parameter Type Default Description
provider string all Lọc theo nhà cung cấp: elevenlabs (20k voices), minimax, kingcong, edge_tts, kokoro.
language / lang string all Lọc theo mã ngôn ngữ (ví dụ: vi để lấy 6.665 giọng tiếng Việt, en, ja, ko...).
gender string all Lọc theo giới tính: male hoặc female.
search string none Tìm kiếm nhanh theo tên giọng, ID hoặc nội dung mô tả giọng.
page integer 1 Số thứ tự trang cần lấy dữ liệu.
limit integer 50 Số giọng trên một trang (tối đa 100 giọng / trang).
GET /v1/voices?provider=elevenlabs&lang=vi&limit=10
curl -X GET "https://api.kingcongstudio.com/v1/voices?provider=elevenlabs&lang=vi&limit=10" \
  -H "xi-api-key: $API_KEY"
POST

Text to Speech

/v1/text-to-speech/{voice_id}

Synthesize text into speech. Returns a task ID immediately for polling.

Field Type Required Description
text string YES Input text to synthesize (minimum 100 characters for kingcong provider).
provider string Optional kingcong, elevenlabs, minimax, edge_tts, kokoro. Default: elevenlabs.
model_id string Optional AI model identifier from /v1/models (e.g. vieten_speech).
voice_name string Optional Display name of the voice stored with task metadata.
speed float Optional Reading rate from 0.5 to 2.0 (default: 1.0).
export_srt boolean Optional Enable SRT subtitle generation for Vietnamese KingCong models.
curl -X POST "https://api.kingcongstudio.com/v1/text-to-speech/BGC20Gf5f36lf17lw2Y1N" \
  -H "Content-Type: application/json" \
  -H "xi-api-key: $API_KEY" \
  -d '{
    "text": "Chào mừng bạn đến với KingCong Studio API. Đây là giải pháp chuyển văn bản thành giọng nói tự nhiên với phụ đề SRT chuẩn xác.",
    "provider": "kingcong",
    "model_id": "vieten_speech",
    "voice_name": "CD Team 2",
    "speed": 1.0,
    "export_srt": true
  }'
POST

Speech to Text (STT)

/v1/speech-to-text

High-accuracy, ultra-fast Speech-to-Text transcription powered by Groq Whisper LPU. Automatically segments natural sentences and generates millisecond-accurate SRT subtitles. Supports direct multipart audio upload or remote audio URLs.

POST /v1/speech-to-text (hoặc /v1/stt) GET /v1/speech-to-text/{task_id} GET /v1/speech-to-text/tasks DELETE /v1/speech-to-text/{task_id}
Field Type Required Description
file binary Conditional Multipart audio file (mp3, wav, m4a, aac, flac, ogg, webm, opus). Required if audio_url is omitted.
audio_url string Conditional Public URL of the audio file to transcribe. Alternative to multipart file upload.
language string Optional Language code: vi (default), en, ko, ja, zh, th, auto.
response_format string Optional json (mặc định), verbose_json (kèm chi tiết từng từ/segment), srt (trả về raw SRT file), text (chỉ trả về text).
prompt string Optional Optional text prompt or vocabulary glossary to guide Whisper context and spelling.
temperature float Optional Sampling temperature from 0.0 (most deterministic) to 1.0 (default: 0.0).
async boolean Optional If true, returns task ID immediately for background polling. Default false (synchronous response).
# 1. Upload file âm thanh trực tiếp (Multipart Form)
curl -X POST "https://api.kingcongstudio.com/v1/speech-to-text" \
  -H "xi-api-key: $API_KEY" \
  -F "file=@/path/to/podcast.mp3" \
  -F "language=vi" \
  -F "response_format=json"

# 2. Hoặc truyền audio_url qua JSON body
curl -X POST "https://api.kingcongstudio.com/v1/speech-to-text" \
  -H "Content-Type: application/json" \
  -H "xi-api-key: $API_KEY" \
  -d '{
    "audio_url": "https://example.com/audio/sample.mp3",
    "language": "vi",
    "response_format": "json"
  }'

Success Response (200 OK):

{
  "status": "success",
  "task_id": "stt_6708b792a1bc3ef4",
  "task_status": "done",
  "text": "Chào mừng bạn đến với KingCong Studio. Đây là hệ thống nhận diện giọng nói và xuất phụ đề SRT tự động.",
  "duration": 12.45,
  "language": "vi",
  "srt_url": "https://api.kingcongstudio.com/uploads/stt/podcast_1728612345.srt",
  "json_url": "https://api.kingcongstudio.com/uploads/stt/podcast_1728612345.json",
  "credit_cost": 63,
  "cost": 63,
  "remaining_credits": 49937
}
GET

AI Tags & Expressive Speech

/v1/ai-tags

AI directional tags allow you to insert audio actions (cough, sneeze, laughter, sigh...) or control emotion, pitch, and voice dynamics directly inside the text parameter of POST /v1/text-to-speech/{voice_id}.

Pause / Delay Syntax by Provider
ElevenLabs:
<break time="1.0s" />
MiniMax:
<#1#> (nghỉ 1s)
KingCong:
[delay=1s]

1. Audio Actions & Biological Sounds

Action Tag AI Syntax Example & Description
Ho / Hắng giọng[cough][cough]Khụ khụ, xin lỗi mọi người tôi hơi rát họng.
Hắt xì hơi[sneeze][sneeze]Achoo! Thời tiết hôm nay lạnh quá.
Cười[laughter][laughter]Haha, chuyện này vui thật đấy!
Thì thầm[whispering][whispering]Bí mật nhé, đừng nói cho ai biết.
Khóc / Thút thít[crying][crying]Hức hức, tôi nhớ mọi người nhiều lắm.
Thở dài[sigh][sigh]Haizz, mệt mỏi cả một ngày dài rồi.
Ngáp[yawn][yawn]Buồn ngủ quá rồi, đi ngủ thôi.
Hít sâu / Giật mình[gasp][gasp]Trời ơi, chuyện gì vừa xảy ra thế này?
Sụt sịt[sniff][sniff]Trời lạnh làm mũi tôi cứ cay xè.
Ngâm nga[humming][humming]Hmm, để tôi suy nghĩ xem nào.
Hát[singing][singing]La la la, một ngày mới tràn ngập ánh nắng.
La hét[screaming][screaming]Á! Đáng sợ quá cứu tôi với!
Nói lớn / Quát[shouting][shouting]Tất cả chú ý, tiến lên phía trước!
Ợ[burping][burping]Burp, no căng cả bụng rồi.

2. Emotions & Voice Dynamics

Mood / Pitch Tag AI Nuance & Effect
Trìu mến / Yêu thương[affection]Dịu dàng, ấm áp, giàu tình cảm
Thích thú / Hài hước[amusement]Giọng tươi cười, hóm hỉnh, vui tính
Hân hoan / Vui mừng[elation]Tươi tắn, ngập tràn niềm vui sướng
Hào hứng / Sôi nổi[enthusiasm]Năng lượng cao, nhiệt huyết, phấn khởi
Mãn nguyện[contentment]Thanh thản, nhẹ nhõm, hài lòng
Tự hào[pride]Dõng dạc, kiêu hãnh, tự tin
Nhẹ nhõm[relief]Thở phào, trút được gánh nặng
Kinh ngạc[awe]Trầm trồ, thán phục, choáng ngợp
Bất ngờ / Ngạc nhiên[surprise]Giật mình, bất ngờ không lường trước
Buồn bã / U sầu[sadness]Trầm u uất, nghẹn lời, đau lòng
Giận dữ / Phẫn nộ[anger]Gắt gỏng, gay gắt, bực bội
Sợ hãi / Hoảng hốt[fear]Run rẩy, lắp bắp, lo lắng
Ghê tởm / Khó chịu[disgust]Chán ghét, coi thường, khinh khỉnh
Bối rối / Ngập ngừng[confusion]Ngơ ngác, phân vân, chưa hiểu chuyện
Quyết tâm / Đanh thép[determination]Dứt khoát, kiên định, mạnh mẽ
Mong mỏi / Hoài niệm[longing]Day dứt, chờ đợi, khao khát
Biểu cảm hơn (Kịch tính)[expressive_high]Tăng cường biểu cảm tối đa, giàu cảm xúc, nhấn nhá kịch tính
Ít biểu cảm (Giọng tin tức)[expressive_low]Giọng đều đều, nghiêm túc, phong cách đọc thời sự
Giọng cao (Tông cao)[pitch_high]Tăng cao độ thanh mảnh, trẻ con, hoạt hình
Giọng trầm (Tông thấp)[pitch_low]Hạ cao độ trầm ấm, vang dày, phong cách kể chuyện
# 1. Tra cứu danh mục Tags AI & Cú pháp mới nhất (Không bắt buộc API Key)
curl -X GET "https://api.kingcongstudio.com/v1/ai-tags"

# 2. Gọi Text to Speech với thẻ cảm xúc và hiệu ứng âm thanh
curl -X POST "https://api.kingcongstudio.com/v1/text-to-speech/BGC20Gf5f36lf17lw2Y1N" \
  -H "Content-Type: application/json" \
  -H "xi-api-key: $API_KEY" \
  -d '{
    "text": "[affection]Chào các bạn! [laughter]Haha, hôm nay tôi có một tin vui muốn chia sẻ.  [cough]Khụ khụ, xin lỗi nhé, tôi hơi khàn giọng một chút.",
    "provider": "elevenlabs"
  }'
GET

Task Polling

/v1/task/{task_id}

Poll task progress. When task_status equals done, audio_url is ready for download.

curl -X GET "https://api.kingcongstudio.com/v1/task/Z2v8I9HgPVaIl_2lWZ0Xx" \
  -H "xi-api-key: $API_KEY"
GET

Task History

/v1/tasks

Fetch paginated history of recent speech generation tasks.

GET /v1/tasks?page=1&limit=20
curl -X GET "https://api.kingcongstudio.com/v1/tasks?page=1&limit=20" \
  -H "xi-api-key: $API_KEY"

Error Codes

Code Description Resolution
401 Missing or invalid API key Check the xi-api-key or Authorization header value.
403 Account has not purchased credits Deposit credits at /ai/kingcong/billing to activate API access.
400 Invalid request parameters / minimum 100 characters Ensure text input is at least 100 characters for the KingCong provider.
404 Voice ID or task ID not found Verify voice ID via GET /v1/voices.
BILLING

Pricing & API Policies

KingCong Studio API uses transparent, consumption-based billing. Credits are deducted directly from your account based on character count, model base rate, and optional add-on features (Cloned Voices, SRT subtitle export).

API Billing Calculation Formula:
Credits Cost = Characters × Base Rate × Add-on Multiplier

1. Base Rates (Credits / Character)

Provider Model ID Display Name Base Rate (Credits / Char) Key Features & Use Case
ElevenLabs eleven_v3 Eleven v3 1.12 Latest flagship model with ultra-expressive emotional nuance
eleven_multilingual_v2 Eleven Multilingual v2 1.12 Premier multilingual voice synthesis with natural Vietnamese support
eleven_flash_v2_5 Eleven Flash v2.5 0.56 Ultra-fast inference (~75ms latency), 50% cost savings for realtime apps
eleven_turbo_v2_5 Eleven Turbo v2.5 0.56 Optimized latency & quality balance for conversational agents
eleven_turbo_v2 Eleven Turbo v2 0.56 Stable Turbo v2 generation model, cost-effective
eleven_flash_v2 Eleven Flash v2 0.56 High-speed Flash v2 generation for high-throughput workloads
MiniMax speech-2.8-hd MiniMax Speech 2.8 HD 1.12 Flagship 2.8 HD model with expressive storytelling capability
speech-2.6-hd MiniMax Speech 2.6 HD 1.12 High-definition voice synthesis for audiobooks and video narrations
speech-2.5-hd-preview MiniMax Speech 2.5 HD Preview 1.12 Preview 2.5 HD version with natural intonation
speech-02-hd MiniMax Speech 02 HD 1.12 Standard HD model with excellent multi-lingual stability
speech-01-hd MiniMax Speech 01 HD 1.12 Classic 01 HD long-form text synthesis engine
speech-2.8-turbo MiniMax Speech 2.8 Turbo 0.672 Next-gen 2.8 Turbo engine balancing speed & 40% cost reduction
speech-2.6-turbo MiniMax Speech 2.6 Turbo 0.672 Fast processing suitable for automated bulk generation pipelines
speech-2.5-turbo-preview MiniMax Speech 2.5 Turbo Preview 0.672 Turbo 2.5 preview with optimized time-to-first-byte
speech-02-turbo MiniMax Speech 02 Turbo 0.672 Ultra-economical Turbo 02 model for high-volume content
speech-01-turbo MiniMax Speech 01 Turbo 0.672 Standard 01 Turbo generation engine
KingCong lingual_speech_v2 KingCong Speech V2 1.12 Flagship native Vietnamese V2 model with natural cadence and phrasing
lingual_speech_v1 KingCong Speech V1 1.12 Stable native Vietnamese V1 model
lingual_speech_base KingCong Speech Base 1.12 Standard native Vietnamese regional accents (Northern & Southern)
vieten_speech KingCong Vieten Speech 1.12 Bilingual Vietnamese-English model (e.g. CD Team 2) with precise SRT support
jeck_speech KingCong Speech+ 2.24 Premium cinema-grade vocal model with rich tone and emotional weight

2. Add-on Multipliers

Add-on Feature Multiplier Applicable Models Description
Standard Voice x1.00 All engines Included in base rate by default without additional cost.
Cloned Voice x1.15 MiniMax, KingCong Studio Applied when synthesizing with personal custom cloned voice IDs.
Export SRT / Transcript x1.15 All supported models Applied when export_srt: true or with_transcript: true is passed for word-level timestamps.
Cloned Voice + Export SRT x1.3225 MiniMax, KingCong Studio Compounded multiplier when using both clone voice and SRT export simultaneously (1.15 × 1.15 = 1.3225).

3. Quick Examples (Effective Credits / Character)

Configuration Scenario Representative Model Formula Effective Rate (Credits/Char)
ElevenLabs Full + SRT eleven_v3, eleven_multilingual_v2 1.12 × 1.15 1.288
ElevenLabs Flash / Turbo + SRT eleven_flash_v2_5, turbo_v2_5 0.56 × 1.15 0.644
MiniMax HD Clone speech-2.8-hd, speech-02-hd 1.12 × 1.15 1.288
MiniMax HD Clone + SRT speech-2.8-hd, speech-02-hd 1.12 × 1.3225 1.4812
MiniMax Turbo Clone speech-2.8-turbo, speech-02-turbo 0.672 × 1.15 0.7728
MiniMax Turbo Clone + SRT speech-2.8-turbo, speech-02-turbo 0.672 × 1.3225 0.88872
KingCong Standard Clone (V2) lingual_speech_v2 1.12 × 1.15 1.288
KingCong Standard Clone + SRT lingual_speech_v2 1.12 × 1.3225 1.4812
KingCong Speech+ (jeck_speech) + SRT jeck_speech 2.24 × 1.15 2.576
KingCong Speech+ (jeck_speech) Clone jeck_speech 2.24 × 1.15 2.576
KingCong Speech+ (jeck_speech) Clone + SRT jeck_speech 2.24 × 1.3225 2.9576

4. Estimated Cost for 80,000 Characters

Configuration Scenario Effective Rate Total Credits (80k chars) Scenario Highlights
ElevenLabs eleven_v3 / multilingual_v2 1.12 89,600 Standard ElevenLabs flagship voice without SRT
ElevenLabs flash / turbo 0.56 44,800 Lowest cost tier for fast high-volume synthesis
ElevenLabs Full + SRT 1.288 103,040 Flagship voice with word-accurate SRT subtitle file
ElevenLabs Flash / Turbo + SRT 0.644 51,520 Flash/Turbo engine with synchronized SRT subtitles
MiniMax HD (Standard) 1.12 89,600 Standard MiniMax HD library voice
MiniMax Turbo (Standard) 0.672 53,760 Standard MiniMax Turbo library voice with 40% savings
MiniMax HD Clone (hoặc HD + SRT) 1.288 103,040 MiniMax HD with cloned voice (or standard HD with SRT)
MiniMax Turbo Clone (hoặc Turbo + SRT) 0.7728 61,824 MiniMax Turbo with cloned voice (or standard Turbo with SRT)
MiniMax HD Clone + SRT 1.4812 118,496 MiniMax HD cloned voice with synchronized SRT subtitles
MiniMax Turbo Clone + SRT 0.88872 71,098 MiniMax Turbo cloned voice with synchronized SRT subtitles
KingCong Standard (lingual_speech_v2) 1.12 89,600 Native Vietnamese standard library voice
KingCong Clone (hoặc Standard + SRT) 1.288 103,040 KingCong cloned voice (or standard voice with SRT)
KingCong Clone + SRT 1.4812 118,496 KingCong cloned voice with synchronized SRT subtitles
KingCong jeck_speech (Speech+) 2.24 179,200 Premium cinema-grade vocal model
KingCong jeck_speech + SRT 2.576 206,080 Premium cinema-grade model with synchronized SRT subtitles

5. Operating & Billing Policies

  • Unlimited Requests & Concurrency: No hard limit on requests per minute or concurrent synthesis tasks. You can freely process high-throughput parallel tasks based on your available Credits balance.
  • Speech to Text (STT): 5 credits / second of audio (~300 credits / minute), including automated transcription and SRT subtitle segmentation.
  • Automatic Refund Guarantee: If a task fails (status failed), 100% of deducted credits are instantly refunded back to your account balance.
  • Team Billing: Automatically deducts credits from team owner balance when member API keys make calls.
Ctrl + I