KingCong API
Hoạt động
Chọn ngôn ngữ
Chọn giao diện
Đăng Nhập Đăng Ký
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

Chưa đăng nhập

Yêu cầu đăng nhập

Đăng nhập vào tài khoản để tạo và quản lý API Key của bạn.

Đăng nhập
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

Tra cứu và phân trang toàn bộ kho giọng với hơn 20.000+ giọng ElevenLabs (bao gồm 6.665 giọng tiếng Việt), cùng kho giọng bản xứ KingCong Studio, MiniMax, 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

Chuyển đổi âm thanh thành văn bản độ chính xác cao với tốc độ siêu nhanh (Groq Whisper LPU). Tự động phân đoạn câu thông minh và tạo file phụ đề SRT đồng bộ từng mili-giây. Hỗ trợ upload file trực tiếp hoặc cung cấp URL âm thanh.

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 File âm thanh upload dạng multipart (mp3, wav, m4a, aac, flac, ogg, webm, opus). Yêu cầu nếu không truyền audio_url.
audio_url string Conditional Đường dẫn URL công khai tới file âm thanh để server tự tải về và xử lý. Dùng thay cho upload file.
language string Optional Mã ngôn ngữ ISO: vi (mặc định), 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 Gợi ý từ ngữ ngữ cảnh hoặc thuật ngữ chuyên ngành để nâng cao độ chính xác của Whisper.
temperature float Optional Nhiệt độ lấy mẫu từ 0.0 (chính xác nhất) đến 1.0 (mặc định: 0.0).
async boolean Optional Nếu true, API trả về mã task ID ngay lập tức để client tự poll trạng thái qua GET. Mặc định false (xử lý đồng bộ trả kết quả ngay).
# 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"
  }'

Mẫu phản hồi thành công (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

Các thẻ điều hướng AI cho phép bạn chèn âm thanh sinh học (ho, hắt hơi, cười, thở dài...) hoặc điều hướng sắc thái cảm xúc, cao độ và độ kịch tính trực tiếp vào chuỗi văn bản text khi gửi yêu cầu tới POST /v1/text-to-speech/{voice_id}.

Cú pháp chèn Khoảng dừng (Pauses) theo Provider
ElevenLabs:
<break time="1.0s" />
MiniMax:
<#1#> (nghỉ 1s)
KingCong:
[delay=1s]

1. Hiệu ứng âm thanh & Hành động cơ thể (Audio Actions)

Hành động Tag AI Cú pháp mẫu & Diễn giải
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. Định hướng Cảm xúc & Cao độ (Emotions & Voice Dynamics)

Cảm xúc / Cao độ Tag AI Ý nghĩa & Diễn giải sắc thái
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

Bảng giá & Chính sách API

Hệ thống API KingCong Studio áp dụng cơ chế tính cước minh bạch theo mức tiêu thụ thực tế. Credits được khấu trừ trực tiếp dựa trên số lượng ký tự văn bản, đơn giá cơ bản của từng mô hình AI và các tính năng bổ sung (Giọng nhân bản, Xuất phụ đề SRT).

Công thức tính cước cuộc gọi API:
Chi phí Credits = Số ký tự × Đơn giá cơ bản (Base Rate) × Hệ số phụ phí (Add-on)

1. Đơn giá cơ bản (Base Rates - Credits / Ký tự)

Nhà cung cấp Model ID Tên mô hình Đơn giá (Credits / Ký tự) Đặc tính & Ứng dụng
ElevenLabs eleven_v3 Eleven v3 1.12 Model thế hệ mới nhất, độ biểu cảm phong phú, ngữ điệu chân thực
eleven_multilingual_v2 Eleven Multilingual v2 1.12 Đa ngôn ngữ chất lượng cao, hỗ trợ tiếng Việt mượt mà, ổn định
eleven_flash_v2_5 Eleven Flash v2.5 0.56 Tốc độ siêu nhanh, độ trễ cực thấp (~75ms), tiết kiệm chi phí 50%
eleven_turbo_v2_5 Eleven Turbo v2.5 0.56 Tối ưu độ trễ và chất lượng giọng cho ứng dụng đàm thoại
eleven_turbo_v2 Eleven Turbo v2 0.56 Phiên bản Turbo thế hệ 2 ổn định, tiết kiệm chi phí
eleven_flash_v2 Eleven Flash v2 0.56 Phiên bản Flash thế hệ 2 tốc độ cao cho văn bản ngắn
MiniMax speech-2.8-hd MiniMax Speech 2.8 HD 1.12 Model HD 2.8 đỉnh cao, giọng đọc truyền cảm cho video, sách nói
speech-2.6-hd MiniMax Speech 2.6 HD 1.12 Chất lượng âm thanh HD cho review phim, truyện dài
speech-2.5-hd-preview MiniMax Speech 2.5 HD Preview 1.12 Bản preview HD 2.5 tối ưu âm sắc và ngữ điệu tự nhiên
speech-02-hd MiniMax Speech 02 HD 1.12 Dòng HD tiêu chuẩn, độ ổn định cao trên mọi ngôn ngữ
speech-01-hd MiniMax Speech 01 HD 1.12 Dòng HD đời đầu ổn định, hỗ trợ đọc văn bản dài
speech-2.8-turbo MiniMax Speech 2.8 Turbo 0.672 Model Turbo 2.8 thế hệ mới, cân bằng tốc độ & chi phí tiết kiệm 40%
speech-2.6-turbo MiniMax Speech 2.6 Turbo 0.672 Tốc độ nhanh, thích hợp cho hệ thống tự động hóa
speech-2.5-turbo-preview MiniMax Speech 2.5 Turbo Preview 0.672 Bản thử nghiệm Turbo 2.5 tối ưu thời gian phản hồi
speech-02-turbo MiniMax Speech 02 Turbo 0.672 Model Turbo 02 siêu tiết kiệm cho văn bản dài
speech-01-turbo MiniMax Speech 01 Turbo 0.672 Dòng Turbo tiêu chuẩn, xử lý nhanh
KingCong lingual_speech_v2 KingCong Speech V2 1.12 Model tiếng Việt chuẩn thế hệ 2, phát âm tự nhiên, ngắt nghỉ thông minh
lingual_speech_v1 KingCong Speech V1 1.12 Model tiếng Việt thế hệ 1 ổn định
lingual_speech_base KingCong Speech Base 1.12 Giọng đọc bản ngữ tiêu chuẩn miền Bắc & Nam
vieten_speech KingCong Vieten Speech 1.12 Model đọc song ngữ Việt - Anh mượt mà (e.g. CD Team 2), hỗ trợ xuất SRT chuẩn xác
jeck_speech KingCong Speech+ 2.24 Model cao cấp đặc biệt, âm sắc trầm ấm dày dặn, biểu cảm điện ảnh

2. Hệ số phụ phí dịch vụ (Add-on Multipliers)

Tính năng / Dịch vụ cộng thêm Hệ số nhân Phạm vi áp dụng Mô tả chi tiết
Giọng mẫu mặc định (Standard Voice) x1.00 Tất cả các mô hình Đã bao gồm trong đơn giá cơ bản, không phát sinh thêm chi phí.
Giọng nhân bản (Cloned Voice) x1.15 MiniMax, KingCong Studio Áp dụng khi gọi API với voice_id thuộc kho giọng nhân bản cá nhân của tài khoản.
Xuất phụ đề SRT / Transcript x1.15 Mọi mô hình có hỗ trợ Áp dụng khi bật export_srt: true hoặc with_transcript: true để nhận tệp phụ đề khớp từng từ.
Giọng nhân bản + Xuất SRT x1.3225 MiniMax, KingCong Studio Nhân dồn cả 2 hệ số phụ phí đồng thời (1.15 × 1.15 = 1.3225).

3. Bảng tra cứu đơn giá kết hợp (Quick Examples - Credits / Ký tự)

Kịch bản cấu hình kết hợp Model đại diện Cách tính Đơn giá thực tế (Credits/Ký tự)
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. Bảng dự toán chi phí mẫu cho 80.000 ký tự (~1 cuốn sách / tập truyện dài)

Kịch bản cấu hình Đơn giá (Credits/Ký tự) Tổng Credits (80k ký tự) Đặc điểm gói cấu hình
ElevenLabs eleven_v3 / multilingual_v2 1.12 89,600 Giọng mẫu ElevenLabs cao cấp không xuất SRT
ElevenLabs flash / turbo 0.56 44,800 Tối ưu chi phí tiết kiệm nhất cho tác vụ đọc nhanh
ElevenLabs Full + SRT 1.288 103,040 Model cao cấp kèm tệp phụ đề SRT đồng bộ từng từ
ElevenLabs Flash / Turbo + SRT 0.644 51,520 Model Flash/Turbo kèm phụ đề SRT trọn gói
MiniMax HD (Standard) 1.12 89,600 Giọng mẫu MiniMax HD tiêu chuẩn
MiniMax Turbo (Standard) 0.672 53,760 Giọng mẫu MiniMax Turbo tiết kiệm 40%
MiniMax HD Clone (hoặc HD + SRT) 1.288 103,040 Dùng giọng nhân bản MiniMax HD (hoặc giọng mẫu kèm SRT)
MiniMax Turbo Clone (hoặc Turbo + SRT) 0.7728 61,824 Dùng giọng nhân bản MiniMax Turbo (hoặc giọng mẫu kèm SRT)
MiniMax HD Clone + SRT 1.4812 118,496 Giọng nhân bản MiniMax HD đồng thời xuất phụ đề SRT
MiniMax Turbo Clone + SRT 0.88872 71,098 Giọng nhân bản MiniMax Turbo đồng thời xuất phụ đề SRT
KingCong Standard (lingual_speech_v2) 1.12 89,600 Giọng đọc bản xứ tiếng Việt chuẩn
KingCong Clone (hoặc Standard + SRT) 1.288 103,040 Giọng nhân bản KingCong (hoặc giọng chuẩn kèm SRT)
KingCong Clone + SRT 1.4812 118,496 Giọng nhân bản KingCong đồng thời xuất phụ đề SRT
KingCong jeck_speech (Speech+) 2.24 179,200 Model cao cấp đặc biệt cho sách truyện điện ảnh
KingCong jeck_speech + SRT 2.576 206,080 Model cao cấp Speech+ kèm tệp phụ đề SRT đồng bộ

5. Chính sách vận hành & Hỗ trợ (Billing Policies)

  • Không giới hạn tốc độ & tác vụ song song (Unlimited): Hệ thống không giới hạn số lượng request/phút cũng như số lượng tác vụ tạo giọng xử lý đồng thời. Bạn có thể tự do gửi nhiều tác vụ song song cùng lúc dựa trên số dư Credits khả dụng trong tài khoản.
  • Chuyển âm thanh thành văn bản (STT): 5 credits / giây audio (~300 credits / phút), đã bao gồm tạo văn bản và phân đoạn phụ đề SRT tự động.
  • Cơ chế hoàn phí tự động (Auto Refund): Nếu tác vụ tạo giọng bị lỗi (trạng thái failed), hệ thống sẽ tự động hoàn lại 100% số credits đã trừ ngay lập tức vào số dư tài khoản của bạn.
  • Thanh toán nhóm (Team Billing): Tự động trừ credits từ Trưởng nhóm nếu tài khoản gọi API là thành viên của nhóm.
Ctrl + I