Image generation

Nano Banana, GPT Image, FLUX.2, Seedream and MAI-Image from the same balance.

Steps

01
Check the model list
GET /v1/models lists chat; see /models for the image catalogue.
02
Send a prompt
POST /v1/images/generations with model and prompt.
03
Collect the URL
Ask for response_format url and download it.
bash
curl https://api.luxechain.si/v1/images/generations \
  -H "Authorization: Bearer lxc_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "flux-2-klein",
    "prompt": "a red cube on a white table, product photo",
    "resolution": "1K",
    "aspect_ratio": "1:1",
    "response_format": "url"
  }'
Image calls are charged per image, not per token. Generation is synchronous and can take up to a few minutes on the larger models, use a client timeout of at least 600 seconds.

← All guides Get tokens