Skip to main content

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.

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 0 and 1 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.
# 1. Upload the style reference
curl -X POST https://api.krea.ai/assets \
  -H "Authorization: Bearer $KREA_API_TOKEN" \
  -F "file=@./style-reference.png" \
  -F "description=Style reference for Krea 2"
# Response includes { "image_url": "https://..." }

# 2. Generate with the reference (replace IMAGE_URL with the response above)
curl -X POST https://api.krea.ai/generate/image/krea/krea-2/medium \
  -H "Authorization: Bearer $KREA_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A portrait of a dancer in a quiet studio",
    "aspect_ratio": "4:3",
    "resolution": "1K",
    "creativity": "medium",
    "image_style_references": [
      { "url": "IMAGE_URL", "strength": 0.6 }
    ]
  }'
The job is asynchronous — POST /generate/... returns a job_id immediately. See Job lifecycle for the polling pattern, or use a webhook to skip polling entirely.

Tuning strength

strength ranges from 0 (no influence) to 1 (the style fully dominates the output). 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.
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
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.