Skip to main content

Purpose

Generates a hand-sketched artistic version of a website’s favicon using OpenAI’s gpt-image-1.5 model. Used on the marketing website for visual appeal.

Architecture

Pipeline

  1. Fetch Favicon - Try HTML parsing, common paths, then Google fallback
  2. Convert to PNG - Handle ICO, SVG, JPEG, GIF formats
  3. Check Generic - Skip if Google returns generic globe icon
  4. Generate Enhanced - Send to OpenAI with style reference image
  5. Return Base64 - Return as data URL for immediate display

Internal Services

Code Location

Rate Limiting

  • 10 requests per minute per IP address

OpenAI Model

Uses gpt-image-1.5 with images.edit endpoint for style transfer.