Get Chapter
curl --request GET \
--url https://api.example.com/api/v1/projects/{projectId}/chapters/{chapterId} \
--header 'Authorization: <authorization>'import requests
url = "https://api.example.com/api/v1/projects/{projectId}/chapters/{chapterId}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.example.com/api/v1/projects/{projectId}/chapters/{chapterId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/projects/{projectId}/chapters/{chapterId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/projects/{projectId}/chapters/{chapterId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/projects/{projectId}/chapters/{chapterId}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/projects/{projectId}/chapters/{chapterId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"NOT_FOUND": {}
}Chapters
Get Chapter
Get detailed information about a specific chapter including all prompts
GET
/
api
/
v1
/
projects
/
{projectId}
/
chapters
/
{chapterId}
Get Chapter
curl --request GET \
--url https://api.example.com/api/v1/projects/{projectId}/chapters/{chapterId} \
--header 'Authorization: <authorization>'import requests
url = "https://api.example.com/api/v1/projects/{projectId}/chapters/{chapterId}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.example.com/api/v1/projects/{projectId}/chapters/{chapterId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/projects/{projectId}/chapters/{chapterId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/projects/{projectId}/chapters/{chapterId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/projects/{projectId}/chapters/{chapterId}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/projects/{projectId}/chapters/{chapterId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"NOT_FOUND": {}
}Overview
Retrieve complete details about a specific chapter, including all associated prompts and content.Request
Path Parameters
string
required
The project ID
string
required
The chapter ID
Headers
string
required
Bearer token with your API key
Response
Returns the chapter object with all nested prompts and content.Examples
curl https://api.babou.ai/api/v1/projects/prj_abc123xyz/chapters/cht_def456uvw \
-H "Authorization: Bearer $BABOU_API_KEY"
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}`);
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"]}')
Response Example
{
"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"
}
]
}
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.Error Responses
404
Chapter not found
{
"error": "Chapter not found",
"code": "NOT_FOUND"
}
Next Steps
Submit Prompt
Add video content to this chapter
List Chapters
View all chapters
⌘I