# Get Audio Chapters The format-abstraction chapter list for audiobooks, sourced from `media_items.audio_metadata`. Embedded m4b chapters, folder-of-tracks books and zip-of-audio books all write the same chapter shape; the locator `{chapter, audio_offset_seconds}` and this endpoint never learn which file model produced them. **Endpoint**: `GET /api/media-items/{id}/chapters` **Auth**: Required (JWT) ## Response ```json { "media_item_id": "…", "chapters": [ { "index": 0, "title": "Chapter One", "start": 0.0, "end": 168.0 } ], "duration_seconds": 36000.0, "codec_profile": "mp3", "layout": "folder", "tracks": [ { "index": 0, "url": "/api/media-items/{id}/audio/0", "title": "01 First", "path": "Author/Title/01 First.mp3", "start": 0.0, "end": 168.0, "duration_seconds": 168.0, "size_bytes": 2700000 } ] } ``` - `layout` is `""` for single-file books (the Batch A model — the whole file streams through the `/uploads` path), `"folder"` for a directory of track files and `"zip"` for a zip-of-audio book. - `tracks` is empty for single-file books and carries one entry per playable file otherwise. `start`/`end` are cumulative GLOBAL seconds — the same coordinate system chapters, bookmarks and `audio_offset_seconds` use. ## Error Responses | Code | Description | | ---- | ------------------------------- | | 400 | Invalid media item id | | 401 | Missing/invalid token | | 404 | Book not found | | 500 | audio_metadata failed to parse |