Skip to main content
POST
Generate Google Ads assets

Authorizations

Authorization
string
header
required

Personal access token, sent as Authorization: Bearer <token>. Each operation lists the permission it needs: read_only or full_access. A full-access token can call every operation. A read-only token can call only the operations that list read_only; anything else returns 403 read_only_credential_route_not_allowed.

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 to generate for, which decides the slots that get filled. One of PERFORMANCE_MAX, DEMAND_GEN, SEARCH or DISPLAY.

Example:

"PERFORMANCE_MAX"

final_url
string

Page the pictures should be based on. Send this or freeform_prompt, not both.

Example:

"https://example.com/spring"

freeform_prompt
string

What the pictures should show, in your own words, up to 1500 characters. Send this or final_url, not both.

Example:

"Warm studio shots of handmade oak dining tables"

language_code
string

Two-letter code of the language to write the copy in and make the pictures for, for example de. A regional tag such as pt-BR is reduced to pt. Omit it to use the language of the app's own site. A language Google Ads doesn't support returns a 400.

Example:

"de"

session_id
string

The session_id of an earlier generation to add these previews to. List Google Ads generated assets returns the combined set for an hour. Omit it to start a new generation. Sending it always starts a new generation, even while one is running for the app, so poll List generated assets for progress rather than calling this again.

Example:

"3f9c2a7b8d1e4f6a9b0c1d2e3f4a5b6c"

Response

The creative that was generated.

The creative one generation produced.

session_id
string
required

ID of this generation. Pass it as session_id to List Google Ads generated assets to poll for the images that are still coming.

Example:

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

text
GeneratedAssetSummary · object[]
required

The copy that was generated. Empty when the text engine produced nothing and when a generation for this app was already running.

Example:
images
GeneratedAssetSummary · object[]
required

The pictures that finished in time to be returned inline. The rest are counted in background_image_count.

Example:
background_image_count
integer | null

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.

Example:

3

language
string | null

Language the copy was written in, as a lowercase two-letter code: language_code when you sent it, and otherwise the language of the app's own site. The field is absent when a generation for this app was already running and you sent no language_code.

Example:

"de"