📖 AI Short Stories API

Generate Story Videos with AI Power

Create complete narrative videos from a simple prompt. AI generates the script, scenes, voiceover, subtitles, and background music — all through one API call.

POST /api/v1/videos/generate
{
  "topic": "The last lighthouse keeper on a forgotten island",
  "style": "cinematic",
  "duration": "60s",
  "voice": "narrative_male",
  "music_mood": "atmospheric",
  "aspect_ratio": "9:16"
}

// Response
{
  "success": true,
  "data": {
    "task_id": "story_abc123",
    "status": "processing",
    "estimated_time": 300
  }
}

How It Works

One prompt in, complete story video out. AI handles everything.

1

Write Prompt

Describe your story topic or theme.

2

AI Scripts

AI writes the narrative and scene breakdowns.

3

Scene Gen

Each scene is generated as a video clip.

4

Voice + Music

AI adds voiceover, subtitles, and background music.

5

Download

Get the finished video ready to publish.

Code Samples

Python
import requests, time

API_KEY = "ak_your_key_here"
BASE = "https://mobileapi.aienvoy.dev/api/v1"
headers = {"X-API-Key": API_KEY}

# 1. Generate story video
resp = requests.post(f"{BASE}/videos/generate",
    headers=headers,
    json={
        "topic": "A robot discovers emotions for the first time",
        "style": "cinematic",
        "duration": "60s",
        "voice": "narrative_male",
        "aspect_ratio": "9:16"
    }
)
task_id = resp.json()["data"]["task_id"]

# 2. Poll until done
while True:
    status = requests.get(
        f"{BASE}/videos/{task_id}/status",
        headers=headers
    ).json()
    if status["data"]["status"] == "completed":
        print(status["data"]["video_url"])
        break
    time.sleep(15)
JavaScript (Node.js)
const API_KEY = "ak_your_key_here";
const BASE = "https://mobileapi.aienvoy.dev/api/v1";
const headers = {
  "X-API-Key": API_KEY,
  "Content-Type": "application/json"
};

// 1. Generate story video
const res = await fetch(`${BASE}/videos/generate`, {
  method: "POST",
  headers,
  body: JSON.stringify({
    topic: "A robot discovers emotions for the first time",
    style: "cinematic",
    duration: "60s",
    voice: "narrative_male",
    aspect_ratio: "9:16"
  })
});
const { data } = await res.json();

// 2. Poll until done
const poll = setInterval(async () => {
  const s = await fetch(
    `${BASE}/videos/${data.task_id}/status`,
    { headers }
  ).then(r => r.json());
  if (s.data.status === "completed") {
    clearInterval(poll);
    console.log(s.data.video_url);
  }
}, 15000);
cURL
# Generate story video
curl -X POST \
  https://mobileapi.aienvoy.dev/api/v1/videos/generate \
  -H "X-API-Key: ak_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "topic": "A robot discovers emotions",
    "style": "cinematic",
    "duration": "60s",
    "voice": "narrative_male",
    "aspect_ratio": "9:16"
  }'

# Check status
curl https://mobileapi.aienvoy.dev/api/v1/videos/story_abc123/status \
  -H "X-API-Key: ak_your_key_here"
PHP
$apiKey = "ak_your_key_here";
$base = "https://mobileapi.aienvoy.dev/api/v1";

$ch = curl_init("$base/videos/generate");
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "X-API-Key: $apiKey",
        "Content-Type: application/json"
    ],
    CURLOPT_POSTFIELDS => json_encode([
        "topic" => "A robot discovers emotions",
        "style" => "cinematic",
        "duration" => "60s",
        "voice" => "narrative_male",
        "aspect_ratio" => "9:16"
    ])
]);
$response = json_decode(curl_exec($ch), true);
$taskId = $response["data"]["task_id"];
curl_close($ch);

Everything Generated by AI

A single API call produces a complete, publish-ready story video.

📝

Script & Narrative

AI writes an engaging storyline with scene breakdowns and narrative flow.

🎬

Video Scenes

Each scene is generated as a cinematic video clip using AI models.

🎙️

AI Voiceover

Natural-sounding narrator voice with multiple style options.

🎵

Background Music

AI-selected background music matching the story mood and pacing.

💬

Subtitles

Animated subtitles burned into the video for accessibility and engagement.

Transitions

Smooth scene transitions for a polished, professional result.

Use Cases

📱

Social Apps

Let users generate story videos within your platform

📰

News Automation

Auto-generate video summaries from articles

📢

Marketing

Create branded story content at scale

🎮

Gaming

Generate lore videos and game trailers

Create Story Videos at Scale

Get your free API key and generate your first story video in minutes.