API Documentation

Complete reference for all AI models and endpoints

Quick Start

All endpoints are available at: https://yourdomain.com

Most AI features use Google Cloud Service Account authentication (automatic).

No API keys needed for Veo 3, Gemini, and Imagen (using your CHF 796 credit).

POST/api/ai/generate-video
FREE with Google Cloud credit

Generate cinema-quality videos with Google Veo 3

Authentication: Service Account (automatic)

Request Body

{
  "prompt": "Drone shot of Swiss Alps at sunrise, dramatic lighting",
  "model": "veo-3.0-generate-001",
  "aspectRatio": "16:9",
  "resolution": "1080p"
}

Response Example

{
  "success": true,
  "videos": [
    {
      "uri": "gs://bucket/video.mp4",
      "downloadUrl": "https://storage.googleapis.com/..."
    }
  ],
  "model": "veo-3.0-generate-001",
  "cost": "FREE (using Google Cloud credit)"
}
POST/api/ai/face-swap
$0.11 per video (~77 seconds)

Swap faces in videos with AI

Authentication: Replicate API key

Request Body

{}

Response Example

{
  "success": true,
  "filename": "hero-jon.mp4",
  "path": "/videos/hero-jon.mp4",
  "size": "0.89 MB"
}
POST/api/analyze-skin
FREE with Google Cloud credit

AI skin analysis with Gemini Vision

Authentication: Service Account (automatic)

Request Body

{
  "image": "data:image/jpeg;base64,...",
  "age": 30
}

Response Example

{
  "success": true,
  "youthScore": 78,
  "biologicalAge": 25,
  "analysis": {
    "skinTexture": "Smooth with fine pores",
    "wrinkles": "Minimal - subtle lines",
    "skinTone": "Even and healthy"
  },
  "recommendations": [
    "Use vitamin C serum",
    "Add retinol at night"
  ]
}
POST/api/ai/generate-image
Imagen: FREE with credit | DALL-E: $0.04/image

Generate images with Imagen 3 or DALL-E 3

Authentication: Service Account or OpenAI API key

Request Body

{
  "prompt": "Swiss mountain landscape at sunrise, photorealistic",
  "provider": "imagen"
}

Response Example

{
  "success": true,
  "images": [
    "https://..."
  ],
  "model": "imagen-3.0-generate-001"
}
GET/api/ai/status
FREE

System status and health check

Authentication: None

Response Example

{
  "overall": "operational",
  "services": {
    "googleCloud": {
      "status": "operational"
    },
    "replicate": {
      "status": "operational"
    },
    "heygen": {
      "status": "operational"
    }
  },
  "credits": {
    "googleCloud": "CHF 796.75"
  }
}