Text to Video API: Complete Developer Guide

Posted on March 11, 2026
By Speeko Team
text-to-videovideo-generationapideveloper

Text to Video API: Complete Developer Guide

Video generation in 2026 has crossed the usability threshold. You submit a script; you get a publishable video.

Endpoint Overview

POST https://api.speekoapp.com/v1/video

Request Parameters

Parameter Type Required Description
text string Yes Narration script
voice string Yes Voice ID
resolution string No 720p, 1080p, 4K (default: 1080p)
aspect_ratio string No 16:9, 9:16, 1:1 (default: 16:9)
style string No stock, animated, minimal (default: stock)
background_music boolean No Auto-pick royalty-free music (default: false)
subtitles boolean No Burn in captions (default: true)
webhook_url string No Callback when video ready

Aspect Ratio by Platform

  • YouTube long-form — 16:9, 1080p or 4K
  • YouTube Shorts / TikTok / Reels — 9:16, 1080×1920
  • Instagram feed — 1:1 or 4:5
  • LinkedIn — 1:1 or 16:9

Async Processing

Video generation takes 30-120 seconds. Always use webhooks for production:

const response = await fetch('https://api.speekoapp.com/v1/video', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    text: 'Welcome to our channel. Today we talk about AI.',
    voice: 'am_michael',
    resolution: '1080p',
    aspect_ratio: '16:9',
    webhook_url: 'https://yourserver.com/video-ready'
  })
});

const { job_id } = await response.json();

Webhook Payload

{
  "job_id": "vid_abc123",
  "status": "completed",
  "video_url": "https://cdn.speekoapp.com/videos/abc123.mp4",
  "duration_seconds": 42,
  "cost_credits": 120
}

Pricing

Video is priced per second of output: $0.05/sec for 1080p. A 60-second video costs $3.

Best Practices

  • Scripts under 2 minutes — Longer videos lose viewer retention anyway
  • Natural pacing — Let the generator handle breathing room
  • Strong opening — First 3 seconds decide whether viewers stay
  • Test aspect ratios — A 16:9 source cropped to 9:16 rarely works

Build your first AI video.