API Quick Start
Generate images and videos programmatically with the Ddukddak SDK. Get up and running in under 5 minutes.
Install SDK
npm install @ddukddak/node or pip install ddukddak
Get API Key
Dashboard > Settings > API Keys
Pick a Template
Browse templates or create your own
Generate
One API call to create images & videos
1. Install the SDK
Official SDKs are available for Node.js, TypeScript, and Python. Choose your language and install via your package manager.
npm install @ddukddak/node2. Authenticate
Create a client with your API key from Dashboard > Settings > API Keys. The SDK handles Bearer token authentication automatically.
const { Ddukddak } = require("@ddukddak/node");
const client = new Ddukddak("YOUR_API_KEY");
const result = await client.auth.test();
console.log(result.message); // "Authenticated"3. Browse Templates
List your templates to find the right one. Each template has available_properties that define what you can customize — text, images, colors.
Reference templates by slug (e.g. product-card) or UUID.
// List your templates
const templates = await client.templates.list({ page: 1, limit: 10 });
for (const t of templates) {
console.log(`- ${t.id} (${t.slug}): ${t.name}`);
}
// Get template details (requires UUID)
const template = await client.templates.get(templates[0].id);
console.log(template.available_properties);4. Generate Images
Pass a template and properties to generate an image. Use createAndWait to automatically poll until the image is ready.
Available on all plans including Free Trial.
const image = await client.images.createAndWait({
template: "product-card",
properties: [
{ name: "title", text: "My Awesome Product Launch!" },
{ name: "background", image_url: "https://example.com/bg.jpg" },
{ name: "price", text: "$29.99", color: "#FF6B6B" },
],
});
console.log(image.image_url);5. Generate Videos
Video generation requires the Automate plan or higher. Provide an input media URL along with your template.
Videos are processed asynchronously — the SDK polls until complete.
// Requires Automate plan or higher
const video = await client.videos.createAndWait({
template: "story-promo",
input_media_url: "https://example.com/clip.mp4",
properties: [
{ name: "title", text: "Summer Sale" },
],
});
console.log(video.video_url);6. AI Generation
Generate images and videos from text prompts using AI models. Requires the Scale plan or higher.
AI Image models: Gemini Flash, Hailuo Image
AI Video models: MiniMax Hailuo, Google Veo 3.1
// Requires Scale plan or higher
const aiImage = await client.aiImages.createAndWait({
prompt: "A minimalist product photo of a white sneaker",
model: "gemini-2.5-flash-image",
aspect_ratio: "1:1",
image_size: "1K",
});
console.log(aiImage.image_url);
// AI Video
const aiVideo = await client.aiVideos.createAndWait({
prompt: "A sneaker rotating 360 degrees",
model: "MiniMax-Hailuo-2.3",
aspect_ratio: "16:9",
resolution: "768p",
duration: "6s",
});
console.log(aiVideo.video_url);