# Callback API

Khi request thành công, hệ thống VBEE TTS sẽ gửi đến Callback URL một HTTP POST như sau

**URL**: callback url truyền lên khi gọi API Create speech

**Method**: POST

**Content Type**: application/json

**Body**:

| Thuộc tính   | Kiểu dữ liệu | Mô tả                                                                                 |
| ------------ | ------------ | ------------------------------------------------------------------------------------- |
| app\_id      | String       | ID của ứng dụng                                                                       |
| request\_id  | String       | ID của request                                                                        |
| characters   | Number       | Số ký tự của đoạn văn bản                                                             |
| voice\_code  | String       | Mã giọng                                                                              |
| audio\_type  | String       | Định dạng file audio đầu ra                                                           |
| speed\_rate  | Number       | Tốc độ đọc                                                                            |
| sample\_rate | String       | Sample rate của audio đầu ra                                                          |
| bitrate      | Number       | Bitrate của file audio đầu ra                                                         |
| created\_at  | String       | Thời gian khởi tạo request                                                            |
| status       | String       | <p>Trạng thái của request</p><p>\* SUCCESS: Thành công</p><p>\* FAILURE: Thất bại</p> |
| audio\_link  | String       | Đường dẫn tải file audio tổng hợp                                                     |

```
//Example request
{
    "app_id": "{{app_id}}",
    "response_type": "indirect",
    "callback_url": "https://mydomain/callback",
    "input_text": "Xin Chào mừng đén với website của chúng tôi! Đây là trang web cung cấp một giải pháp văn bản thành giọng nói, trên cơ sở, nó hỗ trợ các doanh nghiệp xây dựng các hệ thống trung tâm cuộc gọi tự động, hệ thống thông báo công khai, trợ lý ảo, tin tức âm thanh, podcast, sách âm thanh và tường thuật phim.",
    "voice_code": "hn_female_ngochuyen_full_48k-fhg",
    "audio_type":"mp3",
    "bitrate": 128,
    "speed_rate": "1.0"
}

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api-docs.vbee.vn/text-to-speech-lagacy/callback-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
