Images from a prompt.

Send a prompt to image.generate and get up to four images back, each stored as an asset in your project. It runs z-image-turbo by default, or flux-2-klein-4b, both Apache-2.0, at 1k, from $0.004 an image.

A skateboarder mid-kickflip over a concrete ledge at golden hour, low angle, motion and dust, action sports photography
A skateboarder mid-kickflip over a concrete ledge at golden hour, low angle, motion and dust, action sports photographyZ-Image Turbo · seed 11
Capability
image.generate
Models
z-image-turbo, flux-2-klein-4b
Resolution
1k
Images per request
1 to 4
Price
from 0.08 credits ($0.004) per image

One call, finished images.

POST a prompt to the image.generate capability. The response carries every output as an asset with its size and type.

Every field except the prompt has a default. Sending Prefer: wait holds the response until the job finishes, up to 60 seconds, which is usually enough for an image.

Submit and waitbash
curl -X POST https://api.windpaint.ai/v1/generation/capabilities/image.generate \  -H "Authorization: Bearer $WINDPAINT_API_KEY" \  -H "Content-Type: application/json" \  -H "Prefer: wait=30" \  -d '{    "prompt": "a ceramic teapot on a linen tablecloth, soft window light",    "resolution": "1k",    "aspect_ratio": "4:5",    "num_outputs": 2,    "output_format": "webp",    "seed": 7  }'
200, trimmedjson
{  "status": "completed",  "request_id": "0f6c1d2e-8a3b-4c5d-9e7f-1a2b3c4d5e6f",  "capability": "image.generate",  "model": "z-image-turbo",  "outputs": [    {      "id": "d77a4c1e-9b2f-4a3d-8e6f-7a8b9c0d1e2f",      "url": "https://api.windpaint.ai/v1/generation/assets/d77a.../content",      "content_type": "image/webp",      "width": 816,      "height": 1024    },    { "id": "a3c90f12-...", "content_type": "image/webp", ... }  ],  "num_outputs": 2,  "credits": { "estimate": "0.16", "actual": "0.16" }}
  • Each output id is an asset in your project, kept for your retention period.
  • url needs your API key and redirects to a short-lived download link.
  • Use content_type rather than an assumed extension when you save the file.

What you can set.

A prompt is the only required field. Everything else has a default the model fills in.

Same seed, same painting.

One prompt with four seeds gives four different pictures. Send a seed again and you get its picture back. The paint on this page is seeded too, so each picture lands the same way every time you load it.

  • A ceramic teapot shaped like a sleeping cat on a linen tablecloth, soft window light, product photography, seed 1

    "seed": 1

  • A ceramic teapot shaped like a sleeping cat on a linen tablecloth, soft window light, product photography, seed 2

    "seed": 2

  • A ceramic teapot shaped like a sleeping cat on a linen tablecloth, soft window light, product photography, seed 3

    "seed": 3

  • A ceramic teapot shaped like a sleeping cat on a linen tablecloth, soft window light, product photography, seed 4

    "seed": 4

A ceramic teapot shaped like a sleeping cat on a linen tablecloth, soft window light, product photographyZ-Image Turbo · 1024 × 1024

image.generate request fields.
FieldValuesDefaultNotes
prompt
string
none
Required. Sent to the model as written.
model
z-image-turbo, flux-2-klein-4b
z-image-turbo
Which image model runs the job.
resolution
1k
1k
Sets the long edge: 1024 px.
aspect_ratio
ten ratios, see below
1:1
Sets the short edge from the long edge.
num_outputs
1 to 4
1
Images in one job, billed per image delivered.
output_format
png, jpeg, webp
png
Re-encoded on the server. JPEG turns transparency white.
output_quality
1 to 100
90
For jpeg and webp only.
seed
integer
random
Same seed and request give the same image.
preset
slug or slug@version
none
A Windpaint prompt template with default settings.
moderation
auto, low
auto
low relaxes every category except the hard ones.
webhook_url
https URL
none
Signed POST when the job finishes.
retention_days
1 to 365
org setting
Keep these outputs for fewer days.

image.generate takes no input assets, no duration and no quality. Fields the model doesn't support are rejected with 422, not silently ignored.

Pixel sizes.

Pick the ratio for the composition instead of describing it in words. The price depends only on the tier.

One prompt in all ten ratios, drawn to scale.

A red fox trotting through a snowy birch forest at dawn, soft pink light, wildlife photography

Z-Image Turbo · seed 7 · 1k size under each frame

  1. A red fox trotting through a snowy birch forest at dawn, soft pink light, wildlife…, framed at 9:16

    9:161k 576 × 1024

  2. A red fox trotting through a snowy birch forest at dawn, soft pink light, wildlife…, framed at 2:3

    2:31k 688 × 1024

  3. A red fox trotting through a snowy birch forest at dawn, soft pink light, wildlife…, framed at 3:4

    3:41k 768 × 1024

  4. A red fox trotting through a snowy birch forest at dawn, soft pink light, wildlife…, framed at 4:5

    4:51k 816 × 1024

  5. A red fox trotting through a snowy birch forest at dawn, soft pink light, wildlife…, framed at 1:1

    1:11k 1024 × 1024

  1. A red fox trotting through a snowy birch forest at dawn, soft pink light, wildlife…, framed at 5:4

    5:41k 1024 × 816

  2. A red fox trotting through a snowy birch forest at dawn, soft pink light, wildlife…, framed at 4:3

    4:31k 1024 × 768

  3. A red fox trotting through a snowy birch forest at dawn, soft pink light, wildlife…, framed at 3:2

    3:21k 1024 × 688

  4. A red fox trotting through a snowy birch forest at dawn, soft pink light, wildlife…, framed at 16:9

    16:91k 1024 × 576

  5. A red fox trotting through a snowy birch forest at dawn, soft pink light, wildlife…, framed at 21:9

    21:91k 1024 × 432

The 1k tier fixes the long edge and the aspect ratio sets the other, rounded to the nearest multiple of 16, so a few sizes aren't the exact ratio. Crop afterwards if you need an exact size.

POST /v1/generation/estimate returns the width, height and price for any request without running it.

A house style in one field.

Presets are named, versioned prompt templates that Windpaint maintains. Add one to a request and your prompt becomes the subject.

  • A matte mint-green ceramic pour-over coffee set

    Product shot on seamlessA matte mint-green ceramic pour-over coffee setproduct-shot1:1 · seed 42

  • Two astronauts sharing a thermos on a dusty red ridge

    Cinematic stillTwo astronauts sharing a thermos on a dusty red ridgecinematic-still16:9 · seed 11

  • A tiny rooftop greenhouse cafe

    Isometric illustrationA tiny rooftop greenhouse cafeisometric-illustration1:1 · seed 11

  • A boy waiting at a rural bus stop in the rain beside a giant moss-covered stag spirit

    Anime key artA boy waiting at a rural bus stop in the rain beside a giant moss-covered stag spiritanime-key-art2:3 · seed 202

  • A ceramicist in her studio with clay on her hands

    Editorial portraitA ceramicist in her studio with clay on her handseditorial-portrait4:5 · seed 42

  • A city park on a sunny Sunday

    Flat vector illustrationA city park on a sunny Sundayflat-illustration4:3 · seed 11

  • A stack of buttermilk pancakes with berries

    Overhead food photoA stack of buttermilk pancakes with berriesfood-overhead4:5 · seed 11

Image presets. All run at 1k.

Product shot, pinned to version 1bash
curl -X POST https://api.windpaint.ai/v1/generation/capabilities/image.generate \  -H "Authorization: Bearer $WINDPAINT_API_KEY" \  -H "Content-Type: application/json" \  -d '{"prompt": "a matte black ceramic mug", "preset": "product-shot@1"}'
  • Your prompt is placed into the preset's template before it reaches the model. With product-shot, "a matte black ceramic mug" becomes a studio product photograph of the mug on a seamless light grey backdrop.
  • The preset fills only the settings you leave out. Anything you send wins.
  • Pin a version with slug@1 so a later change to the template doesn't change your results.
  • A preset doesn't change the price. You can't create your own presets.

Write it plainly.

z-image-turbo follows plain, descriptive sentences better than lists of keywords. Windpaint sends your prompt as written.

  1. Subject first

    Start with what the image is of, then the setting, then lighting, camera and style. The model pays most attention to what comes early.

  2. Be concrete

    "A woman in her sixties with short grey hair, wearing a yellow raincoat" gives the model far more than "a woman". Name materials, colors, counts and positions.

    • A woman in her sixties with short grey hair, wearing a yellow raincoat, standing on a windy pier, overcast light, 50mm photo

      A woman in her sixties with short grey hair, wearing a yellow raincoat, standing on a windy pier, overcast light, 50mm photoZ-Image Turbo · seed 11

  3. Name the medium and the light

    Say "studio product photo", "35mm film photo" or "flat vector illustration", and describe the lighting. Without a medium the model picks one.

    • A lighthouse on a rocky point at golden hour, 35mm film photo, warm side light, fine grain

      A lighthouse on a rocky point at golden hour, 35mm film photo, warm side light, fine grainZ-Image Turbo · seed 11

  4. Say what you want, not what you don't

    There's no negative prompt and no prompt rewriting. Describe the scene you want: "an empty street at dawn", not "no people".

    • An empty street at dawn in an old European town, cobblestones, soft blue light, quiet

      An empty street at dawn in an old European town, cobblestones, soft blue light, quietZ-Image Turbo · seed 11

  5. Quote any text

    Put words in quotes and say where they go: a shop sign that reads "OPEN LATE". Short text works better than long. Check the letters in the result.

    • A vintage diner at night with a red neon sign that reads "OPEN LATE", wet street reflections, 35mm photo

      A vintage diner at night with a red neon sign that reads "OPEN LATE", wet street reflections, 35mm photoZ-Image Turbo · seed 42

  6. Fix the seed while you iterate

    Keep the seed the same while you edit the wording so changes come from the prompt. Changing the aspect ratio gives a related but different image.

Example prompts from the prompting guide, with the settings to send them with.
UsePromptSettings
Product shot
A matte black ceramic coffee mug on a pale oak table, studio product photo, soft light from the left, plain light grey background, shallow depth of field
1k, 1:1
Editorial photo
A fisherman mending a green net on a wooden dock at dawn, low fog over the water, muted colors, 35mm film photo, natural light
1k, 3:2
Illustration
Flat vector illustration of a bicycle courier riding through a city at night, limited palette of navy, orange and cream, clean shapes, no outlines
1k, 4:5
Cinematic still
A paper boat floating on a rain-soaked city street at dusk, puddles reflecting warm shop lights, low camera angle, cinematic photo
1k, 16:9

More examples, and how seed, ratio and tier change a result, are in the prompting guide.

Wait, poll or get called.

Every generation is an asynchronous job. Pick whichever way of getting the result fits your code; the job is the same.

Wait

Send Prefer: wait and the submit returns 200 with the finished job, outputs included. If it takes longer than you allowed, you get the normal 202 and carry on polling.

Up to 60 seconds

Poll or stream

Every submit returns a request_id and a status_url. Poll it with backoff, or open the job's Server-Sent Events stream for queue position, progress and log lines.

GET status or /stream

Webhook

Pass webhook_url and Windpaint POSTs the job's status when it finishes, signed to the Standard Webhooks spec and retried if your endpoint doesn't answer.

Optional started event

Pay per image delivered.

Prices are per output at the tier you ask for. See pricing for credits, top-ups and storage.

Price per output. 1 credit = $0.05. Aspect ratio and output format don't change the price.
TierModelOutputCreditsUSD
1k
1024 px long edge
0.08 per image
$0.004
  • The price is per image delivered at 1k: 0.08 credits on z-image-turbo and 0.1 on flux-2-klein-4b. Four z-image-turbo images in one request hold 0.32 credits.
  • The price is fixed at submit and held against your balance. It's charged when the job completes; failed, nsfw and canceled jobs release it in full.
  • If the model returns fewer images than you asked for, the job still completes and you pay only for what was delivered.
  • Send an Idempotency-Key header so a retried submit returns the original job instead of creating and billing a second one.

Blocked content is never charged.

Every request is checked against Windpaint’s content policy.

  • Prompts are checked at submit. A blocked prompt returns 422 moderation.input_blocked, no job is created and nothing is held.
  • Image outputs are checked after the model runs. A blocked output ends the job with status nsfw, no output and no charge.
  • moderation: "low" blocks only content that very clearly falls into a category. Hard categories are blocked at every level.

Runs on z-image-turbo.

Z-Image Turbo. Fast, 8-step text to image.

Licence
Apache-2.0
Resolutions
1k
Output formats
PNG, JPEG, WEBP

It’s the default image model, so a request without model runs it. The other live image model is flux-2-klein-4b. Name the model when you need it fixed. Model details.

Same prompt, same seed, two models.

Both run on image.generate. Leave model out for z-image-turbo, or send "model": "flux-2-klein-4b".

  • Close-up portrait of an elderly fisherman with weathered skin and a grey beard, overcast light, 85mm lens

    Z-Image TurboLive

  • Close-up portrait of an elderly fisherman with weathered skin and a grey beard, overcast light, 85mm lens

    FLUX.2 [klein] 4BLive

Close-up portrait of an elderly fisherman with weathered skin and a grey beard, overcast light, 85mm lensseed 1234 · 4:5
  • A barista pouring latte art into a cup, both hands visible, cafe interior, natural light

    Z-Image TurboLive

  • A barista pouring latte art into a cup, both hands visible, cafe interior, natural light

    FLUX.2 [klein] 4BLive

A barista pouring latte art into a cup, both hands visible, cafe interior, natural lightseed 1234 · 4:5

Questions.

Which model makes the images?

z-image-turbo by default, or flux-2-klein-4b if you name it in the model field. Both are Apache-2.0 text-to-image models. Leaving model out runs z-image-turbo, and the job's status always reports which model ran.

Can I get the same image again later?

Yes, if you send a seed. The same prompt, model, resolution, aspect ratio and seed give the same image. The API doesn't report the seed it picked when you leave it out, so send one whenever you might want the image again.

Is there a negative prompt?

No. Describe what you want in the frame instead. Writing 'no people' can make people more likely, because the word is in the prompt.

Can I pass a reference image or edit an existing one?

Not today. image.generate takes a prompt only and returns 422 if you send inputs. Image editing is defined in the API schema but has no model yet, so it can't be submitted.

What do failed or blocked images cost?

Nothing. Credits are held at submit and charged only when the job completes. Failed, blocked and canceled jobs release the hold in full. If you ask for four images and fewer come back, you pay only for the ones delivered.

Should I wait for the response or poll?

Images usually finish within seconds, so sending Prefer: wait is the simplest option: the API holds the response for up to 60 seconds and returns the finished job. If it isn't done in time you get the normal 202 and can poll, stream or use a webhook.

How long are generated images kept?

For your organization's retention period, which is 7 days unless you change it. The first 7 days of storage for every asset are free. You can shorten retention per request with retention_days.

Start yours.

Request early access. We’ll email you when your account is approved, with 200 free credits to spend in the first 30 days.