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

# Krea 2 API overview

> Krea 2 API reference covering models, parameters, pricing, and generative sliders for our first foundation image model built for creative control.

![](https://s.krea.ai/docs/krea-2-hero.webp)

# Krea 2

Our first foundation image model — built from scratch for full creative control.

# Krea 2

Our first foundation image model — built from scratch for full creative control.

Krea 2 is our first foundation image model, trained completely from scratch to give you full control over the look, feel, and creative direction of every image you generate.

> [!NOTE]
>
> [Krea 3](https://www.krea.ai/docs/developers/krea-3/overview.md) is our newest image model for fast generation and instruction-following editing. Keep using Krea 2 for weighted style references, moodboards, LoRAs, and Generative Sliders; these controls are not interchangeable with Krea 3 image references.

**What sets it apart:**

* **Aesthetic diversity** — Krea 2 can generate a wide range of styles, with particular strength in artistic and expressive directions other models tend to flatten.
* **Style transfer** — the most advanced style transfer system available. Extract the style of one or many reference images and apply it to your outputs with precision.
* **Tunable creativity** — `creativity` is an actual parameter you can adjust. At high values, the model adds aesthetic depth, interpretation, and visual richness to whatever you give it.
* **Moodboards** — pass in an entire moodboard of dozens of images and Krea 2 will understand the overall creative direction, producing outputs that align with it.

[Explore the galleryHundreds of Krea 2 outputs with their prompts.](https://www.krea.ai/k2-feed)

Try Krea 2Creative control with styles, LoRAs, and photographic detail.



[Open](https://www.krea.ai/krea-2)

## Choose a variant

The Krea 2 API ships in two variants. Both support the same public request shape — the differences come down to speed, model size, training stage, and the character of the outputs they produce.

> [card] Krea 2 Medium
>
> Smaller, faster, more cost-efficient. Extensive post-training makes outputs especially stable and consistent across generations.
>
> **Strongest on:** illustration, anime, painting, and other expressive or artistic styles.

> [card] Krea 2 Large
>
> More than 2× the size of Medium, with softer post-training. Outputs are rawer, more textured, and more flexible — at its best, Large produces results Medium can't match.
>
> **Strongest on:** photorealism, raw looks (motion blur, grain, low dynamic range), expressive and artistic styles.

> [!TIP]
>
> **Not sure which to start with?** Use Medium for stable general-purpose output, and Large when you want the richest texture or photorealism.

## Pricing

| Variant | Text-to-image | With style references | With moodboards |
| - | - | - | - |
| **Medium** | \$0.030 | \$0.035 | \$0.040 |
| **Large** | \$0.060 | \$0.065 | \$0.070 |

> [!NOTE]
>
> Combining moodboards **with** style references does not increase the price per generation — you pay the moodboard rate (\$0.040 Medium / \$0.070 Large).

## Endpoints

| Variant | Endpoint |
| - | - |
| **Medium** | `POST /generate/image/krea/krea-2/medium` |
| **Large** | `POST /generate/image/krea/krea-2/large` |

## Quickstart

Submit a generation request and poll for the result. All requests require a Bearer token — see [API Keys & Billing](https://www.krea.ai/docs/developers/api-keys-and-billing.md) if you don't have one yet.

```javascript Node.js theme={"theme":{"light":"github-light-default","dark":"vesper"}}
// 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/medium", {
  input: {
    prompt: "a cinematic glass cabin beside a frozen lake at sunrise",
    aspect_ratio: "16:9",
    resolution: "1K",
  },
});

// https://gen.krea.ai/images/80ead844-02a6-467d-ba9e-fcd401bcb9a6.png
console.log(result.data?.urls[0]);
```

```bash cURL theme={"theme":{"light":"github-light-default","dark":"vesper"}}
curl -X POST https://api.krea.ai/generate/image/krea/krea-2/medium \
  -H "Authorization: Bearer $KREA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A cinematic product photo of a glass lamp on a marble table",
    "aspect_ratio": "4:5",
    "resolution": "1K",
    "creativity": "medium"
  }'

# Then poll the returned job_id
curl https://api.krea.ai/jobs/<job_id> \
  -H "Authorization: Bearer $KREA_API_KEY"
```

```python Python theme={"theme":{"light":"github-light-default","dark":"vesper"}}
import os
import time
import requests

API_BASE = "https://api.krea.ai"
API_TOKEN = os.environ["KREA_API_KEY"]

def wait_for_job(job_id):
    while True:
        response = requests.get(
            f"{API_BASE}/jobs/{job_id}",
            headers={"Authorization": f"Bearer {API_TOKEN}"},
        )
        response.raise_for_status()
        job = response.json()
        if job["status"] == "completed":
            return job
        if job["status"] in ("failed", "cancelled"):
            raise RuntimeError(f"Job {job['status']}")
        time.sleep(3)

response = requests.post(
    f"{API_BASE}/generate/image/krea/krea-2/medium",
    headers={
        "Authorization": f"Bearer {API_TOKEN}",
        "Content-Type": "application/json",
    },
    json={
        "prompt": "A cinematic product photo of a glass lamp on a marble table",
        "aspect_ratio": "4:5",
        "resolution": "1K",
        "creativity": "medium",
    },
)
response.raise_for_status()
job = wait_for_job(response.json()["job_id"])
print(job["result"]["urls"])
```

```go Go theme={"theme":{"light":"github-light-default","dark":"vesper"}}
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"net/http"
	"os"
	"time"
)

const apiBase = "https://api.krea.ai"

func waitForJob(client *http.Client, jobID, token string) (map[string]any, error) {
	for {
		req, _ := http.NewRequest("GET", fmt.Sprintf("%s/jobs/%s", apiBase, jobID), nil)
		req.Header.Set("Authorization", "Bearer "+token)
		resp, err := client.Do(req)
		if err != nil {
			return nil, err
		}
		var job map[string]any
		json.NewDecoder(resp.Body).Decode(&job)
		resp.Body.Close()
		switch job["status"] {
		case "completed":
			return job, nil
		case "failed", "cancelled":
			return nil, fmt.Errorf("job %s", job["status"])
		}
		time.Sleep(3 * time.Second)
	}
}

func main() {
	token := os.Getenv("KREA_API_KEY")
	client := &http.Client{}

	payload, _ := json.Marshal(map[string]any{
		"prompt":       "A cinematic product photo of a glass lamp on a marble table",
		"aspect_ratio": "4:5",
		"resolution":   "1K",
		"creativity":   "medium",
	})

	req, _ := http.NewRequest("POST", apiBase+"/generate/image/krea/krea-2/medium", bytes.NewBuffer(payload))
	req.Header.Set("Authorization", "Bearer "+token)
	req.Header.Set("Content-Type", "application/json")

	resp, _ := client.Do(req)
	var created map[string]any
	json.NewDecoder(resp.Body).Decode(&created)
	resp.Body.Close()

	job, err := waitForJob(client, created["job_id"].(string), token)
	if err != nil {
		panic(err)
	}
	fmt.Println(job["result"])
}
```

> [!TIP]
>
> Krea 2 Large generations can take longer to complete, so for production workloads prefer the [`X-Webhook-URL`](https://www.krea.ai/docs/developers/webhooks) header over polling.

## Parameters

`krea-2/medium` and `krea-2/large` accept the same public request body.

| Field | Type | Notes |
| - | - | - |
| `prompt` | string | **Required.** Text prompt describing the image. |
| `aspect_ratio` | string | One of `1:1`, `4:3`, `3:2`, `16:9`, `2.35:1`, `4:5`, `2:3`, `9:16`. |
| `resolution` | string | Currently only `1K` is supported. |
| `seed` | number | Optional. Use the same seed + prompt to reproduce a generation. |
| `creativity` | enum | `raw`, `low`, `medium` (default), `high`. See below. |
| `image_style_references` | array | Optional. See [Style transfer](https://www.krea.ai/docs/developers/krea-2/style-transfer.md). |
| `moodboards` | array | Optional. See [Moodboards](https://www.krea.ai/docs/developers/krea-2/moodboards.md). Max 1 moodboard per request. |
| `styles` | array | Optional trained styles (LoRAs). |
| `intensity` | integer | Optional. `-100` to `100`, default `0`. See [Generative sliders](https://www.krea.ai/docs/developers/krea-2/generative-sliders.md). |
| `complexity` | integer | Optional. `-100` to `100`, default `0`. See [Generative sliders](https://www.krea.ai/docs/developers/krea-2/generative-sliders.md). |
| `movement` | integer | Optional. `-100` to `100`, default `0`. See [Generative sliders](https://www.krea.ai/docs/developers/krea-2/generative-sliders.md). |

### Creativity

`creativity` controls how far the model expands on what you wrote. When your prompt is short or vague, the model fills in missing pieces — style, composition, camera angle, color palette — and `creativity` decides how much liberty it takes.

> [accordion] raw — no expansion
>
> The model renders only what you've explicitly described. Best for tightly art-directed prompts where every detail is already specified.

> [accordion] low — close to the prompt
>
> Minimal expansion. The model stays close to the literal prompt but fills in obvious gaps.

> [accordion] medium — balanced (default)
>
> Default behavior. The model adds reasonable interpretation without straying far from the prompt's intent.

> [accordion] high — expressive interpretation
>
> Strong expansion. The model takes meaningful creative liberty with style, mood, and aesthetics — best for short or open-ended prompts where you want the model to surprise you.

## Feature deep-dives

> [card] [Style transfer](https://www.krea.ai/docs/developers/krea-2/style-transfer.md)
>
> Extract the style of one or many reference images and apply it to your outputs with tunable strength.

> [card] [Moodboards](https://www.krea.ai/docs/developers/krea-2/moodboards.md)
>
> Reference a Krea moodboard to set the overall visual direction — palette, texture, mood, and composition.

> [card] [Generative sliders](https://www.krea.ai/docs/developers/krea-2/generative-sliders.md)
>
> Steer intensity, complexity, and movement of every generation without rewriting your prompt.

## Open source

Krea 2 is also available as an open-source release if you'd rather self-host or fine-tune the model instead of (or alongside) calling the hosted API. Two checkpoints are published on Hugging Face:

* **Krea 2 RAW** — the undistilled base checkpoint. Diverse and malleable, intended for fine-tuning, post-training, and LoRA training.
* **Krea 2 Turbo** — an 8-step distilled checkpoint built for fast text-to-image inference. LoRAs trained on RAW are designed to apply cleanly on Turbo.

| Resource | Link |
| - | - |
| Checkpoints on Hugging Face | [huggingface.co/krea/Krea-2-Raw](https://krea.ai/krea-2/huggingface) |
| Model code on GitHub | [github.com/krea-ai/krea-2](https://krea.ai/krea-2/github) |
| Technical report | [Krea 2 technical report](https://krea.ai/krea-2/technical-report) |

### Licensing

The open-source release ships under two license tracks:

* **[Community License](https://krea.ai/krea-2-licensing)** — free, non-exclusive use for research, personal, and non-commercial projects, plus commercial use under a revenue threshold. Subject to the [Acceptable Use Policy](https://krea.ai/krea-2-use-policy).
* **[Commercial License](https://krea.ai/krea-2-commercial-license)** — enterprise terms for commercial use that exceeds the Community License revenue threshold. Contact `opensource@krea.ai`.

> [!NOTE]
>
> The hosted Krea 2 API documented on this page is governed by the standard [API terms](https://www.krea.ai/docs/developers/api-keys-and-billing.md) — you don't need to accept the open-source license to call `krea-2/medium` or `krea-2/large`.

## API reference

Krea 2 Medium logo

### [Krea 2 Medium](https://www.krea.ai/docs/api-reference/krea/krea-2-medium.md)

Faster, cheaper, stable across illustration, anime, and expressive styles.

Krea 2 Large logo

### [Krea 2 Large](https://www.krea.ai/docs/api-reference/krea/krea-2-large.md)

More powerful — photorealism, raw textures, and the most flexible outputs.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.