🖼️ Image Cache Worker

This Cloudflare Worker generates and caches images using Replicate Flux models.

POST /generate

Generate and cache an image for your article system.

{
  "prompt": "A stunning landscape photo",
  "model": "flux-pro", // or "flux-kontext"
  "articleId": "article-123",
  "imageType": "featured", // or "image_1", etc.
  "width": 800,
  "height": 600
}

GET /:width x :height/:prompt

Direct image serving (for testing).

Example: /800x600/beautiful sunset landscape

GET /health

Health check endpoint.