Enhance a Google Ads image prompt
Rewrites a short image prompt into a fuller one that produces better Performance Max creative.
Send the text someone typed as raw_prompt. Nothing is saved.
An empty or whitespace-only raw_prompt returns an empty enhanced_prompt immediately, without running a model and without spending quota. If the model fails, you get your original prompt back as enhanced_prompt, so compare it against original_prompt when you need to know whether the rewrite actually happened.
Accept-Language header. Omit the header and you get English — the app’s own language is not consulted — so send it explicitly for a non-English app.Authorizations
Personal API key.
Headers
Language to return generated text in, as a standard Accept-Language value. An unsupported language falls back to English.
Path Parameters
ID of the app you are planning a Google Ads campaign for.
Body
The image prompt to rewrite, in the caller's own words. Empty or whitespace-only returns an empty result without running a model.
"oak table photo"
Response
The rewritten prompt.
A rewritten image-generation prompt.
The rewritten prompt. Empty when you sent an empty or whitespace-only raw_prompt, in which case no model runs and no quota is spent.
"A warm, sunlit photograph of a handmade oak dining table in a bright modern kitchen, shallow depth of field, lifestyle advertising photography"
The raw_prompt you sent, echoed back unchanged.
"oak table photo"