Skip to main content
POST
/
v1
/
project
/
create
curl -X POST "https://api.slidevid.ai/v1/project/create" \
  -H "x-api-key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "class",
    "name": "Product Tutorial",
    "script": "Hello! Welcome to this tutorial on our amazing product. Today I will show you how to get started...",
    "avatarId": "avatar_sarah_01",
    "voiceId": "tzX5paJ07p5hyWFcU3uG",
    "aspectRatio": "ratio_9_16",
    "music": "1",
    "captions": true,
    "webhook": "https://yoursite.com/webhook"
  }'
{
  "success": true,
  "message": "Project created successfully",
  "data": {
    "projectId": "proj_abc123xyz",
    "status": "processing",
  }
}

Overview

Create AI-generated videos from scratch by providing all the necessary parameters (script, avatar, voice, etc.).
To create videos from templates, use Generate Video from Template

Request Body

type
string
required
Video type: class, ugc_ads, ugc_video, ai_short, hook_demo, or tiktok_slideshow
script
string
required
The text script for the video (10-5000 characters)
avatarId
string
Avatar ID from /api/v1/avatar/list (required for most video types)
voiceId
string
required
Voice ID from /api/v1/voice/list for text-to-speech
name
string
Video name (optional, auto-generated if not provided)
aspectRatio
string
default:"ratio_9_16"
Video format: ratio_9_16 (vertical), ratio_16_9 (horizontal), or ratio_1_1 (square)
music
string
Music track ID from /api/v1/music/list
captions
boolean
default:"true"
Enable auto-generated captions
webhook
string
URL to receive completion notification (highly recommended)

Examples

curl -X POST "https://api.slidevid.ai/v1/project/create" \
  -H "x-api-key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "class",
    "name": "Product Tutorial",
    "script": "Hello! Welcome to this tutorial on our amazing product. Today I will show you how to get started...",
    "avatarId": "avatar_sarah_01",
    "voiceId": "tzX5paJ07p5hyWFcU3uG",
    "aspectRatio": "ratio_9_16",
    "music": "1",
    "captions": true,
    "webhook": "https://yoursite.com/webhook"
  }'
{
  "success": true,
  "message": "Project created successfully",
  "data": {
    "projectId": "proj_abc123xyz",
    "status": "processing",
  }
}

Webhook Notification

When your video is ready, we’ll POST to your webhook URL:
Webhook Payload
{
  "event": "project.completed",
  "projectId": "proj_abc123xyz",
  "status": "completed",
  "video": {
    "id": "video_xyz789",
    "url": "https://cdn.tryslidevid.ai/videos/xyz789.mp4",
    "duration": 45,
    "thumbnail": "https://cdn.tryslidevid.ai/thumbnails/xyz789.jpg",
    "aspectRatio": "9:16"
  },
  "createdAt": "2024-01-15T10:30:00Z",
  "completedAt": "2024-01-15T10:33:00Z"
}
Your webhook endpoint must return a 200 status code. We’ll retry up to 3 times if the request fails.

Video Type Requirements

Educational or tutorial-style videos with avatar presentation.Required: type, script, avatarId, voiceIdOptional: name, music, captions, aspectRatio, webhook
User-generated content style advertising videos.Required: type, script, avatarId, voiceIdOptional: name, hook, music, captions, aspectRatio, webhook
Short-form AI videos without avatars.Required: type, script, voiceIdOptional: name, music, captions, aspectRatio, webhook
AI Shorts don’t require an avatar - they use AI-generated visuals

Best Practices

Use Webhooks

Always use webhooks instead of polling. Video generation takes 2-5 minutes.

Script Length

Keep scripts between 50-500 words for optimal results.

Test First

Test with short scripts before scaling to production.

Templates for Scale

Use templates for bulk personalized video generation.
Don’t wait synchronously! Video generation is async. Always use webhooks or poll the status endpoint.

Next Steps

Authorizations

x-api-key
string
header
required

Body

application/json
type
enum<string>
default:class
required

Video type

Available options:
class
templateId
string
required

Template ID (for template-based videos)

scenes
object[]
required

Array of scenes with script and variables (for template-based videos)

aspectRatio
enum<string>
default:ratio_16_9
required

Video aspect ratio

Available options:
ratio_9_16,
ratio_16_9,
ratio_1_1
caption
boolean
default:false
required

Enable/disable captions

language
enum<string>
default:en
required

Language for the video

Available options:
en,
es
title
string

Video title/name

webhook
string

Webhook URL for completion notification

Response

200

Success