🎥 ShortReelX v2 - API Documentation

AI-powered video processing service

POST /upload

Description: Upload a video for processing.

Headers: Content-Type: multipart/form-data

Request Body:

Response:

{
  "videoId": "UUID",
  "transcript": "Extracted text from video",
  "videoUrl": "URL to the uploaded video"
}
          

POST /generate-shorts

Description: Generate short clips from an uploaded video.

Headers: Content-Type: application/json

Request Body:

Response:

{
  "videoId": "UUID",
  "shorts": ["URL to short clip"],
  "message": "All shorts generated successfully"
}
          

POST /getexcitingthumbnails

Description: Generate engaging thumbnails from a video.

Headers: Content-Type: multipart/form-data

Request Body:

Response:

{
  "videoId": "UUID",
  "thumbnails": ["URL to thumbnail images"],
  "message": "All thumbnails generated successfully"
}
          

POST /generate-viral-reels

Description: Generate viral-optimized reels with catchy titles from an uploaded video.

Headers: Content-Type: application/json

Request Body:

Response:

{
  "videoId": "UUID",
  "reels": [
    {
      "url": "URL to reel clip",
      "title": "Catchy viral-worthy title",
      "description": "Brief description of content",
      "hashtags": ["tag1", "tag2", "tag3"],
      "viralScore": 8.5
    }
  ],
  "message": "All viral reels generated successfully",
  "aiInsights": "Brief analysis of viral potential"
}
          

POST /generate-subtitles

Description: Generate subtitle files (SRT and VTT) from a video with optional styled video.

Headers: Content-Type: multipart/form-data

Request Body:

Response:

{
  "videoId": "UUID",
  "subtitles": {
    "srt": "URL to SRT subtitle file",
    "vtt": "URL to VTT subtitle file",
    "styledVideo": "URL to video with styled subtitles (if requested)"
  },
  "message": "Subtitles generated successfully"
}
          

POST /enhanced-thumbnail

Description: Enhance and optimize an image thumbnail for better visual appeal.

Headers: Content-Type: multipart/form-data

Request Body:

Enhancements Applied:

Response:

{
  "success": true,
  "enhancedImageUrl": "URL to the enhanced thumbnail image"
}
  

Error Response:

{
  "error": "Error message",
  "details": "Additional error details if available"
}
  

POST /hashtaggenerator

Description: Generate trending hashtags based on video subtitles.

Headers: Content-Type: multipart/form-data

Request Body:

Response:

{
  "videoId": "UUID",
  "hashtags": ["#trending", "#viral", "#shorts"],
  "analysis": "AI insights on hashtag relevance",
  "message": "Hashtags generated successfully"
}
          

Error Response:

{
  "error": "No subtitle file provided",
  "suggestion": "Please upload an SRT or VTT file containing the video transcript"
}
          

GET /health

Description: Check system health and resource usage.

Headers: None required

Request Body: None

Response: HTML dashboard showing:

GET /info

Description: Get server information.

Headers: None required

Request Body: None

Response:

{
  "name": "ShortReelX v2",
  "version": "2.0.0",
  "description": "AI-powered video processing service",
  "nodeVersion": "v16.x.x",
  "platform": "linux",
  "uptime": 12345.67,
  "startTime": "2025-03-23T12:34:56.789Z"
}
          

POST /shutdown

Description: Secure endpoint to gracefully shut down the server (admin only).

Headers: x-admin-token: [admin token]

Request Body: None

Response:

{
  "message": "Server shutting down gracefully"
}