Generate Google Ads image assets
Generates ad pictures for the app and returns them as previews.
Nothing reaches Google Ads here. Each picture comes back with a session_asset_id you pass to Accept a generated Google Ads asset to put it on a live campaign.
Send exactly one of final_url and freeform_prompt. Sending both is rejected, and so is sending neither, which is the one place this endpoint differs from Generate Google Ads assets, where omitting both is allowed and grounds the pictures in the app’s home page.
Pictures are slower than copy, so the response returns once the first one is ready. assets holds what finished in time and background_pending with background_count say that more are coming. Poll List Google Ads generated assets with the returned session_id for the rest. assets can be empty while background_pending is true, which means the pictures are being generated but none landed in time.
in_flight set to true, that run’s session_id, and an empty assets. Poll the session_id you were given rather than retrying.Each shape in asset_field_types costs one of 10 picture requests a minute per app, and the retry below costs the whole shape count again. So four shapes cost 4 normally and 8 on a retry, which is one call a minute in the worst case rather than two, and a single shape costs 1 or 2.
Authorizations
Personal API key.
Path Parameters
ID of the app whose Google Ads creative you want to generate or read.
Body
Campaign type the pictures are for, one of PERFORMANCE_MAX, DEMAND_GEN, SEARCH or DISPLAY. It does not restrict the shapes you may ask for.
"PERFORMANCE_MAX"
Which picture shapes to generate, from MARKETING_IMAGE, SQUARE_MARKETING_IMAGE, PORTRAIT_MARKETING_IMAGE or TALL_PORTRAIT_MARKETING_IMAGE. Send between one and four entries. Each shape costs one request against the picture rate limit, so asking for fewer gets you more calls a minute. A text field type here is rejected with a 422.
One of MARKETING_IMAGE, SQUARE_MARKETING_IMAGE, PORTRAIT_MARKETING_IMAGE or TALL_PORTRAIT_MARKETING_IMAGE.
Page to base the pictures on. Send exactly one of this and freeform_prompt.
"https://example.com/spring"
What the pictures should show, in your own words, up to 1500 characters. Send exactly one of this and final_url.
"Warm studio shots of handmade oak dining tables"
Response
The pictures that were generated.
The pictures one image generation produced.
ID of this generation. Pass it as session_id to List Google Ads generated assets to collect the pictures that are still coming.
"9c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f"
The pictures that finished in time to be returned inline. Empty when nothing landed in time, when the engine produced nothing, and when a generation for this app was already running, which in_flight tells apart.
Present and true when more pictures are still being generated under this session_id, including when assets came back empty because the first one took too long. Absent on a lock-miss response.
true
How many more pictures are still being generated. Absent on a lock-miss response.
3
Present and true only when an image generation for this app was already running, in which case session_id is that run's and assets is empty. Poll the returned session_id rather than retrying. The field is absent on every other response.
true