lanox-image-2 Asynchronous Image Generation & Editing API
This guide covers the asynchronous text-to-image, image editing, and task query APIs for lanox-image-2.
Basics
Endpoint overview
Base URL: https://api.lanox.ai
Authentication: Authorization: Bearer <API_KEY>
Call pattern: create a task, then poll for the result with the task ID
Model: lanox-image-2
Input images per request: exactly 1 for image editing
Output images per request: 1, in PNG format
Image specifications
Both text-to-image and image editing must set the final image size with aspect_ratio + resolution.
Supported aspect ratios
1:1
4:3
3:4
16:9
9:16
Supported resolutions
resolution accepts 1080p, 2k, and 4k, which select the long-edge tier of the final image.
1080p → 1920 px, 2k → 2560 px, 4k → 3840 px
Notes
Image edges may be cropped to fit the target aspect ratio. Describe the composition in your prompt and keep the subject inside the central safe area.
Create a text-to-image task
POST /api/v2/lanox-images/generations, Content-Type application/json; charset=utf-8
Request parameters
model (string, optional): if provided, must be lanox-image-2
prompt (string, required): description of the image content, style, and composition
aspect_ratio (string, required): final aspect ratio
resolution (string, required): final resolution
cURL example
curl -X POST "https://api.lanox.ai/api/v2/lanox-images/generations" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json; charset=utf-8" \
-d '{
"model": "lanox-image-2",
"prompt": "An orange cat sitting by a window watching the rain, centered subject, soft natural light, cinematic composition",
"aspect_ratio": "9:16",
"resolution": "4k"
}'Create an image editing task
POST /api/v2/lanox-images/edits using multipart/form-data; only one input image is accepted per request.
Form parameters
image (file, required): the image to edit, max 20 MiB per file; supports PNG, JPEG, and WebP
model (string, optional): if provided, must be lanox-image-2
prompt (string, required): the edit instruction for the image
aspect_ratio (string, required)
resolution (string, required)
cURL example
curl -X POST "https://api.lanox.ai/api/v2/lanox-images/edits" \
-H "Authorization: Bearer $API_KEY" \
-F "image=@./input.png;type=image/png" \
-F "model=lanox-image-2" \
-F "prompt=Keep the subject shape and replace the background with a neon street on a rainy night" \
-F "aspect_ratio=16:9" \
-F "resolution=2k"Query a task
GET /api/v2/lanox-images/tasks/{taskId}; text-to-image and image editing share the same query endpoint. Poll every 2–5 seconds.
Task statuses
queued — created and waiting to run (non-terminal)
processing — in progress (non-terminal)
succeeded — succeeded, image URL is available (terminal)
failed — failed, error message is available (terminal)
Related pages
Check prices before you start, or continue with another guide.
Keep reading
Model prices and billing units are listed on the model pricing page; the price gap data page compares the same model across providers.