# Callback API

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

**URL**: callback url truyền lên khi gọi API create text

**Method**: POST

| **Tham số**   | **Kiểu dữ liệu** | **Mô tả**                                                         |
| ------------- | ---------------- | ----------------------------------------------------------------- |
| transcriptId  | String           | ID transcript                                                     |
| status        | String           | Trạng thái của API                                                |
| transcript    | String           | Văn bản nhận dạng ghép từ tất cả các utterances                   |
| utterances    | String           | Danh sách từng đoạn nhận dạng gồm text, startTime, endTime (giây) |
| audioDuration | String           | Thời lượng WAV                                                    |
| errorMessage  | String           | Mã lỗi khi status = FAILED                                        |

```
// Payload webhook (POST về webhookUrl):

{
  "transcriptId": "job-uuid-456",
  "status": "COMPLETED",
  "transcript": "nội dung nhận dạng",
  "utterances": [...],
  "audioDuration": 8
}

// Khi status = FAILED

{
  "transcriptId": "job-uuid-456",
  "status": "FAILED",
  "errorMessage": "Provider reported failure",
  "audioDuration": 8
}
```


---

# 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/vbee-api/speech-to-text/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.
