Description
URL-to-Image Generator
Turn any website into a beautiful image using Firecrawl and cutting-edge AI.
Technologies
- Firecrawl: Website content extraction
- Google Gemini-2.5-Flash-Preview (Released May 20, 2024): AI prompt generation
- Google Imagen 4 (Released May 20, 2024): Latest image generation model via Fal.ai
Setup
Required API Keys
Service | Purpose | Get Key |
---|---|---|
Firecrawl | Website content extraction | firecrawl.dev/app/api-keys |
Google Gemini | Prompt generation with Gemini-2.5-Flash | aistudio.google.com/apikey |
Fal.ai | Access to Googleβs Imagen 4 | fal.ai/dashboard/keys |
Upstash Redis | Rate limiting (production only) | upstash.com |
Quick Start
- Clone this repository
- Create a
.env.local
file with your API keys:FIRECRAWL_API_KEY=your_firecrawl_key GEMINI_API_KEY=your_gemini_key FAL_KEY=your_fal_key # For production - enables rate limiting (50 req/IP/day per endpoint) UPSTASH_REDIS_REST_URL=your_upstash_url UPSTASH_REDIS_REST_TOKEN=your_upstash_token
- Install dependencies:
npm install
oryarn install
- Run the development server:
npm run dev
oryarn dev
Security Features
- Rate Limiting: All API endpoints are limited to 50 requests per IP address per day to prevent abuse
- Per-endpoint Limits: Each endpoint (imagen 4, gemini, scrape) has its own separate rate limit counter
How It Works
- Enter a website URL β Extract content with Firecrawl β Generate prompt with Gemini-2.5-Flash β Select style β Create image with Imagen 4 β Download
License
MIT License
Related Templates
Explore more templates similar to this one
Top Italian Restaurants in SF
Search for websites that contain the top italian restaurants in SF. With page content
Quotes.toscrape.com Scrape
Zed.dev Crawl
The first step of many to create an LLM-friendly document for Zed's configuration.
Developers.campsite.com Crawl
o3 mini Company Researcher
This Python script integrates SerpAPI, OpenAI's O3 Mini model, and Firecrawl to create a comprehensive company research tool. The workflow begins by using SerpAPI to search for company information, then leverages the O3 Mini model to intelligently select the most relevant URLs from search results, and finally employs Firecrawl's extraction API to pull detailed information from those sources. The code includes robust error handling, polling mechanisms for extraction results, and clear formatting of the output, making it an efficient tool for gathering structured company information based on specific user objectives.