Layouts
Save a layout preset
Save a layout preset to your account. Saving again under the same name replaces it. Built-in names are taken.
POST
/
layouts
Save a layout preset
curl --request POST \
--url https://api.vidjutsu.ai/layouts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"screen": {
"x": 123,
"y": 123,
"width": 123,
"height": 123,
"radius": 123,
"crop": {
"x": 123,
"y": 123,
"width": 123,
"height": 123
},
"hidden": true,
"cut": true
},
"camera": {
"x": 123,
"y": 123,
"width": 123,
"height": 123,
"radius": 123,
"crop": {
"x": 123,
"y": 123,
"width": 123,
"height": 123
},
"hidden": true,
"cut": true
}
}
'import requests
url = "https://api.vidjutsu.ai/layouts"
payload = {
"name": "<string>",
"screen": {
"x": 123,
"y": 123,
"width": 123,
"height": 123,
"radius": 123,
"crop": {
"x": 123,
"y": 123,
"width": 123,
"height": 123
},
"hidden": True,
"cut": True
},
"camera": {
"x": 123,
"y": 123,
"width": 123,
"height": 123,
"radius": 123,
"crop": {
"x": 123,
"y": 123,
"width": 123,
"height": 123
},
"hidden": True,
"cut": True
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
screen: {
x: 123,
y: 123,
width: 123,
height: 123,
radius: 123,
crop: {x: 123, y: 123, width: 123, height: 123},
hidden: true,
cut: true
},
camera: {
x: 123,
y: 123,
width: 123,
height: 123,
radius: 123,
crop: {x: 123, y: 123, width: 123, height: 123},
hidden: true,
cut: true
}
})
};
fetch('https://api.vidjutsu.ai/layouts', 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.vidjutsu.ai/layouts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'screen' => [
'x' => 123,
'y' => 123,
'width' => 123,
'height' => 123,
'radius' => 123,
'crop' => [
'x' => 123,
'y' => 123,
'width' => 123,
'height' => 123
],
'hidden' => true,
'cut' => true
],
'camera' => [
'x' => 123,
'y' => 123,
'width' => 123,
'height' => 123,
'radius' => 123,
'crop' => [
'x' => 123,
'y' => 123,
'width' => 123,
'height' => 123
],
'hidden' => true,
'cut' => 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.vidjutsu.ai/layouts"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"screen\": {\n \"x\": 123,\n \"y\": 123,\n \"width\": 123,\n \"height\": 123,\n \"radius\": 123,\n \"crop\": {\n \"x\": 123,\n \"y\": 123,\n \"width\": 123,\n \"height\": 123\n },\n \"hidden\": true,\n \"cut\": true\n },\n \"camera\": {\n \"x\": 123,\n \"y\": 123,\n \"width\": 123,\n \"height\": 123,\n \"radius\": 123,\n \"crop\": {\n \"x\": 123,\n \"y\": 123,\n \"width\": 123,\n \"height\": 123\n },\n \"hidden\": true,\n \"cut\": true\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.vidjutsu.ai/layouts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"screen\": {\n \"x\": 123,\n \"y\": 123,\n \"width\": 123,\n \"height\": 123,\n \"radius\": 123,\n \"crop\": {\n \"x\": 123,\n \"y\": 123,\n \"width\": 123,\n \"height\": 123\n },\n \"hidden\": true,\n \"cut\": true\n },\n \"camera\": {\n \"x\": 123,\n \"y\": 123,\n \"width\": 123,\n \"height\": 123,\n \"radius\": 123,\n \"crop\": {\n \"x\": 123,\n \"y\": 123,\n \"width\": 123,\n \"height\": 123\n },\n \"hidden\": true,\n \"cut\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vidjutsu.ai/layouts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"screen\": {\n \"x\": 123,\n \"y\": 123,\n \"width\": 123,\n \"height\": 123,\n \"radius\": 123,\n \"crop\": {\n \"x\": 123,\n \"y\": 123,\n \"width\": 123,\n \"height\": 123\n },\n \"hidden\": true,\n \"cut\": true\n },\n \"camera\": {\n \"x\": 123,\n \"y\": 123,\n \"width\": 123,\n \"height\": 123,\n \"radius\": 123,\n \"crop\": {\n \"x\": 123,\n \"y\": 123,\n \"width\": 123,\n \"height\": 123\n },\n \"hidden\": true,\n \"cut\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"layout": {
"id": "<string>",
"name": "<string>",
"builtin": true,
"parts": {
"screen": {
"x": 123,
"y": 123,
"width": 123,
"height": 123,
"shape": "square",
"radius": 123,
"crop": {
"x": 123,
"y": 123,
"width": 123,
"height": 123
},
"fit": "stretch",
"hidden": true,
"cut": true
},
"camera": {
"x": 123,
"y": 123,
"width": 123,
"height": 123,
"shape": "square",
"radius": 123,
"crop": {
"x": 123,
"y": 123,
"width": 123,
"height": 123
},
"fit": "stretch",
"hidden": true,
"cut": true
}
}
},
"replaced": true
}{
"code": "unauthenticated",
"message": "<string>",
"request_id": "<string>",
"reason": "<string>",
"checkout_url": "<string>",
"top_up_url": "<string>",
"upgrade_url": "<string>",
"media_deletes_at": "2023-11-07T05:31:56Z",
"contact_url": "<string>",
"retry_after_seconds": 123,
"latest_version": "<string>"
}Authorizations
Headers
The API version you wrote your integration against, a date. Without it you get the latest version. The current version is 2026-11-03. See https://docs.vidjutsu.ai/api-reference/introduction#versioning.
Pattern:
^\d{4}-\d{2}-\d{2}$Example:
"2026-11-03"
Body
application/json
Save a layout preset
curl --request POST \
--url https://api.vidjutsu.ai/layouts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"screen": {
"x": 123,
"y": 123,
"width": 123,
"height": 123,
"radius": 123,
"crop": {
"x": 123,
"y": 123,
"width": 123,
"height": 123
},
"hidden": true,
"cut": true
},
"camera": {
"x": 123,
"y": 123,
"width": 123,
"height": 123,
"radius": 123,
"crop": {
"x": 123,
"y": 123,
"width": 123,
"height": 123
},
"hidden": true,
"cut": true
}
}
'import requests
url = "https://api.vidjutsu.ai/layouts"
payload = {
"name": "<string>",
"screen": {
"x": 123,
"y": 123,
"width": 123,
"height": 123,
"radius": 123,
"crop": {
"x": 123,
"y": 123,
"width": 123,
"height": 123
},
"hidden": True,
"cut": True
},
"camera": {
"x": 123,
"y": 123,
"width": 123,
"height": 123,
"radius": 123,
"crop": {
"x": 123,
"y": 123,
"width": 123,
"height": 123
},
"hidden": True,
"cut": True
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
screen: {
x: 123,
y: 123,
width: 123,
height: 123,
radius: 123,
crop: {x: 123, y: 123, width: 123, height: 123},
hidden: true,
cut: true
},
camera: {
x: 123,
y: 123,
width: 123,
height: 123,
radius: 123,
crop: {x: 123, y: 123, width: 123, height: 123},
hidden: true,
cut: true
}
})
};
fetch('https://api.vidjutsu.ai/layouts', 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.vidjutsu.ai/layouts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'screen' => [
'x' => 123,
'y' => 123,
'width' => 123,
'height' => 123,
'radius' => 123,
'crop' => [
'x' => 123,
'y' => 123,
'width' => 123,
'height' => 123
],
'hidden' => true,
'cut' => true
],
'camera' => [
'x' => 123,
'y' => 123,
'width' => 123,
'height' => 123,
'radius' => 123,
'crop' => [
'x' => 123,
'y' => 123,
'width' => 123,
'height' => 123
],
'hidden' => true,
'cut' => 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.vidjutsu.ai/layouts"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"screen\": {\n \"x\": 123,\n \"y\": 123,\n \"width\": 123,\n \"height\": 123,\n \"radius\": 123,\n \"crop\": {\n \"x\": 123,\n \"y\": 123,\n \"width\": 123,\n \"height\": 123\n },\n \"hidden\": true,\n \"cut\": true\n },\n \"camera\": {\n \"x\": 123,\n \"y\": 123,\n \"width\": 123,\n \"height\": 123,\n \"radius\": 123,\n \"crop\": {\n \"x\": 123,\n \"y\": 123,\n \"width\": 123,\n \"height\": 123\n },\n \"hidden\": true,\n \"cut\": true\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.vidjutsu.ai/layouts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"screen\": {\n \"x\": 123,\n \"y\": 123,\n \"width\": 123,\n \"height\": 123,\n \"radius\": 123,\n \"crop\": {\n \"x\": 123,\n \"y\": 123,\n \"width\": 123,\n \"height\": 123\n },\n \"hidden\": true,\n \"cut\": true\n },\n \"camera\": {\n \"x\": 123,\n \"y\": 123,\n \"width\": 123,\n \"height\": 123,\n \"radius\": 123,\n \"crop\": {\n \"x\": 123,\n \"y\": 123,\n \"width\": 123,\n \"height\": 123\n },\n \"hidden\": true,\n \"cut\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vidjutsu.ai/layouts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"screen\": {\n \"x\": 123,\n \"y\": 123,\n \"width\": 123,\n \"height\": 123,\n \"radius\": 123,\n \"crop\": {\n \"x\": 123,\n \"y\": 123,\n \"width\": 123,\n \"height\": 123\n },\n \"hidden\": true,\n \"cut\": true\n },\n \"camera\": {\n \"x\": 123,\n \"y\": 123,\n \"width\": 123,\n \"height\": 123,\n \"radius\": 123,\n \"crop\": {\n \"x\": 123,\n \"y\": 123,\n \"width\": 123,\n \"height\": 123\n },\n \"hidden\": true,\n \"cut\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"layout": {
"id": "<string>",
"name": "<string>",
"builtin": true,
"parts": {
"screen": {
"x": 123,
"y": 123,
"width": 123,
"height": 123,
"shape": "square",
"radius": 123,
"crop": {
"x": 123,
"y": 123,
"width": 123,
"height": 123
},
"fit": "stretch",
"hidden": true,
"cut": true
},
"camera": {
"x": 123,
"y": 123,
"width": 123,
"height": 123,
"shape": "square",
"radius": 123,
"crop": {
"x": 123,
"y": 123,
"width": 123,
"height": 123
},
"fit": "stretch",
"hidden": true,
"cut": true
}
}
},
"replaced": true
}{
"code": "unauthenticated",
"message": "<string>",
"request_id": "<string>",
"reason": "<string>",
"checkout_url": "<string>",
"top_up_url": "<string>",
"upgrade_url": "<string>",
"media_deletes_at": "2023-11-07T05:31:56Z",
"contact_url": "<string>",
"retry_after_seconds": 123,
"latest_version": "<string>"
}