typetext
{
"aspect_ratio": "4:3",
"creativity": "medium",
"moodboard_strength": 0.35,
"prompt": "The text \"Krea 2 Medium\" positioned in the dead center, in large helvetica font. An authentic, candid film portrait of a young woman, captured on high-ISO analog stock. Rich textures, fine film grain, and a subtle vintage color cast. A wide-open aperture creates a shallow depth of field, dissolving the background into creamy bokeh and pulling all focus to the expression in her eyes.",
"style_reference_images": [],
"style_reference_strength": 0.5
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_eKi**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run krea/krea-2-large using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const input = {
aspect_ratio: "4:3",
creativity: "medium",
moodboard_strength: 0.35,
prompt: "The text \"Krea 2 Medium\" positioned in the dead center, in large helvetica font. An authentic, candid film portrait of a young woman, captured on high-ISO analog stock. Rich textures, fine film grain, and a subtle vintage color cast. A wide-open aperture creates a shallow depth of field, dissolving the background into creamy bokeh and pulling all focus to the expression in her eyes.",
style_reference_images: [],
style_reference_strength: 0.5
};
const output = await replicate.run("krea/krea-2-large", { input });
// To access the file URL:
console.log(output.url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_eKi**********************************
This is your API token. Keep it to yourself.
import replicate
Run krea/krea-2-large using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"krea/krea-2-large",
input={
"aspect_ratio": "4:3",
"creativity": "medium",
"moodboard_strength": 0.35,
"prompt": "The text \"Krea 2 Medium\" positioned in the dead center, in large helvetica font. An authentic, candid film portrait of a young woman, captured on high-ISO analog stock. Rich textures, fine film grain, and a subtle vintage color cast. A wide-open aperture creates a shallow depth of field, dissolving the background into creamy bokeh and pulling all focus to the expression in her eyes.",
"style_reference_images": [],
"style_reference_strength": 0.5
}
)
# To access the file URL:
print(output.url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_eKi**********************************
This is your API token. Keep it to yourself.
Run krea/krea-2-large using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"input": {
"aspect_ratio": "4:3",
"creativity": "medium",
"moodboard_strength": 0.35,
"prompt": "The text \\"Krea 2 Medium\\" positioned in the dead center, in large helvetica font. An authentic, candid film portrait of a young woman, captured on high-ISO analog stock. Rich textures, fine film grain, and a subtle vintage color cast. A wide-open aperture creates a shallow depth of field, dissolving the background into creamy bokeh and pulling all focus to the expression in her eyes.",
"style_reference_images": [],
"style_reference_strength": 0.5
}
}' \
https://api.replicate.com/v1/models/krea/krea-2-large/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "m89tc2xjv9rmy0cydk3sqhvjsg",
"model": "krea/krea-2-large",
"version": "hidden",
"input": {
"aspect_ratio": "4:3",
"creativity": "medium",
"moodboard_strength": 0.35,
"prompt": "The text \"Krea 2 Medium\" positioned in the dead center, in large helvetica font. An authentic, candid film portrait of a young woman, captured on high-ISO analog stock. Rich textures, fine film grain, and a subtle vintage color cast. A wide-open aperture creates a shallow depth of field, dissolving the background into creamy bokeh and pulling all focus to the expression in her eyes.",
"style_reference_images": [],
"style_reference_strength": 0.5
},
"logs": "Using seed: 1221937292\nSubmitted Krea 2 large job 3c0c2896-0fb2-45d9-a321-271e3ffa1944\nGenerated in 102.2s\nDownloading 1887505 bytes\nDownloaded 1.80MB in 0.05sec",
"output": "https://replicate.delivery/xezq/0Cue9xZEo9QxVaijaFSIyGdiN4fsI3elfQBao0bgA3xUtclaB/tmprzes7ojz.png",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2026-05-28T04:11:27.322Z",
"started_at": "2026-05-28T04:11:27.335248Z",
"completed_at": "2026-05-28T04:13:09.874149Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/m89tc2xjv9rmy0cydk3sqhvjsg/cancel",
"get": "https://api.replicate.com/v1/predictions/m89tc2xjv9rmy0cydk3sqhvjsg",
"stream": "https://stream.replicate.com/v1/files/jbxs-onmotts7aif3x7omz4pruanibovgzmkubizrjomqffud44nxipsq",
"web": "https://replicate.com/p/m89tc2xjv9rmy0cydk3sqhvjsg"
},
"metrics": {
"image_output_count": 1,
"model_variant": "text_to_image",
"predict_time": 102.538900637,
"total_time": 102.552149261
}
}