Brainrot Video Generator API

Generate viral short-form videos with Minecraft gameplay and iMessage-style chat overlays

v1.0.0 - Production Ready

Authentication

All API endpoints require authentication via API key. Include your API key in the request headers.

Option 1: X-API-Key Header

X-API-Key: your_api_key_here

Option 2: Bearer Token

Authorization: Bearer your_api_key_here
Keep your API key secure. Do not expose it in client-side code or public repositories.

Chat Type Reel

POST /api/generate-chat-type-reel

Generate a vertical video with Minecraft parkour gameplay in the background and an animated iMessage-style chat overlay with AI-generated voiceovers for each message.

Video Preview

Request Body

application/json
{
  "gameplay_video_url": "https://example.com/minecraft.mp4",
  "chat": {
    "participants": {
      "sender": {
        "id": "u1",
        "name": "Arjun",
        "gender": "male"
      },
      "receiver": {
        "id": "u2",
        "name": "Meera",
        "gender": "female"
      }
    },
    "messages": [
      {
        "from": "sender",
        "text": "Hey! How are you?"
      },
      {
        "from": "receiver",
        "text": "I'm good! What's up?"
      }
    ]
  }
}

cURL Request

bash
curl --location 'https://brainrot-video-generator-production.up.railway.app/api/generate-chat-type-reel' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: your_api_key_here' \
--data '{
  "gameplay_video_url": "https://mufoomjgeyubtozitous.supabase.co/storage/v1/object/public/gameplays/minecraft/video.mp4",
  "chat": {
    "participants": {
      "sender": {
        "id": "u1",
        "name": "Arjun",
        "gender": "male"
      },
      "receiver": {
        "id": "u2",
        "name": "Meera",
        "gender": "female"
      }
    },
    "messages": [
      {
        "from": "sender",
        "text": "Hey! Have you ever felt like some moments are meant to happen?"
      },
      {
        "from": "receiver",
        "text": "Some moments feel too perfectly timed to be random."
      },
      {
        "from": "sender",
        "text": "That is exactly what scares me a little. When things feel too aligned."
      },
      {
        "from": "receiver",
        "text": "Scares you or excites you?"
      },
      {
        "from": "sender",
        "text": "Both. Because excitement usually comes with consequences."
      },
      {
        "from": "receiver",
        "text": "Or with stories worth remembering."
      },
      {
        "from": "sender",
        "text": "You always say things that make it hard to stay logical."
      },
      {
        "from": "receiver",
        "text": "Maybe logic does not get invited to every conversation."
      },
      {
        "from": "sender",
        "text": "Then what do you invite instead?"
      },
      {
        "from": "receiver",
        "text": "Honesty. Curiosity. And moments that feel a little dangerous."
      },
      {
        "from": "sender",
        "text": "That explains why this chat feels different from the others."
      },
      {
        "from": "receiver",
        "text": "Different can be good. As long as we do not pretend it is nothing."
      },
      {
        "from": "sender",
        "text": "I was hoping you would say that."
      },
      {
        "from": "receiver",
        "text": "I figured. You paused longer than usual before typing."
      },
      {
        "from": "sender",
        "text": "So you notice things like that."
      },
      {
        "from": "receiver",
        "text": "Only when they matter."
      }
    ]
  }
}'

Response

Success (200)

{
  "success": true,
  "video_url": "https://storage.../output.mp4"
}

Error (400/500)

{
  "success": false,
  "error": "Error message here"
}