> ## Documentation Index
> Fetch the complete documentation index at: https://docs.krea.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Moodboards

> Use a Krea moodboard to set the visual direction of a Krea 2 generation — palette, texture, mood, and composition.

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.

<Warning>
  **Moodboards must be created in the Krea webapp first.** The API references existing moodboards by ID; it does not create them.
</Warning>

## 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.

<div className="not-prose space-y-8">
  <div>
    <div className="grid grid-cols-2 gap-3">
      <a href="https://www.krea.ai/moodboards?share=1e51738c-7413-469e-93b6-ad50db460a1f" target="_blank" rel="noopener noreferrer" className="block">
        <img src="https://s.krea.ai/docs/krea-2/moodboard-flying-whale-cover.webp" alt="Moodboard for flying whale" className="rounded-lg w-full object-cover m-0 hover:opacity-90 transition-opacity" style={{ aspectRatio: "4/3" }} />
      </a>

      <img src="https://s.krea.ai/docs/krea-2/moodboard-flying-whale-out.webp" alt="Output: a flying whale" className="rounded-lg w-full object-cover m-0" style={{ aspectRatio: "4/3" }} />
    </div>

    <p className="mt-2 text-sm text-gray-600 dark:text-gray-400">Prompt: <em>a flying whale with small fish swimming around her in the air</em></p>
  </div>

  <div>
    <div className="grid grid-cols-2 gap-3">
      <a href="https://www.krea.ai/moodboards?share=2ab1e2e1-b561-4fc5-8bf1-0250a948f22f" target="_blank" rel="noopener noreferrer" className="block">
        <img src="https://s.krea.ai/docs/krea-2/moodboard-samurai-mask-cover.webp" alt="Moodboard for samurai mask" className="rounded-lg w-full object-cover m-0 hover:opacity-90 transition-opacity" style={{ aspectRatio: "4/3" }} />
      </a>

      <img src="https://s.krea.ai/docs/krea-2/moodboard-samurai-mask-out.webp" alt="Output: a samurai mask" className="rounded-lg w-full object-cover m-0" style={{ aspectRatio: "4/3" }} />
    </div>

    <p className="mt-2 text-sm text-gray-600 dark:text-gray-400">Prompt: <em>a samurai mask</em></p>
  </div>

  <div>
    <div className="grid grid-cols-2 gap-3">
      <a href="https://www.krea.ai/moodboards?share=98930754-e374-4ef8-837a-8fa2daaa0df7" target="_blank" rel="noopener noreferrer" className="block">
        <img src="https://s.krea.ai/docs/krea-2/moodboard-jaguar-chrome-cover.webp" alt="Moodboard for chrome jaguar teeth" className="rounded-lg w-full object-cover m-0 hover:opacity-90 transition-opacity" style={{ aspectRatio: "4/3" }} />
      </a>

      <img src="https://s.krea.ai/docs/krea-2/moodboard-jaguar-chrome-out.webp" alt="Output: jaguar with chrome teeth" className="rounded-lg w-full object-cover m-0" style={{ aspectRatio: "4/3" }} />
    </div>

    <p className="mt-2 text-sm text-gray-600 dark:text-gray-400">Prompt: <em>extreme close-up of a jaguar's mouth with chromed teeth, side view</em></p>
  </div>

  <div>
    <div className="grid grid-cols-2 gap-3">
      <a href="https://www.krea.ai/moodboards?share=5ef5c53c-af9a-4fc1-8602-01dba7da0250" target="_blank" rel="noopener noreferrer" className="block">
        <img src="https://s.krea.ai/docs/krea-2/moodboard-ramen-house-cover.webp" alt="Moodboard for house of ramen" className="rounded-lg w-full object-cover m-0 hover:opacity-90 transition-opacity" style={{ aspectRatio: "4/3" }} />
      </a>

      <img src="https://s.krea.ai/docs/krea-2/moodboard-ramen-house-out.webp" alt="Output: a house made of ramen" className="rounded-lg w-full object-cover m-0" style={{ aspectRatio: "4/3" }} />
    </div>

    <p className="mt-2 text-sm text-gray-600 dark:text-gray-400">Prompt: <em>a house made of ramen</em></p>
  </div>
</div>

## How it works

<Steps>
  <Step title="Create a moodboard in Krea">
    Open [krea.ai](https://www.krea.ai/), create a new moodboard, drop in the images that share your creative direction, and save it.
  </Step>

  <Step title="Get the moodboard ID">
    Open the [API playground](https://www.krea.ai/app/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.
  </Step>

  <Step title="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.
  </Step>
</Steps>

## Code example

```javascript Node.js theme={null}
// 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]);
```
