AI Analysis
Frontguard's AI analysis goes beyond "pixels differ" — it explains why a change happened, classifies it, and suggests fixes. Instead of a red-highlighted diff, you get a human-readable explanation.
Classification
regression
Unintentional visual break — something is wrong.
intentional
Deliberate design change — looks correct.
content_update
Dynamic content changed (text, images) — not a code issue.
Supported providers
OpenAI
export FRONTGUARD_OPENAI_KEY=sk-…gpt-4o — best accuracy
gpt-4o-mini — faster, lower cost
gpt-4o-mini — faster, lower cost
Anthropic
export FRONTGUARD_ANTHROPIC_KEY=sk-ant-…claude-sonnet-4 — best accuracy
claude-3-5-haiku — faster, lower cost
claude-3-5-haiku — faster, lower cost
Cost optimization
AI only runs on pages with a detected diff — the pixel fast-gate catches 90%+ as passing, so they never hit the API.
- Use a cheap model (gpt-4o-mini / haiku) for triage, full models for PR-blocking checks
- Limit AI to the primary viewport if cost is a concern
- Screenshots are downscaled to ≤800px before the API call
BYOK — bring your own key
Frontguard never stores, proxies, or logs your API keys. They're read from env vars at runtime, passed directly to provider SDKs, and redacted from all output.