Skip to main content
POST
Generate Google Ads text assets

Authorizations

api_key
string
header
required

Personal API key.

Path Parameters

app_id
string
required

ID of the app whose Google Ads creative you want to generate or read.

Body

application/json
channel_type
string
default:PERFORMANCE_MAX

Campaign type the copy is for, one of PERFORMANCE_MAX, DEMAND_GEN, SEARCH or DISPLAY.

Example:

"PERFORMANCE_MAX"

asset_field_types
string[]

Which kinds of line to write, from HEADLINE, LONG_HEADLINE or DESCRIPTION. Send between one and three entries. An image field type here is rejected with a 422.

One of HEADLINE, LONG_HEADLINE or DESCRIPTION.

Example:
final_url
string

Page to base the copy on. Unlike image generation you may send this together with freeform_prompt, and sending neither grounds the copy in the app's own home page.

Example:

"https://example.com/spring"

freeform_prompt
string

What the copy should say, in your own words, up to 1500 characters.

Example:

"Lead with free delivery across Germany"

keywords
string[]

Keywords to work into the copy. Send between 1 and 15 of them, and none of them blank. Omit the field entirely rather than sending an empty list.

Required array length: 1 - 15 elements

One keyword. It must not be blank or whitespace only.

Example:

Response

The copy that was generated.

The copy one text generation produced.

session_id
string
required

ID of this generation. Pass it as session_id to List Google Ads generated assets, or to Accept a generated Google Ads asset with one of the returned session_asset_id values.

Example:

"9c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f"

assets
GeneratedAssetSummary · object[]
required

The copy that was generated, one entry per line. Empty when the engine produced nothing and when a generation for this app was already running, which in_flight tells apart.

Example:
language
string | null

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 on a lock-miss response unless you asked for a specific campaign.

Example:

"de"

in_flight
boolean | null

Present and true only when a text 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.

Example:

true