API

Create product photos with Afterlight API

An image API for commerce platforms.

$ curl -X POST https://api.tryafterlight.com/v1/generations \
    -H "Authorization: Bearer sk_live_…" \
    -d '{
      "product_image": "https://cdn.you.com/sku-3401.jpg",
      "store_id":      "store_8f3a92"
    }'

Endpoints

The whole flow runs through three endpoints.

POST/v1/generations

Create

Submit a product and receive a job id.
POST /v1/generations
Authorization: Bearer sk_live_…

{
  "product_image": "https://cdn.you.com/sku-3401.jpg",
  "store_id":      "store_8f3a92",
  "scenes":        ["lifestyle", "studio"],
  "count":         6
}

→ 202 Accepted
{
  "id":     "gen_K2xA7p",
  "status": "queued"
}
GET/v1/generations/{id}

Status

Check where the job stands.
GET /v1/generations/gen_K2xA7p

→ 200 OK
{
  "id":          "gen_K2xA7p",
  "status":      "complete",
  "progress":    1.0,
  "asset_count": 6
}
GET/v1/generations/{id}/assets

Retrieve

Pull the finished photos at full resolution.
GET /v1/generations/gen_K2xA7p/assets

→ 200 OK
{
  "assets": [
    {
      "url":    "https://cdn.afterlight.io/a/9p…",
      "scene":  "lifestyle",
      "width":  2048,
      "height": 2048
    },
    …
  ]
}

Webhooks

We post the result to you.

When a job finishes, we send the payload to your endpoint. Every event is signed and idempotent, so you can replay it without harm.

Eventgeneration.complete

Delivered

Fires when a job finishes and its assets are ready.
POST <your_endpoint>
Content-Type: application/json
X-Afterlight-Signature: t=…,v1=…

{
  "event":        "generation.complete",
  "id":           "gen_K2xA7p",
  "asset_count":  6,
  "delivered_at": "2026-05-17T08:31:04Z"
}

Style

Each store keeps its own look.

We fit every output to the store’s existing photography — its light, its palette, its composition — across the whole catalogue.

Rollout

Built for staged rollout.

  • Private partner access
  • Async generation queue
  • Rate limits by store / partner
  • Webhook completion
  • CDN-hosted outputs
  • Batch generation support
Pilot storesBeta cohortFull commerce deployment

Talk to us.

Write in and we’ll reply within a day.

Or write to harry@tryafterlight.com