Skip to main content
Krea 2 ships with the most powerful style transfer system on the market. Pass in a single reference image or combine several, and Krea 2 will extract the style and apply it to your output — letting you decide how strongly each reference shapes the final image.

Examples

Each example shows the style reference on the left and the generated output on the right.
Style reference: cartoon running through grassOutput: a cat jumping sideways

Prompt: a cat jumping sideways

Style reference: 8-bit pixel-art gridOutput: a polar bear

Prompt: a polar bear

Style reference: Krea 1 style sketchOutput: a cowboy

Prompt: a cowboy

Style reference: Sesame Street style horseOutput: muppets-style cat and dog

Prompt: a scene from the live-action Muppets movie featuring a grey cat muppet and his dog friend

How it works

1

Upload your reference

POST the image to /assets. The response includes a hosted URL you’ll pass to the generation request.
2

Reference it by URL

Include the asset URL in the image_style_references array of your krea-2/medium or krea-2/large request.
3

Tune the strength

Set strength between -2 and 2 per reference. ~0.6 is a reasonable starting point — raise it to make the style dominate, lower it for a subtler influence.

End-to-end example

This example uploads a local file as a style reference and uses it in a Krea 2 Medium generation.
// npm install @krea-ai/sdk
import { openAsBlob } from "node:fs";
import { Krea } from "@krea-ai/sdk";

const krea = new Krea({ apiKey: process.env.KREA_API_KEY });

// 1. Upload the style reference
const file = await openAsBlob("./style-reference.png", { type: "image/png" });
const asset = await krea.assets.upload(file, {
  filename: "style-reference.png",
  description: "Style reference for Krea 2",
});

// 2. Generate with the reference
const result = await krea.subscribe("image/krea/krea-2/medium", {
  input: {
    prompt: "A portrait of a dancer in a quiet studio",
    aspect_ratio: "4:3",
    resolution: "1K",
    creativity: "medium",
    image_style_references: [{ url: asset.image_url, strength: 0.6 }],
  },
});

console.log(result.data?.urls[0]);
The REST examples are asynchronous — POST /generate/... returns a job_id immediately. The Node.js SDK example uses subscribe(...), which waits for the completed result. See Job lifecycle for the polling pattern, or use a webhook to skip polling entirely.

Tuning strength

strength ranges from -2 to 2. A few rules of thumb:
  • ~0.3–0.5 — subtle influence; useful when you want the prompt to lead and the reference to add character.
  • ~0.6 — balanced starting point for most use cases.
  • ~0.8–1.0 — the reference style dominates; useful when the prompt is generic and the visual identity should come from the reference.
  • Negative values — push the output away from a reference style.
If outputs feel either too literal (reference is too strong) or too generic (reference is too weak), nudge by 0.1 at a time.

Combining multiple references

Pass multiple objects in image_style_references to blend styles. Each reference can have its own strength.
Node.js
const result = await krea.subscribe("image/krea/krea-2/medium", {
  input: {
    prompt: "A portrait of a dancer in a quiet studio",
    aspect_ratio: "4:3",
    resolution: "1K",
    image_style_references: [
      { url: assetA.image_url, strength: 0.6 },
      { url: assetB.image_url, strength: 0.4 },
    ],
  },
});
The references blend additively — start with strengths that sum near 1.0 and tune from there.