afterglow.
Permanent lighting · Personal preview

Your home, in a new light.

Upload one photo and see your roofline with Govee-style lighting after dark. Compare the result with your original.

01Upload02Transform03Download
Connecting securely and checking your free preview allowance…

Your lighting studio

DAY + NIGHT
Illustrated nighttime example

When the sun sets, the magic begins.

Upload your home to preview a colorful nighttime glow.

Illustration · not an AI-generated preview
Try a little day-to-night magic

Your architecture comes first

Edits are instructed to retain your home’s rooflines, windows, and surroundings.

Scallops, not glowing strips

Concealed fixtures and overlapping downward wall-wash cones.

Two views. Your choice.

Compare day and night, then download your favorite—or both.

Your home, previewed in three steps.

01 · Upload a clear house photo

Keep the full roofline in frame. Avoid panoramas, heavy obstructions, screenshots, and very dark photos. One photo is processed at a time.

02 · Generate a day & night pair

Choose an optional color preset and generate. The same original and roofline plan guide both edits. Daytime wall-wash is intentionally subtler. The circular percentage is an estimate based on processing stages, not an exact measure of the AI’s internal work.

03 · Compare and download

Select your preferred look, compare with your original, or download both versions. Each browser visitor receives two requests, creating up to four images in total. Downloads do not use your allowance.

About accuracy

The model is instructed to preserve building geometry, text, vehicles, and landscaping, but exact preservation is not guaranteed. Complex rooflines may require a corrected installation guide and another edit. This interface does not claim to perform precise roofline detection itself.

Photo privacy · local testing

Your photo

The browser previews and re-encodes your photo locally to remove embedded metadata. When you click Generate, the photo is sent to Vercel AI Gateway and its model provider. Visible addresses and other details remain in the image; only upload photos you are authorized to use.

Local test session

Photos, generated images, jobs and the test allowance are held in the local server's memory and disappear when it restarts. Restarting also resets the allowance. A browser cookie identifies the local session. The test allowance is not a billing or spending limit; failed attempts and retries may still incur provider charges.

Before going live

The local test backend is not suitable for public deployment. The operator must implement and disclose the actual processor, storage, retention and deletion policy, access controls and contact details.

Integration & full build plan

0 · Local testing

A local-only test backend is included. Follow SETUP.md to add a Vercel AI Gateway key to .env.local, start the server and visit http://127.0.0.1:8000. Never put a key in this page. The local backend keeps photos, jobs and limits in memory only; restarting removes them and resets the allowance. It is not safe for public deployment.

Each day/night pair attempts two paid image edits; retries can also cost money. Image editing and output quality need verification with a real test. The sections below describe a proposed production build, not guarantees of the local test server.

Accuracy limits: this page does not detect rooflines or verify architectural preservation. Generated results must be inspected; exact geometry and lighting coverage cannot be guaranteed by a prompt alone.

1 · What this one file does

Responsive HTML, CSS, and JavaScript; no CDN, fonts, libraries, or build step. Includes validated uploads, metadata removal, original preview, palette selection, anonymous-quota display, event-driven estimated progress, job recovery, two result cards, comparison slider, and downloads. The house artwork is an illustration, not a generated sample.

Real AI and trustworthy limits require a backend. This file deliberately contains no API key, fake quota, invented AI output, or localStorage-based security. Opening it directly previews the interface; host it over HTTPS with the backend to generate.

2 · Deployment and embedding

Serve this page on the same HTTPS origin as /api/govee. Change meta[name="govee-api-base"] if the API path differs. Embed with an iframe where desired:

<iframe src="https://your-site.example/lighting/"
  title="House lighting preview"
  style="width:100%;height:1250px;border:0"
  loading="lazy"></iframe>

For unrelated embedding domains, use a same-site reverse proxy or a tested partitioned-cookie approach; third-party cookies can be blocked. Do not weaken cookie security or replace limits with local storage. Set a restrictive frame-ancestors allowlist for approved sites. For CSP, hash this file’s inline script/style or issue a nonce; allow blob: images. Avoid third-party analytics on uploads.

3 · Backend contract

All responses are JSON except downloads. Every route is scoped to the anonymous cookie owner. Require HTTPS, Cache-Control: no-store, same-origin requests, and an origin check. Session establishment uses GET; all mutations require the returned CSRF token.

GET /api/govee/session
{
  "csrfToken": "opaque-session-csrf-token",
  "quota": {
    "requestLimit": 2, "imageLimit": 4,
    "requestsUsed": 0, "requestsReserved": 0,
    "imagesUsed": 0, "imagesReserved": 0
  },
  "jobs": []
}

POST /api/govee/jobs
  Cookie: anonymous visitor session
  X-CSRF-Token: token from session
  Idempotency-Key: client-generated UUID
  multipart fields: image, palette
  palettes: rainbow | warm | christmas | ocean
  response (202): { "job": Job, "quota": Quota }

GET /api/govee/jobs/:id
  response: { "job": Job, "quota": Quota }

POST /api/govee/jobs/:id/retry
  X-CSRF-Token + Idempotency-Key
  Retry only the missing output within the original reservation.
  response (202): { "job": Job, "quota": Quota }

GET /api/govee/jobs/:id/download?variant=day|night|both
  PNG for one; ZIP for both. Attachment disposition.
  Only the cookie owner can download. No public asset bucket.

Job = {
  "id": "opaque-job-id",
  "status": "queued",
  "createdAt": "2026-10-23T12:00:00Z",
  "originalUrl": "/api/govee/assets/opaque-original-id",
  "outputs": [
    { "variant": "day", "url": "/api/govee/assets/opaque-day-id" }
  ],
  "canRetry": false
}
Statuses: queued, analyzing, generating, validating,
          completed, partial, failed
completed requires both day and night outputs.
Asset URLs must be same-origin under the API path.
Quota = quota object shown above.
Errors: { "error": { "code": "...", "message": "..." } }
429: quota/rate limit; 413: upload too large; 403: CSRF/session.
session.jobs contains all retained jobs and active reservations.

4 · Anonymous limit enforcement

  1. Create a cryptographically random opaque visitor ID in an HttpOnly; Secure; SameSite=Lax; Path=/ first-party cookie. Match its expiry to the disclosed allowance policy. Store a hashed identifier server-side.
  2. Atomically reserve one request and two image slots; reject concurrent or over-limit jobs. The browser counters are display-only. Bind idempotency keys to owner and operation with a unique database constraint. Reject reuse with a different payload.
  3. Commit the request when its first image succeeds; commit image counts individually. Keep the missing image reservation on partial completion. On complete failure release all unused reservations. Enforce at most two successful request records and four output records per visitor.
  4. Recover stale jobs using leases and reconciliation. A lost HTTP response must not trigger duplicate inference. Workers retry only missing variants; persist outputs before updating counters. Bound retries and total spend.
  5. Add layered IP/network rate limits, request-size limits, global daily spend caps, and optional risk-based anti-bot checks. Do not block whole households solely for sharing an IP.

5 · Accurate image-generation pipeline

  1. Revalidate bytes, MIME, dimensions, and upload limits on the server; decode and re-encode safely. Client validation is not a security boundary.
  2. Analyze the original with a separately evaluated vision model. Propose visible eaves, sloping gables, canopy undersides, receiving surfaces, and occlusions. Use one shared installation plan for the pair. Automatic geometry is approximate.
  3. Call /v1/images/edits twice, once per variant, always from the same original—not from the other generated output. Use explicit model: gpt-image-1.5, input_fidelity: high, quality: high, n: 1, and output_format: png. Keep OpenAI credentials in server environment secrets.
  4. Choose 1536x1024, 1024x1536, or 1024x1024; pad without stretching/cropping the building, then unpad consistently. Return the original and results with matching framing for comparison. These are not native 4K outputs.
  5. Supply a licensed lighting reference as a secondary image, if available. It guides scallop appearance only, never house geometry. No reference photo is bundled in this file.
  6. Check architecture, signage, left/right coverage, cone shape, occlusion, and exposure. Automated checks can miss errors. Flag failures and retry only the affected variant within the original job. Do not silently count rejected images as delivered.
  7. For strict geometry preservation, add a non-generative, original-photo grading and masked lighting-compositing mode. AI masks are guidance, not pixel-perfect locks. An optional roofline-correction editor is a later enhancement, not implemented in this file.

6 · Server-side prompt template

REQUESTED VARIANT: {day or night; selected by the server for this edit}.

Edit the supplied ORIGINAL customer photograph. It is the sole
authority for the building and scene. Any second image is a LIGHTING
STYLE reference only; never copy its architecture, objects, or framing.

Preserve the exact building geometry, proportions, rooflines, windows,
doors, columns, signs, building numbers, clocks, landscaping, palm trees,
flowerbeds, parking areas, vehicles, surroundings, and camera angle.
Do not redesign, repair, add, remove, move, or invent architectural
elements. Do not invent obscured roofline sections or alter text.

Use the shared installation plan to illuminate EVERY eligible visible
eave, gable underside, overhang and canopy, including left and right
sections. Do not light roof ridges, vertical corners, or window frames
unless explicitly specified in the installation plan.

Install realistic Govee Permanent Outdoor Lights Pro-style concealed
fixtures underneath the rooflines. Each fixture casts a distinct,
downward-facing curved scalloped wall-wash cone, overlapping its
neighbors. Even spacing must follow perspective and the building's
surfaces. Scallops, NOT glowing strips, hanging bulbs, isolated
spotlights, visible wiring, or exposed LED strips.

PALETTE: {server-controlled preset}. Rainbow sequence: warm white,
yellow, pink, magenta, purple, blue, cyan, turquoise, green, with
smooth transitions. Keep moderate brightness and restrained saturation.
Respect occlusions; light must not pass through trees, columns or walls.
Use soft surface illumination, gentle shadows and subtle reflections.
Do not add wet pavement, stars, decorations, unrelated lights or objects.

DAY VARIANT: preserve the original daylight atmosphere if present;
if the source is nighttime, use natural daylight without changing
geometry. Fixtures remain on, but their wall-wash is realistically
subtle under ambient daylight, not a neon nighttime glow.

NIGHT VARIANT: use a natural deep-blue nighttime sky and balanced
exposure. Keep architectural details visible. Lighting should look
like a professional nighttime architectural photograph of the SAME
building. No excessive neon glow, oversaturation, harsh halos,
unrealistic shine, added text, or watermarks.

Apply ONLY the requested variant's atmosphere instruction.

7 · Progress, resilience, privacy

The browser measures upload progress (0–10%). Server status advances the estimated ring: queued 12%, analyzing 20%, generating 35% (65% when one output exists), validating 90%, pair complete 100%. There is no timer that fabricates completion. Elapsed time is real. Polling reconnects through the anonymous session; changing tabs or refreshing must not consume a request. Provide a real deletion/expiry task, authenticated asset proxy, bounded ZIP downloads, monitoring, and a published retention policy.

8 · Acceptance checks before launch

References: OpenAI image-generation guide · GPT Image 1.5. This requested model is a previous-generation model; benchmark alternatives before claiming best-in-market quality.