> ## 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. 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. A generated sample is kept for up to 12 hours per app and language, so repeat calls return the same sample without a new model run.

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.

Every call counts against a read limit of 120 requests per minute per app. A call that runs the model also takes one slot from the shared AI quota described below; a repeat call served from the 12-hour copy does not. A 429 means one of the two is spent: wait a minute and retry.

<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>



## 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:
  - PersonalAccessTokenAuth: []
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. 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. A generated sample is kept for up to 12
        hours per app and language, so repeat calls return the same sample
        without a new model run.


        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.


        Every call counts against a read limit of 120 requests per minute per
        app. A call that runs the model also takes one slot from the shared AI
        quota described below; a repeat call served from the 12-hour copy does
        not. A 429 means one of the two is spent: wait a minute and retry.


        <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>
      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:
            type: string
            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 or the app does not exist. A
            missing app and an app you cannot reach are deliberately the same
            answer. Marketing setup, campaign edits, generation and resuming
            also return `app_marketing_not_allowed` when the app's owning
            workspace has the FERPA designation. Historical reads, pausing,
            deletion and financial settlement remain available.
        '429':
          description: The app's read limit or shared AI quota is spent. Retry in a minute.
        '503':
          description: >-
            Database temporarily unavailable (`database_unavailable`): the data
            cluster did not answer in time. Retry after the `Retry-After`
            seconds.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
              examples:
                database_unavailable:
                  summary: database_unavailable
                  value:
                    error:
                      code: database_unavailable
                      message: Database temporarily unavailable, please retry
                      details: {}
      security:
        - PersonalAccessTokenAuth:
            - full_access
        - WorkspaceApiKeyAuth:
            - full_access
        - WorkspaceApiKeyBearerAuth:
            - full_access
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
        logo_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Logo Url
          description: The app's logo, when it has one.
          example: https://media.base44.com/images/public/logo.png
        image_urls:
          items:
            type: string
          type: array
          title: Image Urls
          description: >-
            Up to 5 photos for the sample ad, one per channel card: the app's
            home-page photos first, then images Base44 already generated for its
            ads. Empty when there are none.
          example:
            - https://media.base44.com/images/public/table.jpg
        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.
    StandardErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/StandardError'
          description: What went wrong.
      type: object
      required:
        - error
      title: StandardErrorEnvelope
      description: The error body returned in the standard envelope.
    StandardError:
      properties:
        code:
          type: string
          title: Code
          description: >-
            Stable machine-readable cause of the failure. Match on this, not on
            `message`.
          example: not_found
        message:
          type: string
          title: Message
          description: Human-readable explanation. It isn't a stable contract.
          example: App not found
        details:
          additionalProperties: true
          type: object
          title: Details
          description: >-
            Structured context for the failure, or an empty object when there's
            none.
          example: {}
      type: object
      required:
        - code
        - message
      title: StandardError
  securitySchemes:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: >-
        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`.
    WorkspaceApiKeyAuth:
      type: apiKey
      in: header
      name: api_key
      description: >-
        Workspace API key, sent as `api_key: <key>`. Each operation that accepts
        one lists what the key needs: a permission, `read_only` or
        `full_access`, like a personal access token, or a scope. A key without
        the scope gets 403 `workspace_api_key_scope_required`.
    WorkspaceApiKeyBearerAuth:
      type: http
      scheme: bearer
      description: >-
        Workspace API key, sent as `Authorization: Bearer <key>`. Accepted
        wherever `api_key` is, with the same permission.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.