POST/api/analyze-ad

Run a GPT-4o vision analysis comparing an ad creative with its landing page.

Scope: analyze

Request Body

FieldTypeRequiredDescription
adData.imageUrlstringNo*URL of the ad image or creative
adData.platformstringYesmeta, tiktok, linkedin, google, or reddit
landingPageData.urlstringYesLanding page URL to analyze
audienceData.ageRangestringYesTarget age range (e.g. "25-34")
audienceData.genderstringYesTarget gender (all, male, female)
audienceData.interestsstringYesComma-separated interests

* Either adData.imageUrl or adData.adUrl should be provided.

Example Request

curl -X POST https://app.adalign.io/api/analyze-ad \
  -H "Authorization: Bearer adal_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "adData": {
      "imageUrl": "https://example.com/ad.png",
      "platform": "meta"
    },
    "landingPageData": {
      "url": "https://example.com/landing"
    },
    "audienceData": {
      "ageRange": "25-34",
      "gender": "all",
      "interests": "marketing, advertising"
    }
  }'

Response

{
  "overallScore": 7.2,
  "componentScores": {
    "visualMatch": 8,
    "contextualMatch": 6,
    "toneAlignment": 7
  },
  "suggestions": {
    "visual": ["Match hero image style with ad creative..."],
    "contextual": ["Include the same offer mentioned in the ad..."],
    "tone": ["Align CTA urgency with ad messaging..."]
  },
  "elementComparisons": [
    {
      "element": "Primary Headline",
      "adValue": "Get 50% Off Today",
      "landingPageValue": "Welcome to Our Store",
      "status": "mismatch",
      "severity": "HIGH",
      "recommendation": "Match the headline to the ad offer"
    }
  ],
  "strategicRecommendations": [
    {
      "priority": "HIGH",
      "recommendation": "Align CTA copy between ad and landing page",
      "expectedImpact": "15-25% improvement in conversion rate",
      "effort": "LOW"
    }
  ],
  "evaluationId": "uuid-here"
}

Error Codes

401 Invalid or missing API key

403 Key lacks analyze scope

429 Monthly evaluation limit reached