Libraries & SDK Resources
Use the REST API directly today, or wrap it in your own typed helper for video generation workflows.
REST helper
TypeScript client wrapper
A small wrapper is enough for create-and-poll flows.
1type AnimationCreateInput = {2 prompt: string;3 videoOptions: {4 duration?: number;5 resolution?: "480p" | "720p" | "1080p" | "4k";6 aspect_ratio?: string;7 image?: string;8 last_frame_image?: string;9 generate_audio?: boolean;10 };11};12 13export async function createAnimation(input: AnimationCreateInput) {14 const response = await fetch("https://api.llamagen.ai/v1/artworks/generations", {15 method: "POST",16 headers: {17 "Authorization": `Bearer ${process.env.LLAMAGEN_API_KEY}`,18 "Content-Type": "application/json"19 },20 body: JSON.stringify(input)21 });22 23 if (!response.ok) {24 throw new Error(await response.text());25 }26 27 return response.json();28}