Generate Google Ads assets
Writes ad copy and generates pictures for the app in one call, and returns them as previews.
Nothing reaches Google Ads here. Everything comes back as a preview you look at first, and only Accept a generated Google Ads asset puts one on a live campaign.
Which slots get filled follows channel_type. SEARCH gets HEADLINE and DESCRIPTION copy plus landscape and square pictures. DISPLAY gets the same pictures and adds LONG_HEADLINE copy. PERFORMANCE_MAX and DEMAND_GEN get that copy plus all four picture shapes, adding portrait and tall portrait. You cannot ask for individual slots on this endpoint.
The copy is written in the language of the app’s own site, not the language you ask in, and the response reports which one in language.
Pictures take longer than copy, so the response returns as soon as the copy is ready. images holds only the pictures that finished in time and background_image_count says how many more are coming. Poll List Google Ads generated assets with the returned session_id for the rest.
Rate limits are per app and split across two pools. The copy costs 2 of 20 requests a minute. The pictures cost one of 10 requests a minute for each picture shape, so a PERFORMANCE_MAX call costs 4 and a SEARCH call costs 2. The picture pool runs out first, which puts a PERFORMANCE_MAX ceiling of about two calls a minute. A leg that has nothing to do costs nothing. Each leg can also retry once, as below, and the retry costs that leg the same again.
text and images rather than assuming a 200 means both ran.Authorizations
Personal API key.
Path Parameters
ID of the app whose Google Ads creative you want to generate or read.
Body
Campaign type to generate for, which decides the slots that get filled. One of PERFORMANCE_MAX, DEMAND_GEN, SEARCH or DISPLAY.
"PERFORMANCE_MAX"
Page the pictures should be based on. Send this or freeform_prompt, not both.
"https://example.com/spring"
What the pictures should show, in your own words, up to 1500 characters. Send this or final_url, not both.
"Warm studio shots of handmade oak dining tables"
Response
The creative that was generated.
The creative one generation produced.
ID of this generation. Pass it as session_id to List Google Ads generated assets to poll for the images that are still coming.
"9c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f"
The copy that was generated. Empty when the text engine produced nothing and when a generation for this app was already running.
The pictures that finished in time to be returned inline. The rest are counted in background_image_count.
How many more pictures are still being generated for this session. The response comes back as soon as the copy is done, so poll List Google Ads generated assets with session_id for these. The field is absent when a generation for this app was already running, which is how you tell that case apart.
3
Language the copy was written in, as a lowercase two-letter code. It comes from the app's own site rather than from anything you send. The field is absent when a generation for this app was already running.
"de"