Ddukddak

Multi Image Demo

Generate hundreds or thousands of images in a single batch. Upload a CSV or JSON file with your data, pick a template, and let Ddukddak handle the rest. Perfect for product catalogs, social media campaigns, and personalized content.

Get Started

Install the SDK and generate images in batch from your data.

Install the SDK

npm install @ddukddak/node

Batch Generation

const { Ddukddak } = require("@ddukddak/node");

const client = new Ddukddak("YOUR_API_KEY");

// Data from CSV/JSON — each row becomes an image
const items = [
  { title: "Summer Sale", subtitle: "Up to 50% off", bg: "https://example.com/summer.jpg" },
  { title: "New Arrival", subtitle: "Spring Collection", bg: "https://example.com/spring.jpg" },
  { title: "Flash Deal", subtitle: "24 Hours Only", bg: "https://example.com/flash.jpg" },
];

// Generate images sequentially
for (const item of items) {
  const image = await client.images.createAndWait({
    template: "social-media-card",
    properties: [
      { name: "title", text: item.title },
      { name: "subtitle", text: item.subtitle },
      { name: "background", image_url: item.bg },
    ],
  });
  console.log(`${item.title}: ${image.image_url}`);
}

API Parameters

Parameters for the image generation endpoint. Called once per item in your batch.

ParameterTypeRequiredDescription
templatestringYesTemplate slug or UUID for batch items
propertiesarrayYesArray of property objects: { name, text?, image_url?, color? }
transparentbooleanNoEnable transparent background (default: false)

Parallel Processing & Template Discovery

For large batches, fire off requests in parallel and discover available templates.

const { Ddukddak } = require("@ddukddak/node");

const client = new Ddukddak("YOUR_API_KEY");

// Discover available templates
const templates = await client.templates.list({ page: 1, limit: 10 });
for (const tmpl of templates) {
  console.log(`- ${tmpl.slug}: ${tmpl.name}`);
}

// Fire off all requests in parallel
const items = [/* ... your data array ... */];

const promises = items.map((item) =>
  client.images.create({
    template: "social-media-card",
    properties: [
      { name: "title", text: item.title },
      { name: "background", image_url: item.bg },
    ],
  })
);

const results = await Promise.all(promises);

// Poll each for completion
for (const img of results) {
  const completed = await client.images.get(img.uid);
  console.log(`${img.uid}: ${completed.image_url}`);
}

Want to build this?

Use our API to integrate batch image generation into your existing workflows and pipelines.