# Analyze paid-ad creative

Generate and persist Gemini creative analysis from one stored ad’s owned media.

## Contract status

Preview contract: these routes and tools are implemented in the shared contract, but the public host, customer API access and OAuth flow have not been deployment verified.

## Endpoint: POST /v1/paid-ads/{platform}/{archiveId}/analysis

- Method: `POST`
- Path: `/v1/paid-ads/{platform}/{archiveId}/analysis`
- Authentication: Bearer API credential or OAuth access token
- Required scope: `content:write`
- MCP tool: `analyze_paid_ad_creative`

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `platform` | path | meta | tiktok | yes | Advertising platform. |
| `archiveId` | path | string, 1–255 | yes | Provider archive id. |

## Known errors

- 400 invalid_request for an invalid filter, identity or limit.
- 401 authentication_required for a missing or invalid credential.
- 402 subscription_required when access is not entitled.
- 403 authorization_required for a missing scope or unavailable preview access.
- 404 not_found when the record is outside the accessible catalogue.
- 429 rate_limited; honor Retry-After when present.
- 409 conflict when the write would duplicate an exclusive row.

## Request

The command has no request body. It accepts mirrored image or video media up to 25 MB. A concurrent generation returns 409, while a ready analysis is returned from storage.

```
curl --request POST 'https://api.peekpanda.com/v1/paid-ads/meta/111222333/analysis' \
  --header "Authorization: Bearer $PEEKPANDA_TOKEN" \
  --header 'x-genviral-tenancy: personal'
```

## Response

Returns the persisted Gemini analysis and its model/time provenance. Treat creative observations as analysis, not a performance or policy claim.

```
{
  "summary": "A concise product demonstration with a utility-first opening.",
  "visibleText": [
    "Turn saved recipes into a grocery list"
  ],
  "hookNotes": [
    "Opens with the customer outcome before showing the product."
  ],
  "timestampNotes": [
    {
      "timestampSeconds": 0,
      "note": "The app result appears immediately."
    }
  ],
  "editingPattern": "Fast product demonstration with direct onscreen text.",
  "reusablePromptIngredients": [
    "utility-first hook",
    "product demonstration"
  ],
  "model": "gemini-flash-lite-latest",
  "generatedAt": "2026-09-06T00:00:00.000Z"
}

```

## Source

Stored Meta/TikTok ad-library observations (scrapecreators or direct Meta). Not Apple. No spend field.

## Refresh

An explicit generation uses the owned mirror and persists its result. Repeating after settlement is a stored read; it does not invoke Gemini again.
