List Chapters
curl --request GET \
--url https://api.example.com/api/v1/projects/{projectId}/chapters \
--header 'Authorization: <authorization>'import requests
url = "https://api.example.com/api/v1/projects/{projectId}/chapters"
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', 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",
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"
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")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/projects/{projectId}/chapters")
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{
"project_id": "<string>",
"chapters": [
{}
]
}Chapters
List Chapters
Get all chapters in a project
GET
/
api
/
v1
/
projects
/
{projectId}
/
chapters
List Chapters
curl --request GET \
--url https://api.example.com/api/v1/projects/{projectId}/chapters \
--header 'Authorization: <authorization>'import requests
url = "https://api.example.com/api/v1/projects/{projectId}/chapters"
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', 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",
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"
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")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/projects/{projectId}/chapters")
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{
"project_id": "<string>",
"chapters": [
{}
]
}Overview
Retrieve all chapters for a specific project.Request
Path Parameters
string
required
The project ID
Headers
string
required
Bearer token with your API key
Response
string
The project ID
array
Array of chapter objects
Examples
curl https://api.babou.ai/api/v1/projects/prj_abc123xyz/chapters \
-H "Authorization: Bearer $BABOU_API_KEY"
async function listChapters(projectId: string) {
const response = await fetch(
`https://api.babou.ai/api/v1/projects/${projectId}/chapters`,
{
headers: {
'Authorization': `Bearer ${process.env.BABOU_API_KEY}`
}
}
);
return await response.json();
}
const result = await listChapters('prj_abc123xyz');
console.log(`Project has ${result.chapters.length} chapters`);
import os
import requests
def list_chapters(project_id):
response = requests.get(
f'https://api.babou.ai/api/v1/projects/{project_id}/chapters',
headers={'Authorization': f'Bearer {os.environ["BABOU_API_KEY"]}'}
)
return response.json()
result = list_chapters('prj_abc123xyz')
print(f'Project has {len(result["chapters"])} chapters')
Response Example
{
"project_id": "prj_abc123xyz",
"chapters": [
{
"id": "cht_def456uvw",
"project_id": "prj_abc123xyz",
"name": "Introduction",
"duration": 30,
"created_at": "2025-12-02T10:01:00Z",
"status": "ready",
"prompt_count": 2
},
{
"id": "cht_ghi789rst",
"project_id": "prj_abc123xyz",
"name": "Main Content",
"duration": 60,
"created_at": "2025-12-02T10:02:00Z",
"status": "processing",
"prompt_count": 1
}
]
}
The
status field is derived from chapter interactions and can be ready, processing, or error. The prompt_count field indicates how many prompts have been submitted to the chapter.Next Steps
Get Chapter
Get detailed chapter information
Create Chapter
Add a new chapter
⌘I