Skip to content
Eevee

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/api

Local 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

POST
/api/generate/text-to-image

Generate an image from text prompt. Uses Thompson Sampling for template evolution.

Request Body

prompt
string
Required
Text description of desired image
templateId
string (UUID)
Optional template for style/scenario
quality
4step | 8step
Generation quality (default: 4step)

Response

{ 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" }'
POST
/api/generate/image-to-image

Transform an image using a template or custom prompt. Supports 4 modes: reimagine, stylize, enhance, remix.

Request Body

sourceImageUrl
string
Required
URL of source image
prompt
string
Additional instructions
templateId
string (UUID)
Template to apply
mode
reimagine | stylize | enhance | remix
Transformation mode (default: reimagine)
quality
4step | 8step
Generation quality

Response

{ 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" }'
POST
/api/generate/reimagine

Context-aware image transformation using Claude Vision AI to analyze and select optimal prompts.

Request Body

sourceImageUrl
string
Required
URL of source image to analyze and transform

Response

{ 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://..." }'
POST
/api/generate/text-to-video

Generate video from text (2-step: text→image→video). Uses evolution-optimized prompts.

Request Body

prompt
string
Required
Text description for video
templateId
string (UUID)
Template to apply
presetId
string
Video preset (duration/fps settings)

Response

{ 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" }'
POST
/api/generate/image-to-video

Add cinematic motion to an image. Optionally transform with template first.

Request Body

sourceImageUrl
string
Required
URL of source image
templateId
string (UUID)
Optional template for transformation
presetId
string
Video preset for duration/fps

Response

{ 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

GET
/api/generations

Fetch paginated generation history with filtering and search.

Query Parameters

page
number
Page number (default: 1)
limit
number
Items per page (default: 24)
type
image | video
Filter by type
mode
string
Filter by generation mode
search
string
Search in prompts
sortBy
string
Sort column (default: created_at)
sortOrder
asc | desc
Sort order (default: desc)

Response

{ success: true, data: [...], pagination: { page, total, totalPages }, filters, sort }

Example

curl https://eevee.studio/api/generations?page=1&type=image&limit=12
GET
/api/templates

Get all active templates with usage statistics.

Query Parameters

type
style | scenario
Filter by template type
category
string
Filter by category

Response

{ success: true, data: [{ id, name, type, category, base_prompt, usage_count, ... }] }

Example

curl https://eevee.studio/api/templates?type=style

Analytics Endpoints

GET
/api/evolution/stats

Get 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
GET
/api/analytics/generation

Get generation analytics for specified time range with breakdowns and trends.

Query Parameters

timeRange
24h | 7d | 30d | 90d
Time range for analytics (default: 24h)

Response

{ success: true, data: { summary, breakdown, timeSeries, templateUsage } }

Example

curl https://eevee.studio/api/analytics/generation?timeRange=7d

System Endpoints

GET
/api/health

System health check for all services (database, redis, storage, claude).

Response

{ status: "healthy" | "degraded" | "unhealthy", checks: [...], timestamp }

Example

curl https://eevee.studio/api/health
GET
/api/admin/performance

Performance 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/performance

Tracking Endpoints

POST
/api/interactions/track

Track user interactions with generations (view, download, share, delete, rate). Updates evolution fitness.

Request Body

generationId
string (UUID)
Required
ID of generation
action
view | download | share | delete | rate
Required
Interaction type
platform
string
Platform/source of action
rating
number (1-5)
User rating (for rate action)

Response

{ 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

POST
/api/upload/image

Upload source image for transformation. Returns URL and thumbnail.

Request Body

file
File
Required
Image file (multipart/form-data)

Response

{ 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