# Get request

**URL**:[ ](https://vbee.vn/api/v1/tts) [https://api.vbee.vn/v1/tts/requests/{{requestId}}](https://dev-api.vbee.vn/v1/tts/requests/%7B%7BrequestId)&#x20;

**Method**: GET

**Tham số Header**

<table data-header-hidden><thead><tr><th width="131"></th><th></th><th></th><th></th><th></th></tr></thead><tbody><tr><td>Tham số</td><td>Giá trị</td><td>Kiểu dữ liệu</td><td>Tính bắt buộc</td><td>Mô tả</td></tr><tr><td>Authorization</td><td>Bearer {{token}}</td><td><p></p><p></p><p>String</p><p><br></p></td><td>Có</td><td>Token xác thực dạng Bearer: Bearer &#x3C;access_token></td></tr><tr><td>App-Id</td><td>{{app-id}}</td><td><p></p><p></p><p>String</p><p><br></p></td><td>Có</td><td>ID của ứng dụng người dùng tạo</td></tr><tr><td>Content-Type</td><td>application/json</td><td><br></td><td>Có</td><td>Chỉ định kiểu nội dung JSON</td></tr></tbody></table>

**Tham số Path**

<table data-header-hidden><thead><tr><th width="110"></th><th width="140"></th><th></th><th></th><th></th></tr></thead><tbody><tr><td>Tham số</td><td>Giá trị</td><td>Kiểu dữ liệu</td><td>Tính bắt buộc</td><td>Mô tả</td></tr><tr><td>requestId</td><td>{{requestId}}</td><td><p></p><p></p><p>String</p><p><br></p></td><td>Có</td><td><p></p><p>ID của TTS request cần lấy chi tiết</p><p></p></td></tr></tbody></table>

**Kết quả trả về:**&#x20;

* requestId: ID của request, dùng để tracking
* status: Trạng thái của request
* error\_code: mã lỗi
* error\_message: Mô tả chi tiết lỗi

```
//REQUEST EXAMPLE: 

curl -X GET "https://dev-api.vbee.vn/v1/tts/requests/eb75e2b0-ce65-4e85-8450-2d09728d996b" \
  -H "Authorization: Bearer <access_token>" \
  -H "App-Id: your-app-id"
```

```
//SUCCESSFUL RESPONSE: (status = COMPLETED)

{
  "requestId": "eb75e2b0-ce65-4e85-8450-2d09728d996b",
  "status": "COMPLETED",
  "audioLink": "https://example.com/audio/eb75e2b0.mp3"
}
```

```
//RESPONSE PROCESSING  (status = PROCESSING)

{
  "requestId": "eb75e2b0-ce65-4e85-8450-2d09728d996b",
  "status": "PROCESSING"
}
```

```
//FAILURE RESPONSE (status = `FAILED`)

{
    "error": {
        "code": "BAD_REQUEST",
        "message": "Request is not found"
    }
}
```

**Danh sách Error Codes**

| Code                    | HTTP status                         | Mô tả                                                                                                                                                                |
| ----------------------- | ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| UNAUTHORIZED            | <p></p><p></p><p>401</p><p><br></p> | Token không hợp lệ, thiếu Authorization header, hoặc thiếu appId (trong body hoặc header app-id)                                                                     |
| BAD\_REQUEST            | 400                                 | <p>- Body request không hợp lệ. Ví dụ: thiếu trường bắt buộc, sampleRate không hợp lệ</p><p>- Lỗi cấu hình request không hợp lệ (ví dụ: voiceCode không tồn tại)</p> |
| INTERNAL\_SERVER\_ERROR | 500                                 | Lỗi nội bộ                                                                                                                                                           |


---

# 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/text-to-speech/get-request.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.
