cURL
curl --request POST \ --url https://api.example.com/api/v1/projects/{projectId}/chapters \ --header 'Authorization: <authorization>' \ --header 'Content-Type: <content-type>' \ --data ' { "name": "<string>", "duration": 123 } '
{ "id": "<string>", "project_id": "<string>", "name": "<string>", "duration": 123, "created_at": "<string>", "VALIDATION_ERROR": {}, "NOT_FOUND": {} }
Add a new chapter to a video project
application/json
cht_[A-Za-z0-9]{21}
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 }'
{ "id": "cht_def456uvw", "project_id": "prj_abc123xyz", "name": "Introduction", "duration": 30, "created_at": "2025-12-02T10:01:00Z" }
{ "error": "Validation failed", "code": "VALIDATION_ERROR", "hint": "Name must be between 1 and 30 characters" }
{ "error": "Project not found", "code": "NOT_FOUND" }