A moodboard is the most precise way to set a visual direction with Krea 2. Moodboards are groups of images that share an overall creative direction — palette, texture, style, mood, or composition. You build one in the Krea webapp, then reference it from the API.
Moodboards must be created in the Krea webapp first. The API references existing moodboards by ID; it does not create them.
Examples
Each example shows the moodboard on the left and the generated output on the right. Click any moodboard cover to open it in Krea.
Prompt: a flying whale with small fish swimming around her in the air
Prompt: extreme close-up of a jaguar’s mouth with chromed teeth, side view
Prompt: a house made of ramen
How it works
Create a moodboard in Krea
Open krea.ai, create a new moodboard, drop in the images that share your creative direction, and save it. Get the moodboard ID
Open the API playground — your saved moodboards are listed there with their IDs. You can also grab one from a moodboard’s share URL: https://www.krea.ai/moodboards?share=<id> — the UUID after ?share= is the ID. Reference it from the API
Pass the UUID as id in the moodboards array, along with a strength between -0.5 and 1.5. Use it with krea-2/medium or krea-2/large. Start around 0.35 and tune up if you want the moodboard to dominate the output.
Code example
// npm install @krea-ai/sdk
import { Krea } from "@krea-ai/sdk";
const krea = new Krea({ apiKey: process.env.KREA_API_KEY });
const result = await krea.subscribe("image/krea/krea-2/large", {
input: {
prompt: "A campaign image for a new outdoor lamp collection",
aspect_ratio: "16:9",
resolution: "1K",
creativity: "high",
// From a share URL like https://www.krea.ai/moodboards?share=<id>
moodboards: [{ id: "1e51738c-7413-469e-93b6-ad50db460a1f", strength: 0.35 }],
},
});
console.log(result.data?.urls[0]);