Skip to content

Webhook guide

Handle Comic API webhooks without losing a generation.

Provide a callback URL when creating a generation, persist the generation ID, verify incoming requests, and treat repeated deliveries idempotently.

Webhook delivery complements status polling. Your system should retain a polling fallback when callbacks are delayed or rejected.

Read the webhook reference

Account, API key, usage, and billing open on LlamaGen.AI.

Direct answer

The decision this page is for.

Last verified:

Pass a callback URL when you create a generation, persist the generation ID, verify signatures, acknowledge quickly, and treat deliveries as at-least-once. Keep status polling as a recovery path.

Verifiable request

Generation with callback configuration

JSON
{
  "prompt": "Create a four-panel order story.",
  "fixPanelNum": 4,
  "callbackUrl": "https://example.com/webhooks/llamagen/comics",
  "webhookSecret": "stored-server-side"
}

Structured response

State your application can route

response.jsonPROCESSED
{
  "id": "gen_abc123",
  "status": "PROCESSED",
  "event": "comic.generation.updated",
  "comics": [
    {
      "page": 0,
      "assetUrl": "https://cdn.llamagen.ai/comics/page-0.webp"
    }
  ]
}

Webhook walkthrough

Deliver completed jobs without keeping requests open.

The event path highlights signature verification, idempotency, status recovery, and downstream asset delivery.

A webhook delivery diagram showing comic submission, queued processing, callback, retry, and a completed delivery comic
Editorial illustration of an asynchronous Comic API webhook flow; it is not a generated API result.Art direction · Swiss-American information design

Capability and boundary facts

Facts an integration can verify.

Last verified:

Correlation key
Generation ID
Terminal states
PROCESSED, FAILED, or CANCELLED
Fallback
GET generation status
Delivery design
Verify, acknowledge, deduplicate, then process

Good fit

Use it when

  • Order fulfillment
  • Editorial approval queues
  • Long-running background workflows

Wrong fit

Do not use it for

  • Performing heavy rendering inside the webhook request
  • Assuming exactly-once delivery
  • Using only in-memory correlation state

Production limits

Plan for the boundaries.

  • 01Confirm the current signature header and verification algorithm in LlamaGen documentation before implementation.
  • 02Webhook endpoints must return quickly and move long work to a queue.
  • 03Generation is asynchronous; production interfaces must handle processing and failure states.
  • 04Outputs should be reviewed against product, brand, safety, and print requirements before delivery.
  • 05You must have the rights to prompts, photos, scripts, and reference assets submitted to the API.

Questions

Direct answers before you integrate.

01Are Comic API webhooks exactly-once?
No. Design for duplicates with an idempotency key around the generation ID. Never create a second billable job because a webhook retried.
02What if the callback never arrives?
Poll GET generation status using the stored ID. Webhooks complement polling; they do not replace it.
03Should the webhook handler render the comic?
No. Return quickly and enqueue long work. Confirm the current signature header in LlamaGen docs before you verify.

Next step

Move from evidence to a real API request.

LlamaGen provides the playground, API key, usage, billing, and authoritative service documentation.

Read the webhook reference