Manual Trigger Endpoint - This endpoint is for debugging and manual intervention only. It is NOT called by the daily cron job.Prompts are normally generated:
During onboarding via /api/onboarding/generate-all
When new products are discovered via /api/cron/discover-products-from-changes
Manually regenerates the AI visibility prompts for a business or product. This endpoint scrapes the website fresh and generates new prompts using Gemini.Use cases:
Debugging prompt generation issues
Refreshing prompts after significant website content changes
Testing prompt generation for a specific entity
This endpoint requires API key authentication (X-API-Key header).
This endpoint calls the generate_prompts service which:
Scrapes the website using Firecrawl (up to 5000 pages)
Generates prompts using Gemini 3 Flash
Saves prompts to the entity_prompts_tracker table
The prompts are questions that AI platforms might use when recommending businesses. They are checked via daily sampling (10 prompts/day) against 8 AI platforms to calculate visibility scores.