[GET] Get Callback Result

https://www.everai.vn/api/v1/tts/{{request_id}}/callback-result

API Get Callback Result

Lấy thông tin kết quả gọi callback của request

URL: https://www.everai.vn/api/v1/tts/{{request_id}} Method: GET Content Type: application/json Response Type: text/json

Tham số Header

Tham số
Kiểu dữ liệu
Tính bắt buộc
Mô tả

Authorization

Bearer Token

API key của người dùng, được tạo trong giao diện tại https://everai.vn/api

Kết quả trả về

  • status: trạng thái của API (1: thành công, 0: thất bại)

  • error_code: mã lỗi (Nếu có)

  • error_message: chi tiết lỗi (Nếu có)

  • result: dữ liệu trả về khi gọi API thành công

    • request_id: mã request

    • callback_url: Đường dẫn Webhook để nhận kết quả của request

    • created_at: Thời gian gọi callback

    • payload: Dữ liệu gửi đi khi gọi callback

    • status_code: Mã code nhận về khi gọi callback

    • result: Kết quả nhận về khi gọi callback

Example

Request

curl --location 'https://everai.vn/api/v1/tts/0e7ee265-34ff-4807-b9ae-a4eb3ef24573/callback-result' \
--header 'Authorization: Bearer 5Z62rdsxxExcUOcdbukWNdRufMmxxT18g'

Response

{
    "result": {
        "request_id": "0e7ee265-34ff-4807-b9ae-a4eb3ef24573",
        "callback_url": "https://mydomain/callback",
        "created_at": "2024-09-13T09:40:48.543Z",
        "payload": {
            "request_id": "0e7ee265-34ff-4807-b9ae-a4eb3ef24573",
            "characters": 24,
            "voice_code": "vi_female_kieunhi_mn",
            "audio_type": "mp3",
            "speed_rate": 1.0,
            "pitch_rate": 1.0,
            "bitrate": 128,
            "created_at": "2024-09-13",
            "status": "SUCCESS",
            "audio_link": "https://everai.vn/media/audio/0e0e0ca6-ec85-4ced-b9b9-2350c6faa777_fsiPSVu.mp3"
        },
        "status_code": null,
        "result": "HTTPSConnectionPool(host='mydomain', port=443): Max retries exceeded with url: /callback (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7841641ceb20>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))"
    },
    "status": 1
}

Last updated