curl --request PUT \
--url https://api.lumisreach.com/api/v1/videos/{id}/music \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"library": "lumisreach",
"track_id": "<string>",
"accept_price_cents": 50000,
"smart": true
}
'import requests
url = "https://api.lumisreach.com/api/v1/videos/{id}/music"
payload = {
"library": "lumisreach",
"track_id": "<string>",
"accept_price_cents": 50000,
"smart": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
library: 'lumisreach',
track_id: '<string>',
accept_price_cents: 50000,
smart: true
})
};
fetch('https://api.lumisreach.com/api/v1/videos/{id}/music', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lumisreach.com/api/v1/videos/{id}/music",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'library' => 'lumisreach',
'track_id' => '<string>',
'accept_price_cents' => 50000,
'smart' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lumisreach.com/api/v1/videos/{id}/music"
payload := strings.NewReader("{\n \"library\": \"lumisreach\",\n \"track_id\": \"<string>\",\n \"accept_price_cents\": 50000,\n \"smart\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.lumisreach.com/api/v1/videos/{id}/music")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"library\": \"lumisreach\",\n \"track_id\": \"<string>\",\n \"accept_price_cents\": 50000,\n \"smart\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lumisreach.com/api/v1/videos/{id}/music")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"library\": \"lumisreach\",\n \"track_id\": \"<string>\",\n \"accept_price_cents\": 50000,\n \"smart\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"status": "unsubmitted",
"template": "ai_videographer",
"preset": "<string>",
"format": "vertical",
"duration_seconds": 123,
"video_url": "<string>",
"thumbnail_url": "<string>",
"billed_cents": 0,
"error": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"posts": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider": "tiktok",
"status": "scheduled",
"media_type": "video",
"permalink": "<string>",
"scheduled_for": "2023-11-07T05:31:56Z",
"published_at": "2023-11-07T05:31:56Z",
"error": "<string>"
}
],
"price_cents": 0,
"price_estimated": true,
"script_approved": true,
"user_script": true,
"script": "<string>",
"script_sections": [
{
"label": "<string>",
"text": "<string>"
}
],
"scenes": [
{
"id": "<string>",
"label": "<string>",
"duration_seconds": 123,
"voiceover": "<string>",
"caption": "<string>",
"prompt": "<string>"
}
],
"slides": [
{
"id": "<string>",
"role": "<string>",
"headline": "<string>",
"body": "<string>",
"position": "<string>",
"prompt": "<string>",
"image_url": "<string>"
}
],
"interview": {
"speakers": [
{
"id": "<string>",
"role": "<string>",
"face_name": "<string>"
}
],
"turns": [
{
"id": "<string>",
"speaker_id": "<string>",
"text": "<string>"
}
]
},
"caption": "<string>",
"hashtags": [
"<string>"
],
"post_caption": "<string>",
"music": {
"library": "lumisreach",
"track_id": "<string>",
"title": "<string>",
"status": "pending"
},
"brief": "<string>",
"language": "<string>",
"source_url": "<string>",
"target_duration_seconds": 0,
"avatar_provider": "heygen",
"avatar_layout": "center",
"background_mode": "static",
"subtitle_style": "none",
"subtitle_emojis": true,
"video_model": "<string>",
"videographer": {
"sources": [
"any"
],
"model": "<string>",
"actions": 0,
"presenter_narrates": true
},
"narration": 0,
"post_format": "text",
"post_orientation": "square",
"dashboard_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"fields": {},
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"fields": {},
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"fields": {},
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"fields": {},
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"fields": {},
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"fields": {},
"doc_url": "<string>"
}
}Set a video's music
Put a track from GET /v1/videos/music under a video: the built-in library, Epidemic Sound, one of your generated tracks, or commercial music (once your workspace confirmed its rights in the dashboard). A finished video is mixed again in the background (its music.status goes mixing, then applied); one still being made takes the track when it is mixed. A premium Epidemic Sound track is charged its price_cents once per video, and only when you send that price as accept_price_cents; every other track is free. A video cut to the beat of its music keeps that music.
curl --request PUT \
--url https://api.lumisreach.com/api/v1/videos/{id}/music \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"library": "lumisreach",
"track_id": "<string>",
"accept_price_cents": 50000,
"smart": true
}
'import requests
url = "https://api.lumisreach.com/api/v1/videos/{id}/music"
payload = {
"library": "lumisreach",
"track_id": "<string>",
"accept_price_cents": 50000,
"smart": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
library: 'lumisreach',
track_id: '<string>',
accept_price_cents: 50000,
smart: true
})
};
fetch('https://api.lumisreach.com/api/v1/videos/{id}/music', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lumisreach.com/api/v1/videos/{id}/music",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'library' => 'lumisreach',
'track_id' => '<string>',
'accept_price_cents' => 50000,
'smart' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lumisreach.com/api/v1/videos/{id}/music"
payload := strings.NewReader("{\n \"library\": \"lumisreach\",\n \"track_id\": \"<string>\",\n \"accept_price_cents\": 50000,\n \"smart\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.lumisreach.com/api/v1/videos/{id}/music")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"library\": \"lumisreach\",\n \"track_id\": \"<string>\",\n \"accept_price_cents\": 50000,\n \"smart\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lumisreach.com/api/v1/videos/{id}/music")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"library\": \"lumisreach\",\n \"track_id\": \"<string>\",\n \"accept_price_cents\": 50000,\n \"smart\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"status": "unsubmitted",
"template": "ai_videographer",
"preset": "<string>",
"format": "vertical",
"duration_seconds": 123,
"video_url": "<string>",
"thumbnail_url": "<string>",
"billed_cents": 0,
"error": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"posts": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider": "tiktok",
"status": "scheduled",
"media_type": "video",
"permalink": "<string>",
"scheduled_for": "2023-11-07T05:31:56Z",
"published_at": "2023-11-07T05:31:56Z",
"error": "<string>"
}
],
"price_cents": 0,
"price_estimated": true,
"script_approved": true,
"user_script": true,
"script": "<string>",
"script_sections": [
{
"label": "<string>",
"text": "<string>"
}
],
"scenes": [
{
"id": "<string>",
"label": "<string>",
"duration_seconds": 123,
"voiceover": "<string>",
"caption": "<string>",
"prompt": "<string>"
}
],
"slides": [
{
"id": "<string>",
"role": "<string>",
"headline": "<string>",
"body": "<string>",
"position": "<string>",
"prompt": "<string>",
"image_url": "<string>"
}
],
"interview": {
"speakers": [
{
"id": "<string>",
"role": "<string>",
"face_name": "<string>"
}
],
"turns": [
{
"id": "<string>",
"speaker_id": "<string>",
"text": "<string>"
}
]
},
"caption": "<string>",
"hashtags": [
"<string>"
],
"post_caption": "<string>",
"music": {
"library": "lumisreach",
"track_id": "<string>",
"title": "<string>",
"status": "pending"
},
"brief": "<string>",
"language": "<string>",
"source_url": "<string>",
"target_duration_seconds": 0,
"avatar_provider": "heygen",
"avatar_layout": "center",
"background_mode": "static",
"subtitle_style": "none",
"subtitle_emojis": true,
"video_model": "<string>",
"videographer": {
"sources": [
"any"
],
"model": "<string>",
"actions": 0,
"presenter_narrates": true
},
"narration": 0,
"post_format": "text",
"post_orientation": "square",
"dashboard_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"fields": {},
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"fields": {},
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"fields": {},
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"fields": {},
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"fields": {},
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"fields": {},
"doc_url": "<string>"
}
}Authorizations
Headers
Body
Where the track is from, as GET /v1/videos/music lists it: lumisreach (the built-in royalty-free library), epidemic (Epidemic Sound's catalog), generated (a track your workspace made with POST /v1/videos/music/generated, once ready) or commercial (popular songs from TikTok's charts; needs your workspace's confirmation, in the dashboard, that it holds the rights).
lumisreach, epidemic, generated, commercial