curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/google-ads/ai/generate-copy \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '
{
"business_name": "Nordwind Furniture",
"business_description": "Handmade solid oak dining tables, built to order in San Francisco.",
"keywords": [
"oak dining table",
"handmade furniture"
],
"landing_page_url": "https://nordwind-furniture.com",
"campaign_goal": "traffic"
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/google-ads/ai/generate-copy"
payload = {
"business_name": "Nordwind Furniture",
"business_description": "Handmade solid oak dining tables, built to order in San Francisco.",
"keywords": ["oak dining table", "handmade furniture"],
"landing_page_url": "https://nordwind-furniture.com",
"campaign_goal": "traffic"
}
headers = {
"api_key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {api_key: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
business_name: 'Nordwind Furniture',
business_description: 'Handmade solid oak dining tables, built to order in San Francisco.',
keywords: ['oak dining table', 'handmade furniture'],
landing_page_url: 'https://nordwind-furniture.com',
campaign_goal: 'traffic'
})
};
fetch('https://app.base44.com/api/apps/{app_id}/google-ads/ai/generate-copy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.base44.com/api/apps/{app_id}/google-ads/ai/generate-copy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'business_name' => 'Nordwind Furniture',
'business_description' => 'Handmade solid oak dining tables, built to order in San Francisco.',
'keywords' => [
'oak dining table',
'handmade furniture'
],
'landing_page_url' => 'https://nordwind-furniture.com',
'campaign_goal' => 'traffic'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api_key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/apps/{app_id}/google-ads/ai/generate-copy"
payload := strings.NewReader("{\n \"business_name\": \"Nordwind Furniture\",\n \"business_description\": \"Handmade solid oak dining tables, built to order in San Francisco.\",\n \"keywords\": [\n \"oak dining table\",\n \"handmade furniture\"\n ],\n \"landing_page_url\": \"https://nordwind-furniture.com\",\n \"campaign_goal\": \"traffic\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api_key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.base44.com/api/apps/{app_id}/google-ads/ai/generate-copy")
.header("api_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"business_name\": \"Nordwind Furniture\",\n \"business_description\": \"Handmade solid oak dining tables, built to order in San Francisco.\",\n \"keywords\": [\n \"oak dining table\",\n \"handmade furniture\"\n ],\n \"landing_page_url\": \"https://nordwind-furniture.com\",\n \"campaign_goal\": \"traffic\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/google-ads/ai/generate-copy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api_key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"business_name\": \"Nordwind Furniture\",\n \"business_description\": \"Handmade solid oak dining tables, built to order in San Francisco.\",\n \"keywords\": [\n \"oak dining table\",\n \"handmade furniture\"\n ],\n \"landing_page_url\": \"https://nordwind-furniture.com\",\n \"campaign_goal\": \"traffic\"\n}"
response = http.request(request)
puts response.read_body{
"headlines": [
"Handmade Oak Tables",
"Free Statewide Delivery",
"Built To Order"
],
"descriptions": [
"Solid oak dining tables built to order in San Francisco. Free delivery."
],
"source": "ai",
"language": "en"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Generate Google Ads ad copy
Writes headlines and descriptions for a campaign from a business name and description.
Nothing is saved. Take the fields you want and pass them to Create campaign, or to Create campaign brief to keep them for later.
Check source before you present this as generated copy. Anything other than ai means the model did not produce copy and the response is fallback text derived from what you sent, returned under a 200. headlines and descriptions can also come back empty.
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.curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/google-ads/ai/generate-copy \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '
{
"business_name": "Nordwind Furniture",
"business_description": "Handmade solid oak dining tables, built to order in San Francisco.",
"keywords": [
"oak dining table",
"handmade furniture"
],
"landing_page_url": "https://nordwind-furniture.com",
"campaign_goal": "traffic"
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/google-ads/ai/generate-copy"
payload = {
"business_name": "Nordwind Furniture",
"business_description": "Handmade solid oak dining tables, built to order in San Francisco.",
"keywords": ["oak dining table", "handmade furniture"],
"landing_page_url": "https://nordwind-furniture.com",
"campaign_goal": "traffic"
}
headers = {
"api_key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {api_key: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
business_name: 'Nordwind Furniture',
business_description: 'Handmade solid oak dining tables, built to order in San Francisco.',
keywords: ['oak dining table', 'handmade furniture'],
landing_page_url: 'https://nordwind-furniture.com',
campaign_goal: 'traffic'
})
};
fetch('https://app.base44.com/api/apps/{app_id}/google-ads/ai/generate-copy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.base44.com/api/apps/{app_id}/google-ads/ai/generate-copy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'business_name' => 'Nordwind Furniture',
'business_description' => 'Handmade solid oak dining tables, built to order in San Francisco.',
'keywords' => [
'oak dining table',
'handmade furniture'
],
'landing_page_url' => 'https://nordwind-furniture.com',
'campaign_goal' => 'traffic'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api_key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/apps/{app_id}/google-ads/ai/generate-copy"
payload := strings.NewReader("{\n \"business_name\": \"Nordwind Furniture\",\n \"business_description\": \"Handmade solid oak dining tables, built to order in San Francisco.\",\n \"keywords\": [\n \"oak dining table\",\n \"handmade furniture\"\n ],\n \"landing_page_url\": \"https://nordwind-furniture.com\",\n \"campaign_goal\": \"traffic\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api_key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.base44.com/api/apps/{app_id}/google-ads/ai/generate-copy")
.header("api_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"business_name\": \"Nordwind Furniture\",\n \"business_description\": \"Handmade solid oak dining tables, built to order in San Francisco.\",\n \"keywords\": [\n \"oak dining table\",\n \"handmade furniture\"\n ],\n \"landing_page_url\": \"https://nordwind-furniture.com\",\n \"campaign_goal\": \"traffic\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/google-ads/ai/generate-copy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api_key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"business_name\": \"Nordwind Furniture\",\n \"business_description\": \"Handmade solid oak dining tables, built to order in San Francisco.\",\n \"keywords\": [\n \"oak dining table\",\n \"handmade furniture\"\n ],\n \"landing_page_url\": \"https://nordwind-furniture.com\",\n \"campaign_goal\": \"traffic\"\n}"
response = http.request(request)
puts response.read_body{
"headlines": [
"Handmade Oak Tables",
"Free Statewide Delivery",
"Built To Order"
],
"descriptions": [
"Solid oak dining tables built to order in San Francisco. Free delivery."
],
"source": "ai",
"language": "en"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}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
Name of the business the ads are for.
"Nordwind Furniture"
What the business sells, in a sentence or two. The more specific this is, the better the copy.
"Handmade solid oak dining tables, built to order in San Francisco."
Words the copy should lean on.
["oak dining table", "handmade furniture"]
Page the ads send people to. Used as context for the copy.
"https://nordwind-furniture.com"
What the campaign is for: traffic, leads or sales.
"traffic"
Response
Suggested headlines and descriptions.
Headlines and descriptions for a campaign's ads.
Suggested headlines, each within Google's 30-character limit.
[
"Handmade Oak Tables",
"Free Statewide Delivery",
"Built To Order"
]
Suggested description lines, each within Google's 90-character limit.
[
"Solid oak dining tables built to order in San Francisco. Free delivery."
]
ai when a language model wrote this copy. Any other value means it did not, and you are looking at fallback text built from the business details you sent.
"ai"
Two-letter code for the language the copy came back in, or null when the model did not report one. Pass it as settings.language_code on Create campaign so the campaign's language matches its copy.
"en"
Was this page helpful?