curl -X POST "https://api.submagic.co/v1/projects/magic-clips" \
-H "x-api-key: sk-your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"title": "YT magic-clips test1",
"language": "en",
"youtubeUrl": "https://www.youtube.com/watch?v=eURYVajKLVw",
"templateName": "Hormozi 2",
"webhookUrl": "https://webhook-test.com/6704c8535a2a913c3d094aba685d6a18",
"minClipLength": 15,
"maxClipLength": 60,
"faceTracking": true
}'
const createMagicClips = async () => {
const response = await fetch(
"https://api.submagic.co/v1/projects/magic-clips",
{
method: "POST",
headers: {
"x-api-key": "sk-your-api-key-here",
"Content-Type": "application/json",
},
body: JSON.stringify({
title: "YT magic-clips test1",
language: "en",
youtubeUrl: "https://www.youtube.com/watch?v=eURYVajKLVw",
templateName: "Hormozi 2",
webhookUrl: "https://webhook-test.com/6704c8535a2a913c3d094aba685d6a18",
minClipLength: 15,
maxClipLength: 60,
faceTracking: true,
}),
}
);
const project = await response.json();
console.log("Magic Clips project created:", project.id);
return project;
};
import requests
import json
def create_magic_clips():
url = 'https://api.submagic.co/v1/projects/magic-clips'
headers = {
'x-api-key': 'sk-your-api-key-here',
'Content-Type': 'application/json'
}
data = {
'title': 'YT magic-clips test1',
'language': 'en',
'youtubeUrl': 'https://www.youtube.com/watch?v=eURYVajKLVw',
'templateName': 'Hormozi 2',
'webhookUrl': 'https://webhook-test.com/6704c8535a2a913c3d094aba685d6a18',
'minClipLength': 15,
'maxClipLength': 60,
'faceTracking': True
}
response = requests.post(url, headers=headers, json=data)
project = response.json()
print(f"Magic Clips project created: {project['id']}")
return project
{
"id": "e568c322-7fa5-497a-8fb0-3ba32e9e67d2",
"title": "YT magic-clips test1",
"language": "en",
"status": "processing",
"webhookUrl": "https://webhook-test.com/6704c8535a2a913c3d094aba685d6a18",
"templateName": "Hormozi 2",
"userThemeId": "749a19fs-4b45-4b14-bd31-a3970a1a5ff2",
"createdAt": "2025-09-24T12:55:56.989Z"
}
API Reference
Create Magic Clips
Automatically generate short-form video clips from YouTube videos
POST
/
v1
/
projects
/
magic-clips
curl -X POST "https://api.submagic.co/v1/projects/magic-clips" \
-H "x-api-key: sk-your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"title": "YT magic-clips test1",
"language": "en",
"youtubeUrl": "https://www.youtube.com/watch?v=eURYVajKLVw",
"templateName": "Hormozi 2",
"webhookUrl": "https://webhook-test.com/6704c8535a2a913c3d094aba685d6a18",
"minClipLength": 15,
"maxClipLength": 60,
"faceTracking": true
}'
const createMagicClips = async () => {
const response = await fetch(
"https://api.submagic.co/v1/projects/magic-clips",
{
method: "POST",
headers: {
"x-api-key": "sk-your-api-key-here",
"Content-Type": "application/json",
},
body: JSON.stringify({
title: "YT magic-clips test1",
language: "en",
youtubeUrl: "https://www.youtube.com/watch?v=eURYVajKLVw",
templateName: "Hormozi 2",
webhookUrl: "https://webhook-test.com/6704c8535a2a913c3d094aba685d6a18",
minClipLength: 15,
maxClipLength: 60,
faceTracking: true,
}),
}
);
const project = await response.json();
console.log("Magic Clips project created:", project.id);
return project;
};
import requests
import json
def create_magic_clips():
url = 'https://api.submagic.co/v1/projects/magic-clips'
headers = {
'x-api-key': 'sk-your-api-key-here',
'Content-Type': 'application/json'
}
data = {
'title': 'YT magic-clips test1',
'language': 'en',
'youtubeUrl': 'https://www.youtube.com/watch?v=eURYVajKLVw',
'templateName': 'Hormozi 2',
'webhookUrl': 'https://webhook-test.com/6704c8535a2a913c3d094aba685d6a18',
'minClipLength': 15,
'maxClipLength': 60,
'faceTracking': True
}
response = requests.post(url, headers=headers, json=data)
project = response.json()
print(f"Magic Clips project created: {project['id']}")
return project
{
"id": "e568c322-7fa5-497a-8fb0-3ba32e9e67d2",
"title": "YT magic-clips test1",
"language": "en",
"status": "processing",
"webhookUrl": "https://webhook-test.com/6704c8535a2a913c3d094aba685d6a18",
"templateName": "Hormozi 2",
"userThemeId": "749a19fs-4b45-4b14-bd31-a3970a1a5ff2",
"createdAt": "2025-09-24T12:55:56.989Z"
}
Create Magic Clips
Generate multiple engaging short-form video clips from YouTube videos automatically. This endpoint processes YouTube videos and creates clips with automatic captions, animations, and effects optimized for social media platforms.This endpoint requires authentication and at least 8 credits on your account,
and has a rate limit of 500 requests per hour.
Magic Clips created via the API use your account’s credits, not API
credits. Each project costs 8 credits.
Authentication
Request Body
Language code for captions (2-10 characters, e.g., “en”, “es”, “fr”). Use the
languages endpoint to get available options.
Template to apply for styling. Use the templates
endpoint to get available options. Defaults to
“Sara” if not specified. Cannot be used together with
userThemeId.ID of a custom user theme to apply for styling. Must be a valid UUID of a
theme that belongs to you or your team. Cannot be used together with
templateName.Response
curl -X POST "https://api.submagic.co/v1/projects/magic-clips" \
-H "x-api-key: sk-your-api-key-here" \
-H "Content-Type: application/json" \
-d '{
"title": "YT magic-clips test1",
"language": "en",
"youtubeUrl": "https://www.youtube.com/watch?v=eURYVajKLVw",
"templateName": "Hormozi 2",
"webhookUrl": "https://webhook-test.com/6704c8535a2a913c3d094aba685d6a18",
"minClipLength": 15,
"maxClipLength": 60,
"faceTracking": true
}'
const createMagicClips = async () => {
const response = await fetch(
"https://api.submagic.co/v1/projects/magic-clips",
{
method: "POST",
headers: {
"x-api-key": "sk-your-api-key-here",
"Content-Type": "application/json",
},
body: JSON.stringify({
title: "YT magic-clips test1",
language: "en",
youtubeUrl: "https://www.youtube.com/watch?v=eURYVajKLVw",
templateName: "Hormozi 2",
webhookUrl: "https://webhook-test.com/6704c8535a2a913c3d094aba685d6a18",
minClipLength: 15,
maxClipLength: 60,
faceTracking: true,
}),
}
);
const project = await response.json();
console.log("Magic Clips project created:", project.id);
return project;
};
import requests
import json
def create_magic_clips():
url = 'https://api.submagic.co/v1/projects/magic-clips'
headers = {
'x-api-key': 'sk-your-api-key-here',
'Content-Type': 'application/json'
}
data = {
'title': 'YT magic-clips test1',
'language': 'en',
'youtubeUrl': 'https://www.youtube.com/watch?v=eURYVajKLVw',
'templateName': 'Hormozi 2',
'webhookUrl': 'https://webhook-test.com/6704c8535a2a913c3d094aba685d6a18',
'minClipLength': 15,
'maxClipLength': 60,
'faceTracking': True
}
response = requests.post(url, headers=headers, json=data)
project = response.json()
print(f"Magic Clips project created: {project['id']}")
return project
{
"id": "e568c322-7fa5-497a-8fb0-3ba32e9e67d2",
"title": "YT magic-clips test1",
"language": "en",
"status": "processing",
"webhookUrl": "https://webhook-test.com/6704c8535a2a913c3d094aba685d6a18",
"templateName": "Hormozi 2",
"userThemeId": "749a19fs-4b45-4b14-bd31-a3970a1a5ff2",
"createdAt": "2025-09-24T12:55:56.989Z"
}
Webhook Integration
When processing is complete, a webhook notification will be sent to the providedwebhookUrl (if specified). The webhook payload includes information about the main project and all generated clips.
Webhook Payload Structure
{
"projectId": "e568c322-7fa5-497a-8fb0-3ba32e9e67d2",
"status": "completed",
"title": "YT magic-clips test1",
"duration": 283,
"completedAt": "2025-09-24T12:59:24.880Z",
"magicClips": [
{
"id": "364fe092-b68d-468a-9558-bfca7c4d190e",
"title": "ProMotion Display Breakthrough",
"duration": 21.04,
"viralityScores": {
"total": 89,
"shareability": 23,
"hook_strength": 22,
"story_quality": 21,
"emotional_impact": 23
},
"status": "completed",
"previewUrl": "https://app.submagic.co/view/364fe092-b68d-468a-9558-bfca7c4d190g",
"downloadUrl": "https://app.submagic.co/api/file/download?path=3c6cd7cd-3f5e-4def-b662-69c48a7fc8ce/e568c322-7fa5-497a-8fb0-3ba32e9e67d2/364fe092-b68d-468a-9558-bfca7c4d130e-download.mp4&newFileName=ProMotion%20Display%20Breakthrough.mp4",
"directUrl": "https://dqu1p08d61fh.cloudfront.net/api/9cc52d00-43d7-442f-9a22-050312bkm24f/1ddee5b4-101f-4c1e-a74a-b6b3bcfe206c/video.mp4-download.mp4"
}
]
}
Webhook Response Fields
Array of generated clips, each containing: -
id: Unique clip identifier -
title: AI-generated clip title - duration: Clip duration in seconds -
viralityScores: Object containing virality metrics with total, shareability, hook_strength, story_quality, and emotional_impact scores -
status: Clip processing status - previewUrl: URL to preview the clip -
downloadUrl: Direct download URL for the clip - directUrl: Direct URL that
can be embedded on your website or used to play the clip directlyError Responses
{
"error": "FORBIDDEN",
"message": "Not enough credits for Magic Clips. Each project costs 8 credits. Please upgrade your plan or buy more credits."
}

