Documentation
Video Endpoints
Create a Video
https://api.soundmadeseen.com/public/v1/video/generate/
This endpoint allows for the generation of videos, utilising a clip, and a static design.
The body of the request must contain the following fields:
- clip - the clip that will provide the audio for the generated video.
- design - the static design which will provide the general look of the video.
- name - the name of the video
The body may also contain the following optional field:
- template_variables - this is a JSON array of dict objects with name and value parameters that can be used to populate template variables with a matching name in a design. The field should have a format similar to the following:
[
{"name": "first_name", "value": "Rane" },
{"name": "business_name", "value": "SoundMadeSeen Industries"},
{"name": "heading_text", "value": "The Greatest Video ever"}
]
Responses
A successful response will return an HTTP response with status code 201 and will contain content similar to the following:
{
"success": true,
"video_key": "MXapJbuWejpMdZg3ZGQv2R"
}
The value of video_key can then be used to check the status of the video using the Check Video Status endpoint documented later on this page.
If a clip or design can not be found, a response with HTTP status code 404 will be returned with content similar to the following:
{
"success": false,
"error": "Custom design not found"
}
Other errors will be returned with an HTTP status code in the 400 range, and a response similar to the following:
{
"success": false,
"error": "Name is required"
}
Read on for some simple code examples:
Exemples de code
import requests
# Replace these with your actual values
API_KEY = "MY_API_KEY"
URL = "https://api.soundmadeseen.com/public/v1/video/generate/"
# Form data
data = {
"name": "API created video",
"clip": "k9PAd4Bq9KL8jz92gPG2ET",
"design": "YVXKxzPE9W39DcLgiNkaLA",
"template_variables": '[{"name": "first_name", "value": "Rane"}, {"name": "business_name", "value": "SoundMadeSeen Industries"}, {"name": "heading_text", "value": "The Greatest Video ever"}]'
}
# Headers
headers = {
"Authorization": f"Api-Key {API_KEY}"
}
# Make the POST request
response = requests.post(URL, data=data, headers=headers)
# Handle the response
if response.status_code == 200:
data = response.json()
if data.get("success"):
print("Video generation initiated successfully!")
print(f"Video Key: {data['video_key']}")
else:
print("Video generation failed. Response:", data)
else:
print("Failed to generate video.")
print(f"Status Code: {response.status_code}")
print("Response:", response.text)
const axios = require('axios');
// Replace with your actual values
const API_KEY = "MY_API_KEY";
const URL = "https://api.soundmadeseen.com/public/v1/video/generate/";
// Form data
const data = new URLSearchParams();
data.append("name", "API created video");
data.append("clip", "k9PAd4Bq9KL8jz92gPG2ET");
data.append("design", "YVXKxzPE9W39DcLgiNkaLA");
data.append(
"template_variables",
JSON.stringify([
{ name: "first_name", value: "Rane" },
{ name: "business_name", value: "SoundMadeSeen Industries" },
{ name: "heading_text", value: "The Greatest Video ever" }
])
);
// Headers
const headers = {
"Authorization": `Api-Key ${API_KEY}`,
"Content-Type": "application/x-www-form-urlencoded"
};
// Make the POST request
axios
.post(URL, data, { headers })
.then(response => {
if (response.status === 200 && response.data.success) {
console.log("Video generation initiated successfully!");
console.log(`Video Key: ${response.data.video_key}`);
} else {
console.error("Video generation failed.", response.data);
}
})
.catch(error => {
if (error.response) {
console.error("Error response:", error.response.status, error.response.data);
} else {
console.error("Error:", error.message);
}
});
curl -X POST https://api.soundmadeseen.com/public/v1/video/generate/ \
-H "Authorization: Api-Key MY_API_KEY" \
-H "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode "name=API created video" \
--data-urlencode "clip=k9PAd4Bq9KL8jz92gPG2ET" \
--data-urlencode "design=YVXKxzPE9W39DcLgiNkaLA" \
--data-urlencode "template_variables=[{\"name\":\"first_name\",\"value\":\"Rane\"},{\"name\":\"business_name\",\"value\":\"SoundMadeSeen Industries\"},{\"name\":\"heading_text\",\"value\":\"The Greatest Video ever\"}]"
<?php
// Replace with your actual API key
$apiKey = "MY_API_KEY";
$url = "https://api.soundmadeseen.com/public/v1/video/generate/";
// Form data
$data = [
"name" => "API created video",
"clip" => "k9PAd4Bq9KL8jz92gPG2ET",
"design" => "YVXKxzPE9W39DcLgiNkaLA",
"template_variables" => json_encode([
["name" => "first_name", "value" => "Rane"],
["name" => "business_name", "value" => "SoundMadeSeen Industries"],
["name" => "heading_text", "value" => "The Greatest Video ever"]
])
];
// Initialize cURL
$ch = curl_init();
// Set cURL options
curl_setopt_array($ch, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
"Authorization: Api-Key $apiKey",
"Content-Type: application/x-www-form-urlencoded"
],
CURLOPT_POSTFIELDS => http_build_query($data),
]);
// Execute the request
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
// Check for errors
if (curl_errno($ch)) {
echo "cURL Error: " . curl_error($ch);
} else {
if ($httpCode === 200) {
$data = json_decode($response, true);
if ($data["success"]) {
echo "Video generation initiated successfully!\n";
echo "Video Key: " . $data["video_key"] . "\n";
} else {
echo "Video generation failed. Response: " . $response . "\n";
}
} else {
echo "Failed to generate video. HTTP Code: $httpCode\n";
echo "Response: " . $response . "\n";
}
}
// Close cURL session
curl_close($ch);
List Videos
https://api.soundmadeseen.com/public/v1/videos/
This endpoint provides a list of completed videos belonging to the current team.
This endpoint accepts the following querystring parameters:
- order - sets the field that determines the order results are returned. May accept the following values: 'created', 'updated', 'name' or 'duration'. Defaults to 'created'
- dir - sets the direction that determines the order results are returned. May have the values 'asc' and 'desc'. Defaults to 'desc'.
- page - responses of this request are paginated and have a page size of 12. Setting this parameter will return the appropriate page. Defaults to 1.
Response
If successful, returns an HTTP status code of 200 with a paginated response similar to the following:
{
"count": 2,
"current": 1,
"total_pages": 1,
"page_size": 12,
"start_index": 1,
"end_index": 2,
"extra_params": {},
"results": [
{
"key": "MXapJbuWejpMdZg3ZGQv2R",
"duration": 66.208333,
"created": "2025-01-24T22:39:12.543908Z",
"name": "An amazing new video",
"video_size": {
"name": "Story",
"width": 1080,
"height": 1920
}
},
{
"key": "SGC9ZMnVaMb8YfbPJ7xjrc",
"duration": 27.583333,
"created": "2025-01-20T22:26:47.471287Z",
"name": "My amazing video in square format",
"video_size": {
"name": "Square",
"width": 1080,
"height": 1080
}
}]
}
Here are some code examples:
Exemples de code
import requests
# Replace with your actual API key
API_KEY = "MY_API_KEY"
URL = "https://api.soundmadeseen.com/public/v1/videos/"
# Headers
headers = {
"Authorization": f"Api-Key {API_KEY}"
}
# Make the GET request
response = requests.get(URL, headers=headers)
# Handle the response
if response.status_code == 200:
data = response.json()
print(f"Total Videos: {data['count']}")
print(f"Current Page: {data['current']}")
print(f"Total Pages: {data['total_pages']}")
print("Videos:")
for video in data["results"]:
print(f"- Key: {video['key']}")
print(f" Name: {video['name']}")
print(f" Duration: {video['duration']} seconds")
print(f" Created: {video['created']}")
print(f" Video Size: {video['video_size']['name']} ({video['video_size']['width']}x{video['video_size']['height']})")
print("")
else:
print("Failed to retrieve videos.")
print(f"Status Code: {response.status_code}")
print(f"Response: {response.text}")
const axios = require('axios');
// Replace with your actual API key
const API_KEY = "MY_API_KEY";
const URL = "https://api.soundmadeseen.com/public/v1/videos/";
// Headers
const headers = {
"Authorization": `Api-Key ${API_KEY}`
};
// Make the GET request
axios
.get(URL, { headers })
.then(response => {
if (response.status === 200) {
const data = response.data;
console.log(`Total Videos: ${data.count}`);
console.log(`Current Page: ${data.current}`);
console.log(`Total Pages: ${data.total_pages}`);
console.log("Videos:");
data.results.forEach(video => {
console.log(`- Key: ${video.key}`);
console.log(` Name: ${video.name}`);
console.log(` Duration: ${video.duration} seconds`);
console.log(` Created: ${video.created}`);
console.log(` Video Size: ${video.video_size.name} (${video.video_size.width}x${video.video_size.height})`);
console.log("");
});
} else {
console.error("Unexpected response:", response.status, response.data);
}
})
.catch(error => {
if (error.response) {
console.error("Error response:", error.response.status, error.response.data);
} else {
console.error("Error:", error.message);
}
});
curl -X GET https://api.soundmadeseen.com/public/v1/videos/ \
-H "Authorization: Api-Key MY_API_KEY"
<?php
// Replace with your actual API key
$apiKey = "MY_API_KEY";
$url = "https://api.soundmadeseen.com/public/v1/videos/";
// Initialize cURL
$ch = curl_init();
// Set cURL options
curl_setopt_array($ch, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Api-Key $apiKey"
],
]);
// Execute the request
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
// Check for errors
if (curl_errno($ch)) {
echo "cURL Error: " . curl_error($ch);
} else {
if ($httpCode === 200) {
$data = json_decode($response, true);
echo "Total Videos: " . $data["count"] . "\n";
echo "Current Page: " . $data["current"] . "\n";
echo "Total Pages: " . $data["total_pages"] . "\n";
echo "Videos:\n";
foreach ($data["results"] as $video) {
echo "- Key: " . $video["key"] . "\n";
echo " Name: " . $video["name"] . "\n";
echo " Duration: " . $video["duration"] . " seconds\n";
echo " Created: " . $video["created"] . "\n";
echo " Video Size: " . $video["video_size"]["name"] . " (" .
$video["video_size"]["width"] . "x" . $video["video_size"]["height"] . ")\n\n";
}
} else {
echo "Failed to retrieve videos. HTTP Code: $httpCode\n";
echo "Response: " . $response . "\n";
}
}
// Close cURL session
curl_close($ch);
Video status
https://api.soundmadeseen.com/public/v1/video/video_key/status/
This endpoint can be used to check the status of a video.
This endpoint contains the following path parameters:
- video_key - the key, or identifier of the video.
Responses
A successful response will have an HTTP status code of 200 and contain a JSON object similar to the following:
{
"key": "MXapJbuWejpMdZg3ZGQv2R",
"status": "completed",
"duration": 66.208333,
"created": "2025-01-24T22:39:12.543908Z",
"updated": "2025-01-24T22:40:58.408499Z"
}
The status field will contain the value pending, processing, completed or error.
If a video belonging to the current team cannot be found, this endpoint will return a response with an HTTP code of 404.
Exemples de code
import requests
# Replace with your actual API key and video key
API_KEY = "MY_API_KEY"
VIDEO_KEY = "<video_key>" # Replace with the actual video key
URL = f"https://api.soundmadeseen.com/public/v1/video/{VIDEO_KEY}/status/"
# Headers
headers = {
"Authorization": f"Api-Key {API_KEY}"
}
# Make the GET request
response = requests.get(URL, headers=headers)
# Handle the response
if response.status_code == 200:
data = response.json()
print("Video Status:")
print(f" Key: {data['key']}")
print(f" Status: {data['status']}")
print(f" Duration: {data['duration']} seconds")
print(f" Created: {data['created']}")
print(f" Updated: {data['updated']}")
else:
print("Failed to retrieve video status.")
print(f"Status Code: {response.status_code}")
print("Response:", response.text)
const axios = require('axios');
// Replace with your actual API key and video key
const API_KEY = "MY_API_KEY";
const VIDEO_KEY = "<video_key>"; // Replace with the actual video key
const URL = `https://api.soundmadeseen.com/public/v1/video/${VIDEO_KEY}/status/`;
// Headers
const headers = {
"Authorization": `Api-Key ${API_KEY}`
};
// Make the GET request
axios
.get(URL, { headers })
.then(response => {
if (response.status === 200) {
const data = response.data;
console.log("Video Status:");
console.log(` Key: ${data.key}`);
console.log(` Status: ${data.status}`);
console.log(` Duration: ${data.duration} seconds`);
console.log(` Created: ${data.created}`);
console.log(` Updated: ${data.updated}`);
} else {
console.error("Unexpected response:", response.status, response.data);
}
})
.catch(error => {
if (error.response) {
console.error("Error response:", error.response.status, error.response.data);
} else {
console.error("Error:", error.message);
}
});
curl -X GET https://api.soundmadeseen.com/public/v1/video/<video_key>/status/ \
-H "Authorization: Api-Key MY_API_KEY"
<?php
// Replace with your actual API key and video key
$apiKey = "MY_API_KEY";
$videoKey = "<video_key>"; // Replace with the actual video key
$url = "https://api.soundmadeseen.com/public/v1/video/$videoKey/status/";
// Initialize cURL
$ch = curl_init();
// Set cURL options
curl_setopt_array($ch, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Api-Key $apiKey"
],
]);
// Execute the request
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
// Check for errors
if (curl_errno($ch)) {
echo "cURL Error: " . curl_error($ch);
} else {
if ($httpCode === 200) {
$data = json_decode($response, true);
echo "Video Status:\n";
echo " Key: " . $data["key"] . "\n";
echo " Status: " . $data["status"] . "\n";
echo " Duration: " . $data["duration"] . " seconds\n";
echo " Created: " . $data["created"] . "\n";
echo " Updated: " . $data["updated"] . "\n";
} else {
echo "Failed to retrieve video status. HTTP Code: $httpCode\n";
echo "Response: " . $response . "\n";
}
}
// Close cURL session
curl_close($ch);
Video detail
https://api.soundmadeseen.com/public/v1/video/video_key/
This endpoint displays the same information as the Video status endpoint, but in addition contains a download_url field, which contains a url that can be used to generate the video with the specified key.
This endpoint contains the following path parameters:
- video_key - the key, or identifier of the video.
Responses
If successful, this endpoint will return a response with an HTTP status code of 200, with contents similar to the following:
{
"key": "MXapJbuWejpMdZg3ZGQv2R",
"duration": 66.208333,
"created": "2025-01-24T22:39:12.543908Z",
"status": "completed",
"error_message": null,
"download_url": "https://signed-url-that-can-be-used-to-download-video"
}
The status field will contain the value pending, processing, completed or error.
If the status field has a value of completed, the download_url will contain a signed url that can be used to download the generated video. This url will expire 24 hours after it is generated.
If a video belonging to the current team cannot be found, this endpoint will return a response with an HTTP code of 404.
Exemples de code
import requests
# Replace with your actual API key and video key
API_KEY = "MY_API_KEY"
VIDEO_KEY = "<video_key>" # Replace with the actual video key
URL = f"https://api.soundmadeseen.com/public/v1/video/{VIDEO_KEY}/"
# Headers
headers = {
"Authorization": f"Api-Key {API_KEY}"
}
# Make the GET request
response = requests.get(URL, headers=headers)
# Handle the response
if response.status_code == 200:
data = response.json()
print("Video Status:")
print(f" Key: {data['key']}")
print(f" Status: {data['status']}")
print(f" Duration: {data['duration']} seconds")
print(f" Created: {data['created']}")
print(f" Updated: {data['updated']}")
print(f" Download URL: {data['download_url']}")
else:
print("Failed to retrieve video status.")
print(f"Status Code: {response.status_code}")
print("Response:", response.text)
const axios = require('axios');
// Replace with your actual API key and video key
const API_KEY = "MY_API_KEY";
const VIDEO_KEY = "<video_key>"; // Replace with the actual video key
const URL = `https://api.soundmadeseen.com/public/v1/video/${VIDEO_KEY}/`;
// Headers
const headers = {
"Authorization": `Api-Key ${API_KEY}`
};
// Make the GET request
axios
.get(URL, { headers })
.then(response => {
if (response.status === 200) {
const data = response.data;
console.log("Video Status:");
console.log(` Key: ${data.key}`);
console.log(` Status: ${data.status}`);
console.log(` Duration: ${data.duration} seconds`);
console.log(` Created: ${data.created}`);
console.log(` Updated: ${data.updated}`);
console.log(` Download URL: ${data.download_url}`);
} else {
console.error("Unexpected response:", response.status, response.data);
}
})
.catch(error => {
if (error.response) {
console.error("Error response:", error.response.status, error.response.data);
} else {
console.error("Error:", error.message);
}
});
curl -X GET https://api.soundmadeseen.com/public/v1/video/<video_key>/ \
-H "Authorization: Api-Key MY_API_KEY"
<?php
// Replace with your actual API key and video key
$apiKey = "MY_API_KEY";
$videoKey = "<video_key>"; // Replace with the actual video key
$url = "https://api.soundmadeseen.com/public/v1/video/$videoKey/";
// Initialize cURL
$ch = curl_init();
// Set cURL options
curl_setopt_array($ch, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Api-Key $apiKey"
],
]);
// Execute the request
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
// Check for errors
if (curl_errno($ch)) {
echo "cURL Error: " . curl_error($ch);
} else {
if ($httpCode === 200) {
$data = json_decode($response, true);
echo "Video Status:\n";
echo " Key: " . $data["key"] . "\n";
echo " Status: " . $data["status"] . "\n";
echo " Duration: " . $data["duration"] . " seconds\n";
echo " Created: " . $data["created"] . "\n";
echo " Updated: " . $data["updated"] . "\n";
echo " Download URL: " . $data["download_url"] . "\n";
} else {
echo "Failed to retrieve video status. HTTP Code: $httpCode\n";
echo "Response: " . $response . "\n";
}
}
// Close cURL session
curl_close($ch);