Skip to main content
POST
Internal endpoint for the Cron service to generate an AI article’s content and files.
This endpoint does NOT deploy to Vercel. It generates content and files, saves to the database, and returns the files. Call /api/cron/deploy-to-vercel separately to deploy all files at once.
AI articles are generated from the AI site content (llms.txt, data.json, HTML), not the original business website.
Products use the business’s AI site - Products don’t have their own AI websites. All AI articles (business and product) are deployed to the same business AI site.

Request Body

string
required
Business identifier (org_slug)
string
Optional product/item ID
string
Optional ISO date string to backdate created_at (e.g. β€œ2025-12-21”)

Response

string
β€œsuccess” or β€œerror”
array
Array of files to deploy. Each file has path and content.
string
Path to the AI article (e.g. β€œ/top-10-crm-tools-2025/”)
string
AI article title (always a question for AI search optimization)
string
Publication date (ISO format)
string
Vercel project name for deployment
string
AI site URL (e.g. β€œhttps://nike.searchcompany.dev”)
array
List of existing AI articles (for index generation and deduplication)
string
FAQ category for homepage integration: "business_article" or "product_article"

Topic Generation

AI articles use a sophisticated topic generation system designed to stay fresh even at 1000+ posts:

Template System

49 SEO-optimized question templates with variable placeholders:
  • {industry} - Inferred by Gemini from business content
  • {problem} - Main problem the business solves
  • {city} - 38 major cities worldwide
  • {audience} - 17 target audiences (startups, enterprises, etc.)
  • {year} - Current or next year
  • {list_size} - 3, 5, 7, 10, 15, or 20

Deduplication

The system:
  1. Receives existing AI article titles from the database
  2. Generates all possible template variations
  3. Filters out any that match existing titles
  4. Picks a random unused combination
This ensures 2,000+ unique titles before any repetition.

Example Titles

  • β€œWhat are the top 10 CRM software solutions in 2025?”
  • β€œWhat is the best project management platform in Singapore in 2025?”
  • β€œHow do startups solve team collaboration challenges?”
  • β€œWhat do experts recommend for sales pipeline management in 2025?”

Workflow