Public API v1

Create an audiobook (narrator and cast)

Changed on

Creates a draft book. Add chapters with POST /v1/audiobooks/{bookId}/chapters, then start it. Voices are catalogue voices of the default engine (cloned voices are not supported for audiobooks yet). LIVE keys only. Nothing is billed until chapters render.

post/api/v1/audiobooks

Request

  • Base URL
    https://api.vieneu.io
  • Auth
    • API key in header X-API-Key
    • or HTTP bearer

Request body

titlestring required
authorstring
narratorVoicestring required

The narrator: reads titles and every segment without a character.

applyPronunciationboolean

Read the book through your account's pronunciation dictionary — the rules saved at https://vieneu.io/#/pronunciation (Từ điển phát âm), as they stand when each chapter renders. Defaults to true and changes nothing until you have saved rules. Billing stays on the script as written. A chapter the rules make longer than the chapter limit, or more than twice as long plus 1,000 characters, fails with the reason instead of being cut. Set false to read the script as written.

Example request

{
  "title": "Dế Mèn phiêu lưu ký",
  "author": "Tô Hoài",
  "narratorVoice": "Anh Thư",
  "cast": [
    {
      "speaker": "Lan",
      "voiceId": "Ban Mai"
    }
  ],
  "applyPronunciation": true
}

Response

The draft book.

idstring required
titlestring required
authorstring nullable required
status'draft' | 'queued' | 'rendering' | 'completed' | 'partial' | 'failed' | 'cancelled' required
narratorVoicestring required
waitingReasonstring nullable required

gpu_busy: books render only while the GPU fleet is idle; quota: the plan hit a limit, retried automatically; queue_full.

errorstring nullable required
otherBooksWaitingnumber nullable required

While started: how many other books are waiting too. Books take turns, a chapter each.

chapterCharsMaxnumber required

The longest chapter (in characters) the plan behind this key can render: a chapter is billed in one go, so it must fit the plan's daily or weekly token cap. 60,000 when the plan has no tighter cap.

createdAtstring date-time required
completedAtstring date-time nullable required

Example response

{
  "cast": [
    {
      "speaker": "Lan",
      "voiceId": "Ban Mai"
    }
  ]
}

Changes