Skip to main content
Create an ad campaign when you want LocalAds to turn one campaign direction into several distinct static ad concepts. LocalAds combines your prompt with the saved product and brand context, then generates the creatives asynchronously. Each requested creative consumes one credit.

Before you start

You need:
  • an API key with campaigns:generate
  • a product in LocalAds
  • enough credits for every requested creative

Start a campaign

prompt is required and can contain up to 2,000 characters. Describe the audience, angle, offer, visual tone, or other direction that should shape the campaign. language defaults to English. creative_count defaults to 10 and can be 3, 5, 10, 15, 20, 25, or 30. For production integrations, you can optionally include an Idempotency-Key header. Reuse the same key when retrying the same request after a network failure:
Omitting the header creates and charges for a new campaign on every request. LocalAds returns 202 Accepted and a Location header:

Retrieve the creatives

Poll the URL in the Location response header:
Completed creatives appear while the rest continue generating:
Stop polling when the campaign status is completed, failed, or canceled. Use backoff between requests rather than polling continuously. A completed campaign may contain an individually failed creative. Check failed_creative_count and the status of each creative before using the results.

Not enough credits

When the organization cannot reserve all requested creatives, LocalAds returns 422 Unprocessable Entity without creating the campaign:
Last modified on July 30, 2026