> ## Documentation Index
> Fetch the complete documentation index at: https://docs.base44.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a Google Ads hero preview

> <Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Writes one sample search result for the app, to show someone what their ad could look like before they connect a Google Ads account.

This is illustrative copy, not a campaign, and nothing is saved. It is built from the app's own description, so it works before there is an account, a campaign, or any business details on file.

Check `source` before you present this as generated copy: `fallback` means the model did not run or came back empty and you are looking at generic text. The response is a 200 either way.

<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. Workspace API keys are not authorized for it and are rejected with a 403.</Note>



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json get /api/apps/{app_id}/google-ads/ai/hero-preview
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - ApiKeyAuth: []
paths:
  /api/apps/{app_id}/google-ads/ai/hero-preview:
    get:
      summary: Get a Google Ads hero preview
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Writes one sample search result for the app, to show someone what their
        ad could look like before they connect a Google Ads account.


        This is illustrative copy, not a campaign, and nothing is saved. It is
        built from the app's own description, so it works before there is an
        account, a campaign, or any business details on file.


        Check `source` before you present this as generated copy: `fallback`
        means the model did not run or came back empty and you are looking at
        generic text. The response is a 200 either way.


        <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. Workspace API keys are
        not authorized for it and are rejected with a 403.</Note>
      operationId: hero_preview_api_apps__app_id__google_ads_ai_hero_preview_get
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: ID of the app you are planning a Google Ads campaign for.
            title: App Id
          description: ID of the app you are planning a Google Ads campaign for.
          example: 6820f3a4e7b91d003c45a1f2
        - name: Accept-Language
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Language to return generated text in, as a standard
              `Accept-Language` value. An unsupported language falls back to
              English.
            title: Accept-Language
          description: >-
            Language to return generated text in, as a standard
            `Accept-Language` value. An unsupported language falls back to
            English.
          example: de
      responses:
        '200':
          description: A sample search result for the app.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleAdsHeroPreview'
        '401':
          description: Missing or invalid credentials.
        '403':
          description: >-
            You don't have access to this app, the app does not exist, or you
            used a workspace API key. A missing app and an app you cannot reach
            are deliberately the same answer.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: The shared AI quota for this app is spent. Retry in a minute.
components:
  schemas:
    GoogleAdsHeroPreview:
      properties:
        search_query:
          type: string
          title: Search Query
          description: A search someone might type to find this business.
          example: oak dining table san francisco
        headline:
          type: string
          title: Headline
          description: Headline of the sample ad.
          example: Handmade Oak Dining Tables
        description:
          type: string
          title: Description
          description: Body text of the sample ad.
          example: >-
            Built to order in our San Francisco workshop. Free delivery
            statewide.
        subtitle:
          type: string
          title: Subtitle
          description: The display line shown under the headline, usually the site.
          example: nordwind-furniture.com
        business_name:
          type: string
          title: Business Name
          description: The business name this preview was written for, taken from the app.
          example: Nordwind Furniture
        source:
          type: string
          title: Source
          description: >-
            `ai` when a language model wrote this preview, `fallback` when it
            did not run or returned nothing and Base44 filled in generic copy
            instead.
          example: ai
      type: object
      required:
        - search_query
        - headline
        - description
        - subtitle
        - business_name
        - source
      title: GoogleAdsHeroPreview
      description: A sample search result to show before the app has a Google Ads account.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key
      description: Personal API key.

````