Enhance a Google Ads image prompt
Changed on<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>
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.
<Note>This endpoint runs a language model and draws on a shared quota of 20 requests per minute per app, which every Google Ads AI endpoint debits. Enterprise workspaces get a higher quota. A 429 means the quota is spent, not that this endpoint has its own limit.</Note>
<Note>The copy is written in the language you send in the 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.</Note>
<Note>This endpoint accepts a personal API key or a workspace API key. A workspace API key acts as the workspace owner.</Note>
Request
- Base URLhttps://app.base44.com
- Auth
- HTTP bearer
- or API key in header api_key
- or HTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
ID of the app you are planning a Google Ads campaign for.
Headers
Language to return generated text in, as a standard Accept-Language value. An unsupported language falls back to English.
Request body
Example request
{
"raw_prompt": "oak table photo"
}Response
The rewritten prompt.
Example response
{
"enhanced_prompt": "A warm, sunlit photograph of a handmade oak dining table in a bright modern kitchen, shallow depth of field, lifestyle advertising photography",
"original_prompt": "oak table photo"
}Changes
- info
added the non-success response with the status
- info
- info
the endpoint scheme security
WorkspaceApiKeyAuthwas added to the API - info
the endpoint scheme security
WorkspaceApiKeyBearerAuthwas added to the API
- info