Krea 2 Turbo is Krea’s 12B flow-matching image generation model: a single-stream MMDiT backbone paired with a Qwen3-VL text encoder and the Qwen-Image VAE.
Krea 2 Turbo is Krea’s 12B flow-matching image generation model: a single-stream MMDiT backbone paired with a Qwen3-VL text encoder and the Qwen-Image VAE. The Turbo variant is distilled to 8 denoising steps with classifier-free guidance (CFG) disabled, generating a 1024px image in roughly 1.5 to 2 seconds and a 2048px image in 6 to 8 seconds on an H100, with native output resolutions from 1024 to 2048. For example prompts and prompting techniques, see the Krea 2 prompting guide. The weights ship under the Krea 2 Community License, which requires an Enterprise License from Krea for commercial use by companies over $1M in annual revenue.
Install the Baseten CLI and sign in, then install the client library for the tab you’ll use: requests for the Python tab, or the OpenAI SDK for the OpenAI tab.
Install and sign in to Baseten
macOS or Linux
Windows
Terminal
brew tap basetenlabs/basetenbrew trust --formula basetenlabs/baseten/basetenbrew install baseten
Download and extract the Windows archive for the latest Baseten CLI release:
To install without Homebrew, see the Baseten CLI install reference.This variant ships in 2 presets tuned for different goals: Lossy for faster generation with minor perceptual trade-offs, and Perf-Optimized. Pick the tab that matches your workload.
Lossy
Perf-Optimized
This preset serves Krea 2 Turbo on a single H100, with the full bfloat16 weights loaded in GPU memory and the SGLang diffusion stack’s 8-step distilled sampling for fast image generation.
This deployment loads the 34 GB bfloat16 checkpoint of krea/Krea-2-Turbo on a single H100 and serves it with the SGLang diffusion stack. The server exposes an OpenAI-compatible images API at /v1/images/generations that returns base64-encoded images.
Push the config to Baseten with the Baseten CLI, or with the Truss CLI if you prefer it:
baseten model push
uvx truss push
You should see output similar to:
Pushing model "krea-2-turbo-lossy"...Uploading model...Uploaded model in 0s✨ Model krea-2-turbo-lossy was successfully pushed ✨ Model: krea-2-turbo-lossy (abc1d2ef) Deployment: xyz123 Environment: production🪵 View logs: deployment: baseten model deployment logs --model-id abc1d2ef --deployment-id xyz123 environment: baseten model environment logs --model-id abc1d2ef --environment production (once deployed) app: https://app.baseten.co/models/abc1d2ef/logs/xyz123🚀 Invoke your model: URL: https://model-abc1d2ef.api.baseten.co/deployment/xyz123/predict CLI: baseten model predict --model-id abc1d2ef
baseten model push prints your model ID (abc1d2ef in the example). The examples below use it wherever you see {model_id}, and read your API key from the BASETEN_API_KEY environment variable.
Use the /v1/images/generations endpoint to generate your model’s images.The deployment returns the generated image as base64-encoded bytes. Decode the response to write the image to disk. The size parameter sets the output resolution in pixels.
Python
OpenAI
cURL
main.py
import base64import osimport requestsresponse = requests.post( "https://model-{model_id}.api.baseten.co/environments/production/sync/v1/images/generations", headers={"Authorization": f"Bearer {os.environ['BASETEN_API_KEY']}"}, json={ "prompt": "immense rocket launch exhaust as seen from extremely close up", "size": "1024x1024", "response_format": "b64_json", },)image_b64 = response.json()["data"][0]["b64_json"]with open("output.png", "wb") as f: f.write(base64.b64decode(image_b64))
main.py
import base64import osfrom openai import OpenAIclient = OpenAI( api_key=os.environ["BASETEN_API_KEY"], base_url="https://model-{model_id}.api.baseten.co/environments/production/sync/v1",)image = client.images.generate( prompt="immense rocket launch exhaust as seen from extremely close up", size="1024x1024", response_format="b64_json",)with open("output.png", "wb") as f: f.write(base64.b64decode(image.data[0].b64_json))
curl -s https://model-{model_id}.api.baseten.co/environments/production/sync/v1/images/generations \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $BASETEN_API_KEY" \ -d '{"prompt": "immense rocket launch exhaust as seen from extremely close up", "size": "1024x1024", "response_format": "b64_json"}' \ | jq -r '.data[0].b64_json' | base64 --decode > output.png
Generated by this deployment from the rocket prompt above at 2048x2048, in 8.5 seconds on an H100
Push the config to Baseten with the Baseten CLI, or with the Truss CLI if you prefer it:
baseten model push
uvx truss push
You should see output similar to:
Pushing model "krea-2-turbo"...Uploading model...Uploaded model in 0s✨ Model krea-2-turbo was successfully pushed ✨ Model: krea-2-turbo (abc1d2ef) Deployment: xyz123 Environment: production🪵 View logs: deployment: baseten model deployment logs --model-id abc1d2ef --deployment-id xyz123 environment: baseten model environment logs --model-id abc1d2ef --environment production (once deployed) app: https://app.baseten.co/models/abc1d2ef/logs/xyz123🚀 Invoke your model: URL: https://model-abc1d2ef.api.baseten.co/deployment/xyz123/predict CLI: baseten model predict --model-id abc1d2ef
baseten model push prints your model ID (abc1d2ef in the example). The examples below use it wherever you see {model_id}, and read your API key from the BASETEN_API_KEY environment variable.
Use the /v1/images/generations endpoint to generate your model’s images.The deployment returns the generated image as base64-encoded bytes. Decode the response to write the image to disk. The size parameter sets the output resolution in pixels.
Python
OpenAI
cURL
main.py
import base64import osimport requestsresponse = requests.post( "https://model-{model_id}.api.baseten.co/environments/production/sync/v1/images/generations", headers={"Authorization": f"Bearer {os.environ['BASETEN_API_KEY']}"}, json={ "prompt": "A lighthouse on a rocky coast at golden hour, waves breaking below, warm light across the water", "size": "1024x1024", "response_format": "b64_json", },)image_b64 = response.json()["data"][0]["b64_json"]with open("output.png", "wb") as f: f.write(base64.b64decode(image_b64))
main.py
import base64import osfrom openai import OpenAIclient = OpenAI( api_key=os.environ["BASETEN_API_KEY"], base_url="https://model-{model_id}.api.baseten.co/environments/production/sync/v1",)image = client.images.generate( prompt="A lighthouse on a rocky coast at golden hour, waves breaking below, warm light across the water", size="1024x1024", response_format="b64_json",)with open("output.png", "wb") as f: f.write(base64.b64decode(image.data[0].b64_json))
curl -s https://model-{model_id}.api.baseten.co/environments/production/sync/v1/images/generations \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $BASETEN_API_KEY" \ -d '{"prompt": "A lighthouse on a rocky coast at golden hour, waves breaking below, warm light across the water", "size": "1024x1024", "response_format": "b64_json"}' \ | jq -r '.data[0].b64_json' | base64 --decode > output.png