Skip to content

List a book's figures

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

The book’s illustrations, charts and diagrams: what each should show and its spec, its caption and width, its status (planned until it’s drawn), its drawing with its dpi, text check and warnings, what it cost, and the drawings kept to go back to. Also whether OpenAI is connected (figures are drawn on it), the model, and the style sample later illustrations are drawn from.

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
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
inBook
required

Whether a chapter shows it; one that doesn’t can be deleted.

boolean
styleFigureId
required
string | null
openAi
required
boolean
model
required
string
cost
required

Every figure’s drawings, in US dollars.

number

Example

{
"data": [
{
"kind": "illustration",
"spec": {
"kind": "chart",
"type": "bar",
"unit": "",
"source": ""
},
"width": "half",
"status": "planned",
"format": "png",
"drawings": [
{
"source": "drawn",
"format": "png"
}
]
}
]
}

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"
}
}