Images
Image generation is also available as an MCP tool. By default a call uses the interactive lane pool; a request explicitly marked background (and entitled to background lanes) uses the background pool instead — see Lanes & scheduling.
Generate
Section titled “Generate”POST /v1/images/generations
curl https://gw.lunaroute.com/v1/images/generations \ -H "LUNAROUTE-API-KEY: $LUNAROUTE_API_KEY" \ -H "content-type: application/json" \ -d '{"model": "…", "prompt": "a lighthouse at dusk", "size": "1024x1024"}'Common parameters: prompt, model, size, steps, guidance,
negative_prompt, seed, and output_format. Available models and their
limits (supported sizes, steps range, formats) come from
GET /v1/images/models.
Edit and upload
Section titled “Edit and upload”POST /v1/images/edits— edit by prior image id(s) owned by your organization.POST /v1/images/uploads— upload an image URL or bytes and get an id to edit.
GET /v1/images/models— image-capable model catalog.GET /v1/images/{id}— image metadata.GET /v1/images/{id}/content—302redirect to a short-lived signed URL for the image bytes. Clients that don’t follow redirects automatically should read theLocationheader and fetch it.
Retention
Section titled “Retention”Generated images are stored temporarily and expire 7 days after creation.
While stored, GET /v1/images/{id} and GET /v1/images/{id}/content serve
them; once expired, the image is gone and the id no longer resolves. Download
anything you need to keep, or re-upload it with POST /v1/images/uploads if you
want to edit it later.
Availability
Section titled “Availability”When image generation is switched off for an operator or organization, the
routes answer 503 with a <feature>_disabled code.