Light AIDocs Beta Open Light AI

API reference

GETRetrieve a mockup generation

GET /v1/mockup_generations/{mockup_generation_id}: The generation with each image's status.

GEThttps://api.light-ai.app/v1/mockup_generations/{mockup_generation_id}

The generation with each image's status. Succeeded images carry a signed URL (WebP, valid for one hour: read it again for a fresh one) and their mockup_id in the project's mockup history.

Scopemockups:read
CredentialAPI key: Authorization: Bearer lai_live_… (or lai_test_…). Partner keys add Light-AI-Organization.
Test modeWorks with test keys against simulated test objects.

Path parameters#

mockup_generation_idstringrequired#
The generation id (mgen_…). Id prefix mgen_.

Headers#

Light-AI-Organizationstring#
Partner keys: the connected organization to act for (org_…). Organization keys may omit it. Id prefix org_.
Light-AI-Versionstring#
Pin a dated API version (defaults to the key's version). One of: 2026-11-01.

Response 200#

The generation.

idstringrequired#
Id prefix mgen_.
objectstringrequired#
Always mockup_generation.
livemodebooleanrequired#
false for objects created with a test key.
statusstringrequired#
succeeded when at least one image succeeded (each image has its own status), failed when none did. Every failed image is refunded. One of: queued, processing, succeeded, failed.
project_idstring | nullrequired#
Id prefix prj_.
modelstringrequired#
Always light-ai-gen-3.0.
model_namestringrequired#
images_requestedintegerrequired#
1–4.
images_succeededintegerrequired#
images_failedintegerrequired#
sourceobjectrequired#
source.typestringrequired#
One of: front_view, photo_url, photo_upload.
source.front_view_idstring | null#
optionsobjectrequired#
The options the generation used (preset, bulb colors, pattern, ambiance, features, instructions).
creditsobjectrequired#
credits.per_imageintegerrequired#
Credits per image (5, as in the app).
credits.reservedintegerrequired#
Held for images still generating.
credits.chargedintegerrequired#
Spent on succeeded images.
credits.refundedintegerrequired#
Returned for failed images.
imagesobject[]required#
images[].indexintegerrequired#
1–4.
images[].statusstringrequired#
One of: queued, processing, succeeded, failed.
images[].mockup_idstring | nullrequired#
The mockup in the project's mockup history (mk_…), once succeeded. Id prefix mk_.
images[].urlstring | nullrequired#
Signed image URL (WebP), valid until expires_at. null in webhook payloads: GET the generation for a fresh URL.
images[].expires_attimestamp | nullrequired#
RFC 3339 timestamp (UTC, milliseconds).
images[].removedbooleanrequired#
true when the image was generated but has since been deleted from the project.
images[].failure_codestring | nullrequired#
generation_failed (the image could not be generated), generation_paused (too many recent failures or too much at once for this account: retry in a few minutes), generation_interrupted, generation_unavailable, queue_timeout (the image could not be started within 6 hours: request it again), source_photo_unavailable, project_deleted. A failed image is always refunded. One of: generation_failed, generation_paused, generation_interrupted, generation_unavailable, queue_timeout, source_photo_unavailable, project_deleted.
images[].sampleboolean#
Test mode: a fixed sample image, nothing was generated.
failure_codestring | nullrequired#
One of: generation_failed, generation_paused, generation_interrupted, generation_unavailable, queue_timeout, source_photo_unavailable, project_deleted.
generated_viastringrequired#
The requester label in the contractor's credit and project history: "Generated via API by <partner>" or "Generated via API key "<name>"". The organization and the partner that made the request see it; any other partner sees "Generated via API".
created_attimestamprequired#
RFC 3339 timestamp (UTC, milliseconds).
updated_attimestamprequired#
RFC 3339 timestamp (UTC, milliseconds).
completed_attimestamp | nullrequired#
RFC 3339 timestamp (UTC, milliseconds).
simulatedboolean#
Test mode only.

Errors#

StatusMeaning
400Bad request. bad_request, test_mode_mismatch, test_mode_unsupported, unsupported_api_version
401Missing or invalid credential. authentication_required, invalid_api_key, api_key_revoked, api_key_expired, api_key_suspended
403Not allowed. insufficient_scope, plan_upgrade_required, organization_paused, organization_off_season, api_disabled, api_access_not_enabled, ip_not_allowed, forbidden
404Not found (also for objects of other organizations and for organizations without an active grant).
422Validation failed. idempotency_key_reused
429Rate limited or daily cap reached. See Retry-After and the RateLimit headers. rate_limited, daily_cap_reached
500Unexpected server error. Safe to retry with exponential backoff; quote the Request-Id to support. internal_error
503Temporarily unavailable. Retry with exponential backoff. service_unavailable