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.

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"
    }
  ]
}

Output evidence

Inspect the visual result and the machine-readable state.

The visual is evidence of the output category. The JSON is what lets an application correlate the generation, render a preview, store assets, and continue the workflow.

Generated personalized comic delivered through an asynchronous webhook workflow
Representative LlamaGen Comic API output. Exact composition varies by input and generation.

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.

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