Skip to main content

Before you start

Sign in to LuluLab and get a luk- API key from My Keys. Store it on your server. All examples call https://customer.lululab.ai and send the raw key in the Authorization header. Get an API key Generation is asynchronous: POST /tasks returns a job id, then GET /tasks/{id} provides status and output. You can call POST /billing/estimates before submitting to estimate credits. Use ImageGenV2 for text-to-image or reference-image generation. prompt describes the image; referenceImages is optional. Choose a model-supported aspect ratio and resolution.

When to use it

Submit an image job when you already have a visual description. To preserve a product appearance, upload its photo first and pass the returned location as referenceImages[].url. Read the image result from the completed job output.

Main request fields

Image models and allowed values

The current creation UI offers these models. Both provide 1K, 2K, and 4K with the ratios listed below. gpt-image-2-5-sunburst · gpt-image-2-5-flare Resolutions:1K · 2K · 4K
Aspect ratios:1:1 · 16:9 · 9:16 · 4:3 · 3:4 · 3:2 · 2:3 · 5:4 · 4:5 · 2:1 · 1:2 · 21:9 · 9:21
Image generation request
This example generates an image from text. For image-to-image, follow the upload steps on the API overview and add referenceImages to input.