Back to Comic API

Comic API Documentation

Integrate professional comic generation capabilities into your applications.

Authentication

The Comic API uses API tokens to authenticate requests. You can view and manage your API tokens in the API Dashboard.

Authentication to the API is performed via HTTP Bearer Auth. Provide your API key as the basic auth password value. You do not need to provide a username.

Authorization: Bearer YOUR_API_TOKEN

Base URL

https://api.llamagen.ai/v1

Endpoints

POST/comics/generations

Create a Comic Generation

Generate a new comic based on text prompts.

Request Body

ParameterTypeRequiredDescription
promptstringYesThe story description or script for your comic.
modelstringNoSpecific model to use for generation (default: auto-selected based on plan).
presetstringNoStyle preset (default: "render").
sizestringNoOutput resolution (e.g. "1024x1024").

Example Request

curl -X POST https://api.llamagen.ai/v1/comics/generations \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A superhero cat saving a city from giant mice",
    "preset": "render",
    "size": "1024x1024"
  }'
GET/comics/generations/:id

Get Generation Status

Retrieve the status and result of a comic generation.

Path Parameters

ParameterTypeRequiredDescription
idstringYesThe generation ID returned from the creation endpoint.

Response

{
  "id": "gen_123456789",
  "status": "SUCCEEDED", // PENDING, PROCESSING, SUCCEEDED, FAILED
  "output": "https://cdn.llamagen.ai/comics/...",
  "createdAt": "2024-03-20T10:00:00Z"
}

Rate Limits

Demo Users

  • 4 requests per minute
  • 15 requests per day
  • Watermarked outputs

Paid Plans

  • 10 requests per minute
  • Usage based on credits
  • High-resolution, no watermark

Errors

CodeDescription
401Unauthorized - Invalid API token.
402Payment Required - Insufficient credits.
403Forbidden - Access denied.
429Too Many Requests - Rate limit exceeded.
500Internal Server Error.