Skip to main content
POST
/
api
/
v1
/
projects
/
{projectId}
/
chapters
{
  "id": "<string>",
  "project_id": "<string>",
  "name": "<string>",
  "duration": 123,
  "created_at": "<string>",
  "VALIDATION_ERROR": {},
  "NOT_FOUND": {}
}

Overview

Creates a new chapter within a project. Chapters are segments of your video that can have individual content and duration.

Request

Path Parameters

projectId
string
required
The project ID

Headers

Authorization
string
required
Bearer token with your API key
Content-Type
string
required
Must be application/json

Body

name
string
required
Chapter name (1-30 characters)
duration
number
Optional duration in seconds (must be positive integer)

Response

id
string
Unique chapter identifier (format: cht_[A-Za-z0-9]{21})
project_id
string
Parent project ID
name
string
Chapter name
duration
number
Duration in seconds
created_at
string
ISO 8601 timestamp when the chapter was created

Examples

curl -X POST https://api.babou.ai/api/v1/projects/prj_abc123xyz/chapters \
  -H "Authorization: Bearer $BABOU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Introduction",
    "duration": 30
  }'

Response Example

{
  "id": "cht_def456uvw",
  "project_id": "prj_abc123xyz",
  "name": "Introduction",
  "duration": 30,
  "created_at": "2025-12-02T10:01:00Z"
}

Error Responses

VALIDATION_ERROR
400
Invalid request parameters
{
  "error": "Validation failed",
  "code": "VALIDATION_ERROR",
  "hint": "Name must be between 1 and 30 characters"
}
NOT_FOUND
404
Project not found
{
  "error": "Project not found",
  "code": "NOT_FOUND"
}

Next Steps