Prerequisites
- A LocalAds workspace on the Pro or Enterprise plan.
- An API key with Generate access, created by a workspace owner or admin under Settings > API keys. See Authentication.
curlandjqin your shell.
1. Configure the key
Store the key in an environment variable. The full key is shown only once, when it is created.GET /account is free:
2. Pick or create a brand
List the brands available to your organization and copy the brandid:
409:
3. Create a product
The simplest product is a product page URL. LocalAds reads the page for the name, description and images. Have the images yourself instead? Sendimage_urls, or upload local files first with
Image uploads.
202 Accepted. Poll the product until its status is
ready. Your product’s audiences are generated at the same time and saved
automatically; audiences.generation_status goes generating to ready too:
GET /products/{product_id}/audiences; see
Audiences.
4. Start a Quick Shoot
A Quick Shoot takes the product, a look and a count, and returns that many finished photos. This one asks for one standard photo, andmax_credits caps
what it can spend at one credit:
standard. See Quick Shoot
for the other looks and counts.
The response is 202 Accepted, with the photoshoot’s id and one outputs
entry per requested photo, all queued:
5. Get the photos
Poll the photoshoot every few seconds until itsstatus is completed, then
print the image URLs with jq. Keep a few seconds between polls; see
Polling for a backoff strategy.
Next steps
Make the app’s other creatives for the same product:Ad campaigns
Static ad creatives from a recipe, several ad types, or a brief.
Listing images
Amazon listing images, one rendered idea per image slot.
Photoshoots
More photos: other looks, templates, or moodboards.
ChatGPT ads
Chat-card ads with a shared landing page, price and targeting.
Videos
Videos from any recipe (UGC voiceover, Pixar style, podcast, song…), or animate a finished photo.