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_TOKENBase URL
https://api.llamagen.ai/v1
Endpoints
POST
/comics/generationsCreate a Comic Generation
Generate a new comic based on text prompts.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| prompt | string | Yes | The story description or script for your comic. |
| model | string | No | Specific model to use for generation (default: auto-selected based on plan). |
| preset | string | No | Style preset (default: "render"). |
| size | string | No | Output 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/:idGet Generation Status
Retrieve the status and result of a comic generation.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | The 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
| Code | Description |
|---|---|
| 401 | Unauthorized - Invalid API token. |
| 402 | Payment Required - Insufficient credits. |
| 403 | Forbidden - Access denied. |
| 429 | Too Many Requests - Rate limit exceeded. |
| 500 | Internal Server Error. |