how-to

How to set up API access

This shows you how to create API keys for programmatic book generation — available on the Agency plan.

Before you start

  • API access requires the Agency plan ($197/mo).
  • You'll need basic knowledge of REST APIs to use this feature.

Steps

  1. Go to Billing in the sidebar.

  2. Click the API Keys tab.

  3. Click Create API Key.

  4. Enter a name for the key (e.g., "Production," "N8N Automation," "Zapier").

  5. Copy the generated key immediately — it's only shown once.

    • Store it securely. Treat it like a password.
  6. Use the key in API requests via the Authorization: Bearer <key> header.

API overview

Base URL: https://bookcreatorstudio.com/api/v1

These are the same endpoints listed under the API Docs tab on the Billing page. Every request needs your sk-ag- key as a Bearer token.

Reference

EndpointMethodPurpose
/meGETAccount info and current credit balance
/book-typesGETValid book types and page-count rules
/art-stylesGETValid artStyle IDs for book creation

Books

EndpointMethodPurpose
/booksPOSTCreate a book from a topic; generation + PDF export start automatically
/booksGETList your books, newest first
/books/{bookId}GETBook status, page progress, and pdfUrl once ready
/books/{bookId}/exportPOSTManually re-trigger PDF export (rarely needed)
/books/{bookId}/videoPOSTGenerate a narrated story video from a completed picture book
/books/{bookId}/videoGETVideo generation status; returns videoUrl when ready

Characters

EndpointMethodPurpose
/charactersPOSTCreate a character from a text description
/characters/upload-urlPOSTGet a presigned URL to upload a reference image
/characters/from-imagePOSTCreate a character from an uploaded reference image
/charactersGETList your characters with style images
/characters/{characterId}GETCharacter detail, including artStyleStatus and styleImages
/characters/{characterId}DELETEDelete a character and all its style images

The API handles the full workflow: planning, generation, and PDF export. Submit a topic and book type, then poll GET /books/{bookId} for completion. The PDF URL is returned when the book reaches "completed" status. Book creation costs 1 credit per page.

Revoking a key

If a key is compromised, go to the API Keys tab, find the key, and click the trash icon. Revocation is immediate and cannot be undone — you'll need to create a new key.

Viewing API docs

Click the API Docs tab on the Billing page for full endpoint documentation, request/response examples, and authentication details.

MCP server

If you use an MCP-compatible agent (Claude Desktop, Hermes, Open Claw), you can skip writing HTTP calls and use the official MCP server that wraps this same API. It exposes the full workflow as tools: create a book, poll until it's done, grab the PDF, plus character creation and story-video generation.

Prerequisites

  • Node.js 18+
  • An sk-ag- API key from the API Keys tab
  • Credits on your account (1 credit per page)

Configuration

The server reads two environment variables:

VariableRequiredDefault
COLORING_API_KEYyes—
COLORING_API_BASEnohttps://bookcreatorstudio.com/api/v1

Add it to your client's MCP config (Claude Desktop: Settings → Developer → Edit Config):

{
  "mcpServers": {
    "coloring-book-studio": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-server/index.mjs"],
      "env": { "COLORING_API_KEY": "sk-ag-your-key-here" }
    }
  }
}

Restart your client and the tools appear (in Claude Desktop, under the 🔌 menu).

Available tools

  • Reference: list_book_types, list_art_styles, get_credits
  • Books: create_book, list_books, get_book, export_book
  • Video: generate_video, get_video_status
  • Characters: create_character, get_character_upload_url, create_character_from_image, list_characters, get_character, delete_character

Full setup and per-tool details are in mcp-server/README.md. The MCP server authenticates with the same sk-ag- key as the REST API.

Common issues

401 Unauthorized Your API key may be revoked or incorrect. Double-check you're sending it as a Bearer token in the Authorization header.

403 Forbidden API access is only available on the Agency plan. Upgrade from the Billing page.

Related articles