What you supply
source_url and image_urls are alternatives. Send one or the other, not both.
You need an API key with products:create and photoshoots:generate, and
enough credits for every requested image.
1. Create the product
From a product page URL:202 Accepted with status: "processing". LocalAds is fetching the
page or the images. Retrieve the product until its status is ready:
ready
before the next step. A product only needs creating once. Reuse its id for
every later shoot.
If your image is only on disk, upload it first with
POST /uploads/images and use the returned url.
2. Start the Quick Shoot
202 Accepted with one outputs entry per requested image, all
queued, and a Location header pointing at the photoshoot.
Reusing an Idempotency-Key after a network failure returns the original
photoshoot instead of starting and charging for a second one.
Looks
look defaults to standard and count defaults to 1.
Optional direction
Adddirection to steer the shoot with text, reference images, or both:
direction is present it must carry text or at least one image URL. Up to
eight HTTPS images. Third-party URLs must load without cookies or authorization
headers.
The retro look
retro is a generative look. The other looks apply a fixed treatment to the
product. retro reads the product first, then invents a different printed scene
for every image in the shoot, in the register of mid-century Indian print
culture: souvenir and advertising cards, halftone screens, faded ink, paper
grain.
Three things behave differently:
- Output is a print-ready 4 x 6 card. Every image is 1200x1800 at 300 DPI: the artwork mounted on aged paper, the card’s line set in italics beneath it, and the localads mark in the corner. It prints as it arrives, no layout step on your side.
direction.image_urlsare ignored. Each scene is composed from the product itself.direction.textis still read and used as guidance.- The first image takes about a minute longer. The look derives a brief from the product and renders one shared reference packshot before any output starts. Every image in the shoot uses that same packshot, which is what keeps the set reading as one product. Later images arrive at the usual pace.
5 or 8 shows the range. A shoot of 1 returns one
card and none of the variety the look exists for.
3. Poll for the images
status is completed, failed, or canceled. Use backoff
between requests rather than polling continuously. Individual outputs can fail
while the rest of the shoot succeeds, so check each output’s own status.
caption is the line printed in italics under the artwork. It is part of the
card, so take it with the image. The retro look writes a different one for
every output, tied to what that specific card shows. Every other look returns
null.
Every completed image for a product stays retrievable without tracking
individual photoshoot IDs:
Errors worth handling
Full error format is in Errors.