Generate video chapters
This endpoint enables you to generate chapters for an existing media file.
#### How it works
1. Make a `PATCH` request to this endpoint, replacing `<mediaId>` with the ID of the media for which you want to generate chapters.
2. Include the `chapters` parameter in the request body to enable.
3. The response contains the updated media data, confirming the changes made.
You can use the <a href="https://docs.fastpix.io/docs/ai-events#videomediaaichaptersready">video.mediaAI.chapters.ready</a> webhook event to track and notify about the chapters generation.
**Use case:** This is particularly useful when a user uploads a video and later decides to enable chapters without re-uploading the entire video.
Related guide: <a href="https://docs.fastpix.io/docs/generate-video-chapters">Video chapters</a>