Publishing
Publish or unpublish a book. On publish, every chapter must have content (a serial needs only its launch chapters, see below); Anthra mints a globally unique slug (reusing the book’s slug if it was already published before), sets publishedAt, and revalidates the public reader at /read/{slug}.
Body
| Field | Type | Notes |
|---|---|---|
publish | boolean | Required. true publishes (status → published); false reverts to ready. |
visibility | private | unlisted | public | Optional. Defaults to whatever the book already has. unlisted = anyone with the slug can read; public = also indexable. |
curl -X POST "$ANTHRA_BASE/books/$BOOK/publish" \
-H "authorization: Bearer $ANTHRA_TOKEN" \
-H "content-type: application/json" \
-d '{ "publish": true, "visibility": "unlisted" }'The response includes the updated Book, including slug and readerUrl.
A paid book published as public waits for a review before it appears on Discover, author pages and search or can be bought; its link and free sample work straight away. The response’s listingReview.state is pending, approved, rejected, not_submitted or not_required, and for any book, free or paid, held (off Discover while Anthra reviews reader reports; its link still works) or removed (taken down after a content review). Read it later with the get_listing_review tool or GET /api/v1/books/{id}, and send a rejected listing back with request_listing_review. The get_book_sales tool reports a book’s earnings: cashableCredits can become cash, and nonCashableCredits stay spendable credits because those sales were paid with free credits, not credits the buyer bought, or their card payment was refunded.
Content check
Before a book becomes readable by others (published as public or unlisted, or taken from private to either), Anthra checks its title, blurb, cover text and a sample of its chapters, at no cost to you. A clear violation of the content rules is refused with 422 content_refused and a message saying what to change: for example, explicit sexual content in a book whose audience isn’t adult. Borderline books are published and reviewed by a person. A book a moderator took down returns 403 moderation_removed until it is restored. The same check runs in the studio, the copilot and MCP.
Serial release
set_serial_release turns a book into a serial: its first launchChapters go public on publish, then one chapter per slot (cadence daily, weekly or biweekly, on weekday at time in the IANA timeZone), and followers get an email per chapter. Unreleased chapters stay hidden on every public surface, buyers included, and a chapter whose date passes without prose holds the queue until it is written. Turning it off makes every chapter public at once. get_serial_release reports what is out and the planned dates, and readers see serial on GET /v1/discover/{slug}. Both tools are free.
curl -X POST "$ANTHRA_BASE/tools/set_serial_release" \
-H "authorization: Bearer $ANTHRA_TOKEN" \
-H "content-type: application/json" \
-d '{ "bookId": "'$BOOK'", "enabled": true, "cadence": "weekly", "weekday": 5, "time": "18:00", "timeZone": "Europe/Lisbon", "launchChapters": 3 }'Retail check, store metadata and publish kits
check_retail_readiness builds the EPUB in memory and runs Anthra’s own structure check (not EPUBCheck), reads its accessibility metadata, and measures the cover and interior images in DPI at print size. Free, and it stores nothing.
suggest_publish_metadata suggests store keywords and BISAC codes from the book. Nothing is saved until you send them to update_book_settings (keywords, bisacCodes). BISAC codes are checked for format, not against the official list. Costs 1 credit, refunded on failure.
build_publish_kit builds a zip for uploading to one retailer by hand (retailer: kdp, apple-books, kobo, google-play, draft2digital or ingramspark): the files it takes, a metadata sheet and a checklist, marking any rule not confirmed at source as UNVERIFIED. KDP, Apple Books and Draft2Digital kits also carry AI disclosure answers from the book’s provenance record. It returns a download URL with missing and warnings. Free. It never contacts a retailer, and nothing here promises a retailer will accept the files.
AI disclosure and provenance
get_ai_provenance returns what AI made in a book, per asset, and a disclosure checklist for KDP, Apple Books, Apple audiobooks, Draft2Digital and ACX. It is guidance, not legal advice. Anthra sees only its own models, so record AI used elsewhere with set_ai_declaration.
get_contribution_record returns an exportable record, as JSON and Markdown, of what the author wrote or changed versus what AI generated. Its word counts are estimates, not a finding of authorship.
Anthra writes machine-readable AI metadata into new exports. Books on /discover carry an aiLabel; null means no AI use is known, not that a human wrote the book.
Agent pitch pack
generate_query_letter writes a literary-agent query letter from the premise, synopsis, comps and opening and saves it on the book, with the agent’s name and your bio left for you to fill in; paid, refunded on failure. build_pitch_pack zips a Word file (query letter, synopsis, comparable titles and about 5,000 words of sample pages) with plain-text copies for submission forms, and lists what is missing; free. draft_blurb_variants drafts two or three back-cover blurbs with different angles; save the one you pick with update_book_settings (coverBlurb).
Common errors
400 invalid_state— “Finish writing all chapters before publishing.” Some chapter has emptycontent. A serial whose launch chapters are not written yet gets “Finish writing the first chapter before publishing this serial.”403 insufficient_scope— the token doesn’t carrypublish:write.