typetext
{
"aspect_ratio": "4:3",
"creativity": "medium",
"moodboard_strength": 0.35,
"prompt": "The text \"Krea 2 Large\" in the center middle in large serif font. A color film-inspired portrait of a young woman looking to the left, shallow depth of field. She is looking out a school bus window. The fine grain and cast suggest a high ISO film stock, while the wide aperture lens creates a motion blur effect, enhancing the candid and natural documentary style.",
"style_reference_images": [],
"style_reference_strength": 0.5
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_ZBy**********************************
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 Large\" in the center middle in large serif font. A color film-inspired portrait of a young woman looking to the left, shallow depth of field. She is looking out a school bus window. The fine grain and cast suggest a high ISO film stock, while the wide aperture lens creates a motion blur effect, enhancing the candid and natural documentary style.",
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_ZBy**********************************
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 Large\" in the center middle in large serif font. A color film-inspired portrait of a young woman looking to the left, shallow depth of field. She is looking out a school bus window. The fine grain and cast suggest a high ISO film stock, while the wide aperture lens creates a motion blur effect, enhancing the candid and natural documentary style.",
"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_ZBy**********************************
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 Large\\" in the center middle in large serif font. A color film-inspired portrait of a young woman looking to the left, shallow depth of field. She is looking out a school bus window. The fine grain and cast suggest a high ISO film stock, while the wide aperture lens creates a motion blur effect, enhancing the candid and natural documentary style.",
"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": "fq2r8y7r5srmt0cydjx8fqg34g",
"model": "krea/krea-2-large",
"version": "hidden",
"input": {
"aspect_ratio": "4:3",
"creativity": "medium",
"moodboard_strength": 0.35,
"prompt": "The text \"Krea 2 Large\" in the center middle in large serif font. A color film-inspired portrait of a young woman looking to the left, shallow depth of field. She is looking out a school bus window. The fine grain and cast suggest a high ISO film stock, while the wide aperture lens creates a motion blur effect, enhancing the candid and natural documentary style.",
"style_reference_images": [],
"style_reference_strength": 0.5
},
"logs": "Using seed: 2031061787\nSubmitted Krea 2 large job c1af2ca4-d321-444e-9703-e442708d430b\nGenerated in 142.1s\nDownloading 1339865 bytes\nDownloaded 1.28MB in 0.36sec",
"output": "https://replicate.delivery/xezq/3ECS7XJwiL4LCle3vIZRjFPLgNcm2XRTiyOxoYtxADudfWpWA/tmpl8jkbq4c.png",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2026-05-28T03:57:33.102Z",
"started_at": "2026-05-28T03:57:33.111978Z",
"completed_at": "2026-05-28T03:59:55.805778Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/fq2r8y7r5srmt0cydjx8fqg34g/cancel",
"get": "https://api.replicate.com/v1/predictions/fq2r8y7r5srmt0cydjx8fqg34g",
"stream": "https://stream.replicate.com/v1/files/jbxs-55jgj2t6uslirplospjceryxbibseslpszwdpl2h7ispd5zw6kwq",
"web": "https://replicate.com/p/fq2r8y7r5srmt0cydjx8fqg34g"
},
"metrics": {
"image_output_count": 1,
"model_variant": "text_to_image",
"predict_time": 142.693800259,
"total_time": 142.703778962
}
}