Skip to content

List a book's chapters

GET
/api/v1/books/{bookId}/chapters
curl --request GET \
--url https://digize.com/api/v1/books/example/chapters \
--header 'x-api-key: <x-api-key>'

A book’s chapters and its front and back matter in order, each with its status, words and reading level; the book’s words and reading level; its figures; and the writer’s latest run, which fills the chapters in as it goes.

Needs the books:read permission.

bookId
required
string
>= 1 characters <= 64 characters

Done

Media typeapplication/json
object
data
required
Array<object>
object
id
required
string
position
required
integer
>= -9007199254740991 <= 9007199254740991
kind
required

A chapter, or front or back matter.

string
Allowed values: chapter front back
matter
required
Any of:
string
Allowed values: title copyright dedication foreword introduction conclusion about acknowledgments
number
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
title
required
string
promise
required

One line: what the reader gets from it.

string
status
required

planned until it’s written, drafting while the writer writes it, drafted, then edited once the author changed it.

string
Allowed values: planned drafting drafted edited
words
required
integer
>= -9007199254740991 <= 9007199254740991
grade
required

Its reading level as a US school grade (Flesch–Kincaid), or null with too little text or in another language than English.

number | null
version
required
integer
>= -9007199254740991 <= 9007199254740991
generation
required

The run of the writer that last wrote it.

integer
>= -9007199254740991 <= 9007199254740991
updatedAt
required
string format: date-time
words
required
integer
>= -9007199254740991 <= 9007199254740991
grade
required
number | null
figures
required
Array<object>
object
id
required
string
chapterId
required
string | null
blockId
required
string | null
kind
required
string
Allowed values: illustration chart diagram
caption
required
string
alt
required
string
prompt
required

What it should show.

string
spec
required
Any of:
Any of:
object
kind
required
string
Allowed value: chart
type
required
string
Allowed values: bar line pie area
title
required
string
<= 200 characters
unit
required
string
"" <= 40 characters
series
required
Array<object>
>= 1 items <= 6 items
object
name
required
string
<= 100 characters
points
required
Array<object>
>= 2 items <= 40 items
object
label
required
string
>= 1 characters <= 120 characters
value
required
number
source
required
string
"" <= 300 characters
width
required
string
Allowed values: half full page
status
required
string
Allowed values: planned rendering ready failed
error
required
string | null
imageId
required
string | null
imageUrl
required

What it shows: its drawing, or a picture the author put in, as it shows in the editor.

string | null
thumbUrl
required
string | null
version
required
integer
>= -9007199254740991 <= 9007199254740991
generation
required
integer
>= -9007199254740991 <= 9007199254740991
updatedAt
required
string format: date-time
model
required

The GPT Image model it was drawn with.

string | null
format
required
Any of:
string
Allowed values: png jpg svg
widthPx
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
heightPx
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
dpi
required

What a picture prints at in its place; null for an SVG.

number | null
check
required
Any of:
object
missing
required
Array<string>
unreadable
required
boolean
tries
required
integer
>= -9007199254740991 <= 9007199254740991
warnings
required
Array<string>
cost
required

What drawing it has cost on the workspace’s OpenAI account, in US dollars.

number
drawings
required

The drawing it shows, then the last few to go back to.

Array<object>
object
version
required
integer
>= -9007199254740991 <= 9007199254740991
source
required
string
Allowed values: drawn changed upload stand-in
format
required
string
Allowed values: png jpg svg
widthPx
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
heightPx
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
model
required
string | null
check
required
Any of:
object
missing
required
Array<string>
unreadable
required
boolean
tries
required
integer
>= -9007199254740991 <= 9007199254740991
cost
required

US dollars, both tries included.

number
note
required

What a “Change this” asked for.

string | null
downsized
required
boolean
at
required

When it was drawn, in ms since the epoch.

number
url
required
string | null
thumbUrl
required
string | null
changing
required

A “Change this” under way: what it asked for.

string | null
drawnAt
required
Any of:
string format: date-time
generation
required
Any of:
object
id
required
string
number
required
integer
>= -9007199254740991 <= 9007199254740991
chapterId
required

The one chapter it writes again; null for the whole book.

string | null
model
required

The model the author picked.

string
answeredBy
required

What writes: the pick, or GLM-4.7 Flash for Claude while Anthropic isn’t connected.

string
billing
required

digize: on the AI meter under the daily cap. openai and anthropic: on the workspace’s own OpenAI or Anthropic account.

string
Allowed values: digize openai anthropic
status
required
string
Allowed values: running stopped failed cancelled done
phase
required
string
Allowed values: outline chapters continuity matter figures done
done
required
integer
>= -9007199254740991 <= 9007199254740991
total
required
integer
>= -9007199254740991 <= 9007199254740991
stopped
required
Any of:
string
Allowed values: cap openai anthropic
error
required
string | null
cost
required

What its model calls cost so far, in US dollars.

number
inputTokens
required
integer
>= -9007199254740991 <= 9007199254740991
outputTokens
required
integer
>= -9007199254740991 <= 9007199254740991
startedBy
required
string
startedAt
required
string format: date-time
finishedAt
required
Any of:
string format: date-time
updatedAt
required
string format: date-time

Example

{
"data": [
{
"kind": "chapter",
"matter": "title",
"status": "planned"
}
],
"figures": [
{
"kind": "illustration",
"spec": {
"kind": "chart",
"type": "bar",
"unit": "",
"source": ""
},
"width": "half",
"status": "planned",
"format": "png",
"drawings": [
{
"source": "drawn",
"format": "png"
}
]
}
],
"generation": {
"billing": "digize",
"status": "running",
"phase": "outline",
"stopped": "cap"
}
}

What was sent isn’t valid (invalid).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

No key, or one that’s unknown, off or expired.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The key doesn’t have the permission this needs.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Nothing has that id (not_found).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Over the rate limit; see retry-after.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}