Image models

Image generation

Create an image from a description, or upload one and describe the change you want.

Endpoints

/v1/images/generations · /v1/images/edits

Mode

Asynchronous job

Billed in

One image = one unit

Delivery

CDN URL

Ratios

1:1 · 3:4 · 4:3 · 9:16 · 16:9

Free tier

Daily allowance per plan

Asynchronous, not a single call

POST returns 202 with a job ID; you poll for the result. A single image takes tens of seconds to a few minutes — longer than any proxy holds a connection open, which is exactly why the API is shaped this way. See Generate images.

The workflow#

1. Submit
curl https://api.xkiro.com/v1/images/generations \
  -H "Authorization: Bearer $XKIRO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A lighthouse on wet black rocks at dawn, low mist, wide shot",
    "size": "1024x1024"
  }'
2. Poll
curl https://api.xkiro.com/v1/images/generations/f32a1796-15f4-43ba-8098-22d7dc2f66c1 \
  -H "Authorization: Bearer $XKIRO_API_KEY"

A polling loop with backoff is on Retrieve a job.

What you can do#

  • Generate from a text prompt.
  • Edit — upload an image and describe the change. See Edit images.
  • Re-frame — re-render an existing result at a different aspect ratio by passing source_job_id with a new size.

Writing prompts#

  • Name subject, setting, lighting and framing."A lighthouse" is a coin flip; "a white lighthouse on wet black rocks at dawn, low mist, wide shot" is a photograph.
  • Describe what you want, not what you do not.Negations are unreliable across image models — "no people" often produces people.
  • One change per edit. Three instructions in one prompt usually yield one good change and two approximations. Chain jobs instead.

Billing#

  • One image is one unit, whatever its size. n: 4 costs four.
  • Every plan includes a number of free images per rolling 24 hours. Past that, images are charged to your wallet — they never draw on a plan's spending window.
  • Failed and cancelled jobs are not billed and do not count against the allowance. Jobs refused on content grounds do count, because the attempt consumed upstream capacity.

In-flight limit

There is a cap on how many jobs you may have queued at once, so one account cannot occupy the whole queue. Submit the next batch as earlier jobs finish rather than firing everything at once.

Full reference: Generate images, Edit images, Retrieve a job.