> ## Documentation Index
> Fetch the complete documentation index at: https://docs.babou.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Chapter

> Get detailed information about a specific chapter including all prompts

## Overview

Retrieve complete details about a specific chapter, including all associated prompts and content.

## Request

### Path Parameters

<ParamField path="projectId" type="string" required>
  The project ID
</ParamField>

<ParamField path="chapterId" type="string" required>
  The chapter ID
</ParamField>

### Headers

<ParamField header="Authorization" type="string" required>
  Bearer token with your API key
</ParamField>

## Response

Returns the chapter object with all nested prompts and content.

## Examples

<CodeGroup>
  ```bash curl theme={null}
  curl https://api.babou.ai/api/v1/projects/prj_abc123xyz/chapters/cht_def456uvw \
    -H "Authorization: Bearer $BABOU_API_KEY"
  ```

  ```typescript TypeScript theme={null}
  async function getChapter(projectId: string, chapterId: string) {
    const response = await fetch(
      `https://api.babou.ai/api/v1/projects/${projectId}/chapters/${chapterId}`,
      {
        headers: {
          'Authorization': `Bearer ${process.env.BABOU_API_KEY}`
        }
      }
    );

    return await response.json();
  }

  const chapter = await getChapter('prj_abc123xyz', 'cht_def456uvw');
  console.log(`Chapter: ${chapter.name}`);
  ```

  ```python Python theme={null}
  import os
  import requests

  def get_chapter(project_id, chapter_id):
      response = requests.get(
          f'https://api.babou.ai/api/v1/projects/{project_id}/chapters/{chapter_id}',
          headers={'Authorization': f'Bearer {os.environ["BABOU_API_KEY"]}'}
      )
      return response.json()

  chapter = get_chapter('prj_abc123xyz', 'cht_def456uvw')
  print(f'Chapter: {chapter["name"]}')
  ```
</CodeGroup>

## Response Example

```json theme={null}
{
  "id": "cht_def456uvw",
  "project_id": "prj_abc123xyz",
  "name": "Introduction",
  "duration": 30,
  "created_at": "2025-12-02T10:01:00Z",
  "status": "ready",
  "prompt_count": 2,
  "prompts": [
    {
      "id": "int_abc123xyz789",
      "content": "Create an engaging introduction about AI video creation",
      "result": "Video content created successfully",
      "created_at": "2025-12-02T10:05:00Z"
    },
    {
      "id": "int_def456uvw012",
      "content": "Add smooth transitions between scenes",
      "result": null,
      "created_at": "2025-12-02T10:07:00Z"
    }
  ]
}
```

<Note>
  The `result` field in each prompt contains the result message from processing, or `null` if still processing. The chapter-level `status` field indicates the overall chapter state: `ready`, `processing`, or `error`.
</Note>

## Error Responses

<ResponseField name="NOT_FOUND" type="404">
  Chapter not found

  ```json theme={null}
  {
    "error": "Chapter not found",
    "code": "NOT_FOUND"
  }
  ```
</ResponseField>

## Next Steps

<CardGroup cols={2}>
  <Card title="Submit Prompt" icon="wand-magic-sparkles" href="/api-reference/prompts/submit">
    Add video content to this chapter
  </Card>

  <Card title="List Chapters" icon="list" href="/api-reference/chapters/list">
    View all chapters
  </Card>
</CardGroup>
