🚀 IC Generate API
Combined Featherless proxy + UI question/solution generator with full thinking capture.
✨ Now with randomized prompt engine (high temperature, 200+ topics, 8 templates)!
Admin Authentication:
All management routes require the X-Admin-Key header.
Set the ADMIN_API_KEY environment variable in Hugging Face Spaces Secrets.
Endpoints (Public):
- POST /v1/{path} — Proxy to Featherless API (key rotation)
Endpoints (Admin-Protected):
Generation
- POST /generate — Start generation run (background)
- GET /generate/status — Check if generation is running
- POST /resume — Resume pending jobs
Data & Stats
- GET /stats — Database statistics (includes engine stats)
- GET /questions — List questions (paginated)
- GET /question/{id} — Get question with solutions
- GET /export/json — Export all data as JSON
- GET /export/files — Export to /data/exported_code/
- GET /pending — List pending jobs
- DELETE /question/{id} — Delete a question
- GET /health — Health check
API Keys
- POST /keys/add — Add a new Featherless API key
- GET /keys/list — List active Featherless API keys
- DELETE /keys/{key} — Delete a Featherless API key
- POST /keys/reload — Reload keys from file
✨ Prompt Engine Management
- GET /prompts/stats — Engine statistics (generations, unique combos, template usage)
- GET /prompts/preview — Preview a randomly generated prompt (no API call)
- GET /prompts/templates — List all prompt templates
- POST /prompts/templates — Add a custom template
- DELETE /prompts/templates/{id} — Remove a custom template
- GET /prompts/topics — List all topics
- POST /prompts/topics — Add a custom topic
- DELETE /prompts/topics/{topic} — Remove a custom topic
- GET /prompts/system-messages — List all system messages
- POST /prompts/system-messages — Add a custom system message
- DELETE /prompts/system-messages/{index} — Remove a custom system message
- POST /prompts/temperature — Set temperature range
- POST /prompts/max-tokens — Set max tokens
- POST /prompts/reset — Reset engine deduplication state