← All examples

Image Generation

Submit a room photo and the products to place in it, watch the job's status live, and render the generated scene — all through dwm.images.generate()'s job handle. No polling, no endpoints.

Mock mode is on. Requests are answered by an in-browser mock — no API key needed. Drop ?mock=1 from the URL to use the live service.

1Connect

There is no separate authenticate step — createDesignWithMe() signs in on its first real call below.

Settings persist across every example page for this browser tab. Change them, then reload the page to build a new client.

2Submit a generation job

The room photo, the products to composite (one entry per unit), and optional styling instructions.

3Job status & result

job.on('progress', ...) narrates the status as it advances; await job.result() resolves with the generated images once the job completes.

Activity feed

One subscription, dwm.on('activity', ...), sees every event this client emits — the same feed powers dwm.activity.log.