API reference
GETRetrieve a mockup generation
GET /v1/mockup_generations/{mockup_generation_id}: The generation with each image's status.
GET
https://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.
| Scope | mockups:read |
|---|---|
| Credential | API key: Authorization: Bearer lai_live_… (or lai_test_…). Partner keys add Light-AI-Organization. |
| Test mode | Works with test keys against simulated test objects. |
Path parameters#
The generation id (
mgen_…). Id prefix mgen_.Headers#
Partner keys: the connected organization to act for (
org_…). Organization keys may omit it. Id prefix org_.Pin a dated API version (defaults to the key's version). One of:
2026-11-01.Response 200#
The generation.
Id prefix
mgen_.Always
mockup_generation.false for objects created with a test key.
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.Id prefix
prj_.Always
light-ai-gen-3.0.1–4.
One of:
front_view, photo_url, photo_upload.The options the generation used (preset, bulb colors, pattern, ambiance, features, instructions).
Credits per image (5, as in the app).
Held for images still generating.
Spent on succeeded images.
Returned for failed images.
1–4.
One of:
queued, processing, succeeded, failed.The mockup in the project's mockup history (
mk_…), once succeeded. Id prefix mk_.Signed image URL (WebP), valid until expires_at. null in webhook payloads: GET the generation for a fresh URL.
RFC 3339 timestamp (UTC, milliseconds).
true when the image was generated but has since been deleted from the project.
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.Test mode: a fixed sample image, nothing was generated.
One of:
generation_failed, generation_paused, generation_interrupted, generation_unavailable, queue_timeout, source_photo_unavailable, project_deleted.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".
RFC 3339 timestamp (UTC, milliseconds).
RFC 3339 timestamp (UTC, milliseconds).
RFC 3339 timestamp (UTC, milliseconds).
Test mode only.
Errors#
| Status | Meaning |
|---|---|
400 | Bad request. bad_request, test_mode_mismatch, test_mode_unsupported, unsupported_api_version |
401 | Missing or invalid credential. authentication_required, invalid_api_key, api_key_revoked, api_key_expired, api_key_suspended |
403 | Not allowed. insufficient_scope, plan_upgrade_required, organization_paused, organization_off_season, api_disabled, api_access_not_enabled, ip_not_allowed, forbidden |
404 | Not found (also for objects of other organizations and for organizations without an active grant). |
422 | Validation failed. idempotency_key_reused |
429 | Rate limited or daily cap reached. See Retry-After and the RateLimit headers. rate_limited, daily_cap_reached |
500 | Unexpected server error. Safe to retry with exponential backoff; quote the Request-Id to support. internal_error |
503 | Temporarily unavailable. Retry with exponential backoff. service_unavailable |