Krea/Krea 2 Turbo (Fast)
Faster Krea 2 Turbo, slightly lower quality. Use it when you need lots of images fast.
A faster deployment of Krea 2 Turbo that trades a small amount of image quality for speed. Recommended for workloads that prioritize throughput over fidelity.
Krea 2 Turbo is the fast, post-trained release of Krea’s 12-billion-parameter text-to-image diffusion model. It generates high-quality images from natural-language prompts in as few as eight inference steps, making it well suited for rapid concepting, design exploration, visual production, and creative applications. It accepts up to 512 tokens of text input, and up to 2048px resolution output.
Released with open weights (Krea 2 Community License), Krea 2 Turbo gives developers and researchers the flexibility to run, customize, and integrate the model into their own workflows. It is designed around strong prompt following, aesthetic diversity, and expressive style control, helping creators move quickly from an idea to a polished visual.
Input
import os
import base64
from openai import OpenAI
MODEL_ID = "" # Replace with the Model ID in Baseten
ENDPOINT = f"https://model-{MODEL_ID}.api.baseten.co/environments/production/sync/v1"
client = OpenAI(
# Add your Baseten API Key as an environment variable
api_key = os.getenv("BASETEN_API_KEY"),
base_url = ENDPOINT
)
response = client.images.generate(
prompt=(
"A red fox sitting in fresh snow at golden hour, "
"photorealistic, cinematic lighting"
),
size = "1024x1024",
n=1,
response_format="b64_json",
)
image_bytes = base64.b64decode(response.data[0].b64_json)
with open("krea-2-turbo-output.png", "wb") as file:
file.write(image_bytes)
print("Saved image to krea-2-turbo-output.png")Output
{
"created": 1784218289,
"data": [
{
"b64_json": "<base64-encoded image data>",
"revised_prompt": "A red fox sitting in fresh snow at golden hour, photorealistic, cinematic lighting",
"url": null,
"file_path": "/workspace/outputs/id.jpg"
}
],
"id": "id",
"peak_memory_mb": 53126,
"inference_time_s": 1.5457863844931126
}