Implementation:Elevenlabs Elevenlabs python ChapterResponse
| Metadata | Value |
|---|---|
| source | Elevenlabs_Elevenlabs_python |
| domain | Projects, Audio Books |
| last_updated | 2026-02-15 |
Overview
Description: ChapterResponse is a Pydantic model representing a chapter within an ElevenLabs project. It contains identifying information (chapter ID, name), conversion status (last conversion date, progress, errors), capability flags (downloadability, video support), voice assignments, and chapter statistics. This model is used in the Projects API for managing audiobook or long-form content chapters.
Usage: This model is returned by the ElevenLabs API when listing or retrieving chapters within a project. It enables tracking of chapter conversion state, monitoring progress, identifying errors, and managing the voices used within each chapter.
Code Reference
Source file: src/elevenlabs/types/chapter_response.py
Class signature:
class ChapterResponse(UncheckedBaseModel):
...
Import statement:
from elevenlabs.types import ChapterResponse
I/O Contract
| Field | Type | Required | Description |
|---|---|---|---|
| chapter_id | str | Yes | The ID of the chapter |
| name | str | Yes | The name of the chapter |
| last_conversion_date_unix | Optional[int] | No | The last conversion date of the chapter (Unix timestamp) |
| conversion_progress | Optional[float] | No | The conversion progress of the chapter (0.0 to 1.0) |
| can_be_downloaded | bool | Yes | Whether the chapter can be downloaded |
| state | ChapterState | Yes | The state of the chapter |
| has_video | Optional[bool] | No | Whether the chapter has a video |
| voice_ids | Optional[List[str]] | No | List of voice IDs used by the chapter |
| statistics | Optional[ChapterStatisticsResponse] | No | The statistics of the chapter |
| last_conversion_error | Optional[str] | No | The last conversion error of the chapter |
Usage Examples
from elevenlabs.types import ChapterResponse
# Working with a chapter response from the API
chapter = ChapterResponse(
chapter_id="ch_abc123",
name="Chapter 1: Introduction",
can_be_downloaded=True,
state="completed",
conversion_progress=1.0,
voice_ids=["voice_id_1", "voice_id_2"],
)
# Check chapter status
print(f"Chapter: {chapter.name}")
print(f"State: {chapter.state}")
if chapter.can_be_downloaded:
print("Chapter is ready for download")
# Check for conversion errors
if chapter.last_conversion_error:
print(f"Error: {chapter.last_conversion_error}")