Get a chapter
const url = 'https://digize.com/api/v1/books/example/chapters/example';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://digize.com/api/v1/books/example/chapters/example \ --header 'x-api-key: <x-api-key>'One chapter with its blocks, the figures in it, and the people and records it draws on (from its insights and its quotes), with what each is called when the book anonymizes names.
Needs the books:read permission.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”Done
object
object
A chapter, or front or back matter.
One line: what the reader gets from it.
planned until it’s written, drafting while the writer writes it, drafted, then edited once the author changed it.
Its reading level as a US school grade (Flesch–Kincaid), or null with too little text or in another language than English.
The run of the writer that last wrote it.
Its content as blocks, each with an id: paragraph, heading, list, quote, pullquote, callout, table, figure, break.
object
object
object
object
object
object
object
object
object
object
What it should show.
object
object
object
object
object
object
object
What it shows: its drawing, or a picture the author put in, as it shows in the editor.
The GPT Image model it was drawn with.
What a picture prints at in its place; null for an SVG.
What drawing it has cost on the workspace’s OpenAI account, in US dollars.
The drawing it shows, then the last few to go back to.
object
US dollars, both tries included.
What a “Change this” asked for.
When it was drawn, in ms since the epoch.
A “Change this” under way: what it asked for.
object
What the book calls them with names anonymized.
Example
{ "chapter": { "kind": "chapter", "matter": "title", "status": "planned", "blocks": [ { "content": [ { "marks": [ "bold" ] } ], "type": "paragraph" } ] }, "figures": [ { "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).
object
object
object
Example
{ "error": { "code": "invalid" }}No key, or one that’s unknown, off or expired.
object
object
object
Example
{ "error": { "code": "invalid" }}The key doesn’t have the permission this needs.
object
object
object
Example
{ "error": { "code": "invalid" }}Nothing has that id (not_found).
object
object
object
Example
{ "error": { "code": "invalid" }}Over the rate limit; see retry-after.
object
object
object
Example
{ "error": { "code": "invalid" }}