API Documentation
RESTful API for AI generation with automatic prompt evolution
Overview
Eevee provides a comprehensive API for AI-powered image and video generation with built-in evolution and optimization.
Base URL
https://eevee.studio/apiLocal development: http://localhost:3000/api
Response Format
All responses follow a consistent structure:
{
"success": true,
"data": { ... }
}Error responses:
{
"success": false,
"error": "Error message"
}Key Features
🧬 Evolution System
Thompson Sampling automatically optimizes prompts based on user interactions
🔍 Context-Aware
Claude Vision analyzes images to select optimal transformations
⚡ Performance
Redis caching provides 26x faster responses
📊 Analytics
Comprehensive metrics and real-time monitoring
Generation Endpoints
/api/generate/text-to-imageGenerate an image from text prompt. Uses Thompson Sampling for template evolution.
Request Body
prompttemplateIdqualityResponse
{ success: true, data: { id, url, prompt, processingTime } }Example
curl -X POST https://eevee.studio/api/generate/text-to-image \
-H "Content-Type: application/json" \
-d '{
"prompt": "majestic dragon in the sky",
"quality": "4step"
}'/api/generate/image-to-imageTransform an image using a template or custom prompt. Supports 4 modes: reimagine, stylize, enhance, remix.
Request Body
sourceImageUrlprompttemplateIdmodequalityResponse
{ success: true, data: { id, url, thumbnailUrl, prompt, processingTime, mode } }Example
curl -X POST https://eevee.studio/api/generate/image-to-image \
-H "Content-Type: application/json" \
-d '{
"sourceImageUrl": "https://...",
"mode": "stylize",
"templateId": "template-uuid"
}'/api/generate/reimagineContext-aware image transformation using Claude Vision AI to analyze and select optimal prompts.
Request Body
sourceImageUrlResponse
{ success: true, data: { id, url, prompt, context: { subject, mood, confidence }, processingTime } }Example
curl -X POST https://eevee.studio/api/generate/reimagine \
-H "Content-Type: application/json" \
-d '{ "sourceImageUrl": "https://..." }'/api/generate/text-to-videoGenerate video from text (2-step: text→image→video). Uses evolution-optimized prompts.
Request Body
prompttemplateIdpresetIdResponse
{ success: true, data: { id, videoUrl, thumbnailUrl, intermediateImageUrl, processingTime } }Example
curl -X POST https://eevee.studio/api/generate/text-to-video \
-H "Content-Type: application/json" \
-d '{
"prompt": "dancing robot in cityscape",
"presetId": "standard"
}'/api/generate/image-to-videoAdd cinematic motion to an image. Optionally transform with template first.
Request Body
sourceImageUrltemplateIdpresetIdResponse
{ success: true, data: { id, videoUrl, thumbnailUrl, intermediateImageUrl, processingTime } }Example
curl -X POST https://eevee.studio/api/generate/image-to-video \
-H "Content-Type: application/json" \
-d '{
"sourceImageUrl": "https://...",
"presetId": "cinematic"
}'Data Endpoints
/api/generationsFetch paginated generation history with filtering and search.
Query Parameters
pagelimittypemodesearchsortBysortOrderResponse
{ success: true, data: [...], pagination: { page, total, totalPages }, filters, sort }Example
curl https://eevee.studio/api/generations?page=1&type=image&limit=12/api/templatesGet all active templates with usage statistics.
Query Parameters
typecategoryResponse
{ success: true, data: [{ id, name, type, category, base_prompt, usage_count, ... }] }Example
curl https://eevee.studio/api/templates?type=styleAnalytics Endpoints
/api/evolution/statsGet evolution system statistics including top variants, fitness scores, and subject breakdowns.
Response
{ success: true, data: { summary, topVariants, bySubject } }Example
curl https://eevee.studio/api/evolution/stats/api/analytics/generationGet generation analytics for specified time range with breakdowns and trends.
Query Parameters
timeRangeResponse
{ success: true, data: { summary, breakdown, timeSeries, templateUsage } }Example
curl https://eevee.studio/api/analytics/generation?timeRange=7dSystem Endpoints
/api/healthSystem health check for all services (database, redis, storage, claude).
Response
{ status: "healthy" | "degraded" | "unhealthy", checks: [...], timestamp }Example
curl https://eevee.studio/api/health/api/admin/performancePerformance metrics including cache stats, health score, and system resources.
Response
{ success: true, data: { health, cache, redis, performance, timestamp } }Example
curl https://eevee.studio/api/admin/performanceTracking Endpoints
/api/interactions/trackTrack user interactions with generations (view, download, share, delete, rate). Updates evolution fitness.
Request Body
generationIdactionplatformratingResponse
{ success: true, data: { id } }Example
curl -X POST https://eevee.studio/api/interactions/track \
-H "Content-Type: application/json" \
-d '{
"generationId": "gen-uuid",
"action": "download"
}'Upload Endpoints
/api/upload/imageUpload source image for transformation. Returns URL and thumbnail.
Request Body
fileResponse
{ success: true, data: { imageUrl, thumbnailUrl } }Example
curl -X POST https://eevee.studio/api/upload/image \
-F "file=@image.jpg"Best Practices
Performance Tips
- •Use
quality: "4step"for faster generations (~1s vs ~2s) - •Leverage templates for consistent results and automatic optimization
- •Track interactions to improve evolution fitness and future generations
- •Use image-to-video instead of text-to-video when possible (saves one generation step)
Evolution System
- •Templates use Thompson Sampling to select the best variant automatically
- •Download/share interactions increase fitness (+0.01-0.015)
- •High-performing variants (fitness >0.75, usage >10) create mutations
- •Top variants automatically graduate to templates via admin review