Comic API

Build a Comic App with the Comic API

Replay a real four-panel comic generation from story brief to reader, then run the same inputs in the Playground.

Replay the app demo

Replay a story brief from request to reader

Replay the submitted brief, job receipt, and four returned panels from The Tiny Bakery Map. This recorded run used 600 credits.

Create one polished 4-panel sequential cartoon comic page. title: "The Tiny Bakery Map: a cheerful delivery mix-up becomes a team win". Panel 1: a cheerful baker discovers that the cupcake delivery map is upside down. Panel 2: a scooter courier and a child helper compare landmarks with funny surprised faces. Panel 3: they follow frosting crumbs through a sunny street market. Panel 4: they arrive at the party just in time, everyone laughs, short readable speech bubbles, happy ending. Exactly four panels.

Try this request in Playground

Sign in to run the prefilled request. The replay is available without an account.

Create response JSON
{
  "id": "cmrc9rcte000ujm048xjzsesb",
  "status": "LOADING",
  "prompt": "Create one polished 4-panel sequential cartoon comic page. title: \"The Tiny Bakery Map: a cheerful delivery mix-up becomes a team win\". Panel 1: a cheerful baker discovers that the cupcake delivery map is upside down. Panel 2: a scooter courier and a child helper compare landmarks with funny surprised faces. Panel 3: they follow frosting crumbs through a sunny street market. Panel 4: they arrive at the party just in time, everyone laughs, short readable speech bubbles, happy ending. Exactly four panels.",
  "usage": {
    "total_comics": 4,
    "amount": 600
  },
  "model": "cyani-model"
}
Final status JSON
{
  "id": "cmrc9rcte000ujm048xjzsesb",
  "status": "PROCESSED",
  "prompt": "Create one polished 4-panel sequential cartoon comic page. title: \"The Tiny Bakery Map: a cheerful delivery mix-up becomes a team win\". Panel 1: a cheerful baker discovers that the cupcake delivery map is upside down. Panel 2: a scooter courier and a child helper compare landmarks with funny surprised faces. Panel 3: they follow frosting crumbs through a sunny street market. Panel 4: they arrive at the party just in time, everyone laughs, short readable speech bubbles, happy ending. Exactly four panels.",
  "comics": [
    {
      "page": 0,
      "prompt": "Create one polished 4-panel sequential cartoon comic page. title: \"The Tiny Bakery Map: a cheerful delivery mix-up becomes a team win\". Panel 1: a cheerful baker discovers that the cupcake delivery map is upside down. Panel 2: a scooter courier and a child helper compare landmarks with funny surprised faces. Panel 3: they follow frosting crumbs through a sunny street market. Panel 4: they arrive at the party just in time, everyone laughs, short readable speech bubbles, happy ending. Exactly four panels.",
      "beginPageIndex": 0,
      "totalPages": 1,
      "panelsPerPage": 4,
      "layout": "Layout0",
      "panels": [
        {
          "assetUrl": "https://s.llamagen.ai/clr8t07zt0000l208uya2628n/26fbac1a-6e27-4b50-8bfa-c64335748b90.png",
          "panel": 0,
          "caption": "Oh no, my map is upside down!",
          "image": []
        },
        {
          "assetUrl": "https://s.llamagen.ai/clr8t07zt0000l208uya2628n/d44cce49-42fe-415a-9b79-7d9a8c0c78a3.png",
          "panel": 1,
          "caption": "Wait... that street sign is backwards!",
          "image": []
        },
        {
          "assetUrl": "https://s.llamagen.ai/clr8t07zt0000l208uya2628n/32ad4de0-07a2-4217-8489-8abf8e707d63.png",
          "panel": 2,
          "caption": "Look, frosting crumbs! Follow the trail!",
          "image": []
        },
        {
          "assetUrl": "https://s.llamagen.ai/clr8t07zt0000l208uya2628n/7c515eec-1192-4295-a568-b21bab71a091.png",
          "panel": 3,
          "caption": "We made it! Cupcakes delivered!",
          "image": []
        }
      ],
      "update": 1783526779097,
      "firstUpdate": 1783526779097
    }
  ]
}
JavaScript SDK example
import { LlamaGenClient } from "comic";

const client = new LlamaGenClient({
  apiKey: process.env.LLAMAGEN_API_KEY,
});

const created = await client.comic.create({
  "prompt": "Create one polished 4-panel sequential cartoon comic page. title: \"The Tiny Bakery Map: a cheerful delivery mix-up becomes a team win\". Panel 1: a cheerful baker discovers that the cupcake delivery map is upside down. Panel 2: a scooter courier and a child helper compare landmarks with funny surprised faces. Panel 3: they follow frosting crumbs through a sunny street market. Panel 4: they arrive at the party just in time, everyone laughs, short readable speech bubbles, happy ending. Exactly four panels.",
  "size": "1024x1024",
  "style": "bright modern cartoon comic style, rounded friendly characters, bold clean outlines, expressive squash-and-stretch poses, sunny saturated color palette, simple readable backgrounds, playful motion accents, crisp black panel borders, short clear speech bubbles",
  "fixPanelNum": 4
});
const result = await client.comic.waitForCompletion(created.id);
console.log(result.comics.flatMap(({ panels }) =>
  panels.map(({ assetUrl }) => assetUrl)
));

Explore two more app concepts

Concept demos show possible app screens and example states. You can advance through each flow. Live API requests run in the Playground.

Creator episode desk

Give a writer a place to approve a scene, review generation progress, and request a targeted redraw.

Concept screen 1 of 3

New episode

Cast
Mira · Ivo · harbor clocktower

Gift book builder

Turn an order brief into a digital proof for customer approval before fulfillment.

Concept screen 1 of 3

Start a gift book

Theme
A backyard birthday treasure hunt

Choose a revenue model

Subscription

Set a recurring fee and a generation allowance. Model your cost from customers’ usage and retain headroom for redraws.

Credit bundle

Let customers buy an allowance for your product. Tell them which actions use that balance and how they can review their usage.

One book per purchase

Quote the page count and revision terms upfront. Include the cost of print, staff review, and customer support in the order price.

Wire the first request

  1. Submit on your server

    Your app sends the approved story input to the Comic API. Store the generation ID against the signed-in user’s project and keep the API token on the server.

  2. Update job state

    Poll generation status or register a webhook. Show queued, review-ready, and failed states with a deliberate retry action.

  3. Present a proof

    Render returned images in page order. Let users approve their project or send a specific panel back for a redraw.

Estimate monthly usage

One API panel is one output image. A page image can contain several drawn frames. Choose one panel if the whole page is generated as one image, or count each separately generated frame if you plan to assemble the page yourself.

Your optional costs in USD

Monthly estimate

Finished pages
20
Generated panels
20
Extra panels reserved for redraws
0
Estimated monthly API credits
3,000
Smallest monthly subscription that fits
Starter
Monthly subscription charge before tax
$9.00
Share of subscription value used
$6.00
Subscription cost per project at this volume
$9.00
Labor and printing per project
$0.00
Total planned cost per project
$9.00
Assumed monthly sales
$0.00
Illustrative gross margin
—

This estimate uses 150 credits per output image. The redraw reserve rounds up to the next whole image. The share of subscription value used is an allocation of the monthly fee. Covers, reference assets, add-on credits, and taxes are outside this estimate. Pricing and plan terms are available on the API pricing page.

The sales scenario assumes every project sells at your input price. Payment fees, refunds, and overhead are outside the gross margin calculation.

Which parts of an app does the API handle?

It accepts generation requests and returns job status and artwork URLs. Your app manages customer accounts, payments, review, and delivery.

Comic API solutions