Before you start
You need:- an API key with
photoshoots:generate - a product with at least one image
- enough credits for every requested output
Upload a local reference image
Quick Shoot and template requests accept image URLs. If a reference is only on your computer, upload it first:url:
url in quick_shoot.direction.image_urls or a template’s
image_urls. Upload one image per request. JPG, PNG, WebP, HEIC, and HEIF are
supported up to 10 MB. Base64 and JSON data URLs are not supported. Existing
public HTTPS image URLs can still be used directly; LocalAds copies accepted
images into its own storage.
Create a template
Create a reusable template pack from one or more HTTPS image URLs. Theproduct_id determines which brand can use the template.
201 Created and the template. LocalAds keeps a stable
copy of each supplied image, so the template does not depend on the original
URLs remaining available. Each shot keeps the same aspect ratio as its source
image. You can use its id in a template photoshoot request.
Generate from a template
1. Choose a template
List the photoshoot templates available to the product’s brand:2. Start the photoshoot
quick_shoot when you provide template_id.
Create a Quick Shoot
Quick Shoot mirrors the controls in the LocalAds workspace. You can choose a look and output count, then optionally add direction as text, images, or both.direction is optional. When included, it must contain text or at least one
image URL. You can attach up to eight HTTPS images. For third-party URLs, the
images must work without cookies or authorization headers.
count can be 1, 3, 5, 8, or 15. It defaults to 1; look
defaults to standard.
Do not include template_id when you provide quick_shoot.
The retro look
retro is a generative look. Instead of applying a fixed treatment to the
product, it reads the product first, then invents a different printed scene for
every output in the shoot: mid-century Indian print culture, souvenir and
advertising cards, halftone and faded ink.
Three things behave differently from the other looks:
- Output is a print-ready card. Every image is 1200x1800 at 300 DPI, which is 4 x 6 inches: the artwork mounted on aged paper with the card’s line set in italics underneath it. Send it to a printer as it arrives.
direction.image_urlsare ignored. The look composes each scene from the product itself.direction.textis still read and used as guidance.- The first image takes longer. The look derives a brief and renders one shared reference packshot before any output starts, which adds roughly a minute to the shoot. Later outputs arrive at the usual pace.
5 or 8 shows the range; a shoot of 1 shows one card and none
of the variety the look exists for.
Idempotency-Key
header. If a network failure makes you retry a request, reuse the same key to
avoid creating and charging for a duplicate photoshoot:
202 Accepted with the durable photoshoot resource:
The example below is a template photoshoot. Quick Shoot responses use the same
shape with template_id set to null.
Retrieve results
Poll the URL in theLocation response header:
completed, failed, or
canceled. Use backoff between requests rather than polling continuously.
caption carries the line printed in italics under the artwork. Only the
retro look writes one; every other look and every template shot returns
null.