Libraries & SDKs

Centralized resources for integrating LlamaGen Comic API, combining official documentation and the npm package details.

Official SDK

Official JavaScript/TypeScript SDK

Package: comic

npm package

Install

npm i comic

Step 1: Create generation

1import { LlamaGenClient } from "comic";2 3const client = new LlamaGenClient({4  apiKey: process.env.LLAMAGEN_API_KEY!,5});6 7// Step 1: create a generation job8const created = await client.comic.create({9  prompt: "american comic illustration, bold, thick outlines,vibrant, high-contrast colors, A detective fox in New York city",10  preset: "neutral",11  size: "1024x1024",12});

Step 2: Wait for completion

1// Step 2: wait for the final result2const result = await client.comic.waitForCompletion(created.id);3 4console.log(result);

Supported size values: 1024x1024 (1:1), 512x768 (2:3), 512x1024 (1:2), 576x1024 (9:16), 768x1024 (3:4), 1024x768 (4:3), 768x512 (3:2), 1024x576 (16:9), 1024x512 (2:1)