The World Bible Export endpoint compiles a project’s entire content tree — folders, entities, rich text, metadata — into a single polished document. The Java backend’sDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Fixius50/WorlBuilding-Writting-App/llms.txt
Use this file to discover all available pages before exploring further.
BookCompilerService orchestrates the layout, applies the settings (cover image, theme colour, margins, font size), and returns the compiled file as a binary stream for the user to download. This is the publishing step that transforms a living worldbuilding workspace into a shareable compendium.
Base URL
POST /worldbible/export/{projectName}?format={format}
Compile the project’s world bible to the specified document format and return the file as a download.
The name of the project to compile.
The target document format. Must be one of the following enum values:
| Value | Description |
|---|---|
EPUB | Electronic publication format for e-readers |
PDF | Portable Document Format — print-ready |
DOCX | Microsoft Word Open XML document |
HTML | Offline single-file HTML document |
Request Body
The request body is a JSON object with two top-level keys:settings and contentTree.
settings Fields
The document title shown on the cover page and in document metadata.
The author name shown on the cover page and in document metadata.
The genre label (e.g.
"Fantasy", "Sci-Fi", "Horror"). Used for metadata and optional cover styling.When
true, the compiler generates a styled cover page as the first page of the document.URL of the cover image to embed. Used when
includeCover is true. May be a remote URL or a data URI.Hex colour string (e.g.
"#4F46E5") used as the accent colour for headings, dividers, and cover elements.Page margin preset. Accepted values depend on the compiler implementation (e.g.
"normal", "narrow", "wide").Base font size for body text (e.g.
"11pt", "12pt", "14pt").contentTree Field
A JSON map representing the hierarchical content tree to compile. Constructed by the frontend from the project’s folders and entities. The exact structure is consumed by
BookCompilerService and may include folder nodes, entity summaries, and rich text HTML fragments.Response
200 OK — application/octet-stream — the compiled document file.
The Content-Disposition header contains the filename with the appropriate extension for the chosen format (e.g. attachment; filename="Aethermoor.docx").
Example
Error Responses
| Status | Condition |
|---|---|
400 Bad Request | Malformed URL or missing format query parameter |
404 Not Found | Compiled output file not found after processing |
500 Internal Server Error | Compilation failure (e.g. malformed content tree, PDF rendering error) |