Skip to main content
POST
Text-to-Image
Generate photorealistic images from text descriptions using the Krea 2 Turbo model. Krea 2 Turbo excels at creating highly detailed, realistic images with excellent prompt adherence.
Maximum dimensions are 1488×1200 or 1200×1488 (portrait/landscape). 1488×1488 is not supported.

Request

Make a POST request to the endpoint below with the required parameters.

Body

json

Body

application/json
key
string
required

Your API Key used for request authorization.

model_id
string
required

The ID of the model to be used. Use krea-2-turbo for the Krea 2 Turbo model.

prompt
string
required

A text description of what you want in the generated image.

negative_prompt
string

Items you don't want in the image.

width
integer
default:1024

The width of the image in pixels. Must be between 1024-1488 and divisible by 8. When set to 1488, height must be 1200 (1488x1488 is not supported).

Required range: 1024 <= x <= 1488
height
integer
default:1024

The height of the image in pixels. Must be between 1024-1488 and divisible by 8. When set to 1488, width must be 1200 (1488x1488 is not supported).

Required range: 1024 <= x <= 1488
samples
integer
default:1

The number of images to be returned in response. Only 1 sample is supported.

Required range: x <= 1
num_inference_steps
integer
default:30

Number of denoising steps. Higher values produce more detailed images but take longer.

Required range: 20 <= x <= 50
guidance_scale
number
default:7.5

How closely to follow the prompt. Higher values = more literal interpretation.

Required range: 1 <= x <= 20
safety_checker
enum<string>
default:yes

Enable NSFW content filter.

Available options:
yes,
no
seed
integer | null

Random seed for reproducible results. Pass null for a random number.

webhook
string<uri>

URL to receive a POST API call once image generation is complete.

track_id
string

Unique ID used in webhook response to identify the request.

Response

Text-to-image generation response

status
enum<string>

Status of the image generation.

Available options:
success
generationTime
number

Time taken to generate the image in seconds.

id
integer

Unique identifier for the image generation request.

output
string<uri>[]

Array of generated image URLs.

Array of proxy image URLs.

meta
object

Metadata about the image generation including all parameters used.

nsfw_content_detected
boolean

Indicates if NSFW content was detected in the generated image.

webhook_status
string

Status of the webhook notification.

tip
string

Additional information or tips for the user.