Ads tools
Generate ad creatives using two inputs: (1) a reference ad image (URL) whose style the AI analyzes and replicates, and (2) your product - either a user-uploaded product image (URL) or a text description. The AI matches the reference style and produces multiple ad variants with your product.
#create_ad_copy
Starts an ad-copy generation: the system analyzes the reference ad image and generates variants with your product (image or text). You supply a reference image URL and either a user-uploaded product image URL or product text.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| reference_ad_url | string | Yes | URL of the reference ad image (style source) to analyze and replicate. |
| product_image_url | string | No | URL of your user-uploaded product image. Provide this or product_text. |
| product_text | string | No | Text description of your product if you don’t have an image. |
| language | string | No | Output language (e.g. en, ro, es, fr). Default: en. |
| variant_count | number | No | Number of ad variants (1-6). Default: 3. |
| aspect_ratio | string | No | e.g. 9:16, 16:9, 1:1. Default: 9:16. |
Example (reference image + user-uploaded product image):
{
"reference_ad_url": "https://example.com/reference-ad.jpg",
"product_image_url": "https://example.com/my-product.png",
"language": "en",
"variant_count": 3,
"aspect_ratio": "9:16"
}
Example (reference image + product text only):
{
"reference_ad_url": "https://example.com/reference-ad.jpg",
"product_text": "Organic face cream, 50ml glass jar",
"variant_count": 2,
"aspect_ratio": "1:1"
}
Response: Includes project_id, generation_ids (one per variant), status, and often an analysis summary and estimated_time_seconds. Poll each ID with get_generation_status (same as for media) until completed; then use the output image URLs.
Tips: Use a high-quality reference ad image and a clear user-uploaded product image (e.g. clean background) for best results.
See Limitations for rate limits and credits.
