curl --request POST \
--url https://mvp.tryunsora.com/api/v1/movie-materials/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"params": {},
"ratio": "16:9",
"resolution": "2k",
"referenceImageUrls": [
"<string>"
]
}
'import requests
url = "https://mvp.tryunsora.com/api/v1/movie-materials/create"
payload = {
"prompt": "<string>",
"params": {},
"ratio": "16:9",
"resolution": "2k",
"referenceImageUrls": ["<string>"]
}
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({
prompt: '<string>',
params: {},
ratio: '16:9',
resolution: '2k',
referenceImageUrls: ['<string>']
})
};
fetch('https://mvp.tryunsora.com/api/v1/movie-materials/create', 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://mvp.tryunsora.com/api/v1/movie-materials/create",
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([
'prompt' => '<string>',
'params' => [
],
'ratio' => '16:9',
'resolution' => '2k',
'referenceImageUrls' => [
'<string>'
]
]),
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://mvp.tryunsora.com/api/v1/movie-materials/create"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"params\": {},\n \"ratio\": \"16:9\",\n \"resolution\": \"2k\",\n \"referenceImageUrls\": [\n \"<string>\"\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://mvp.tryunsora.com/api/v1/movie-materials/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"params\": {},\n \"ratio\": \"16:9\",\n \"resolution\": \"2k\",\n \"referenceImageUrls\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mvp.tryunsora.com/api/v1/movie-materials/create")
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 \"prompt\": \"<string>\",\n \"params\": {},\n \"ratio\": \"16:9\",\n \"resolution\": \"2k\",\n \"referenceImageUrls\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"generation": {
"id": "<string>",
"status": "QUEUED"
},
"creditsDeducted": 123,
"creditsRemaining": 123
}{
"error": "<string>",
"success": true,
"code": "<string>",
"message": "<string>"
}{
"error": "<string>",
"success": true,
"code": "<string>",
"message": "<string>"
}{
"error": "<string>",
"success": true,
"code": "<string>",
"message": "<string>"
}Movie materials
Generate pre-production images for a film: character faces, bodies and sheets, locations, first frames, style collages and storyboards.
curl --request POST \
--url https://mvp.tryunsora.com/api/v1/movie-materials/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"params": {},
"ratio": "16:9",
"resolution": "2k",
"referenceImageUrls": [
"<string>"
]
}
'import requests
url = "https://mvp.tryunsora.com/api/v1/movie-materials/create"
payload = {
"prompt": "<string>",
"params": {},
"ratio": "16:9",
"resolution": "2k",
"referenceImageUrls": ["<string>"]
}
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({
prompt: '<string>',
params: {},
ratio: '16:9',
resolution: '2k',
referenceImageUrls: ['<string>']
})
};
fetch('https://mvp.tryunsora.com/api/v1/movie-materials/create', 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://mvp.tryunsora.com/api/v1/movie-materials/create",
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([
'prompt' => '<string>',
'params' => [
],
'ratio' => '16:9',
'resolution' => '2k',
'referenceImageUrls' => [
'<string>'
]
]),
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://mvp.tryunsora.com/api/v1/movie-materials/create"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"params\": {},\n \"ratio\": \"16:9\",\n \"resolution\": \"2k\",\n \"referenceImageUrls\": [\n \"<string>\"\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://mvp.tryunsora.com/api/v1/movie-materials/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"params\": {},\n \"ratio\": \"16:9\",\n \"resolution\": \"2k\",\n \"referenceImageUrls\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mvp.tryunsora.com/api/v1/movie-materials/create")
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 \"prompt\": \"<string>\",\n \"params\": {},\n \"ratio\": \"16:9\",\n \"resolution\": \"2k\",\n \"referenceImageUrls\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"generation": {
"id": "<string>",
"status": "QUEUED"
},
"creditsDeducted": 123,
"creditsRemaining": 123
}{
"error": "<string>",
"success": true,
"code": "<string>",
"message": "<string>"
}{
"error": "<string>",
"success": true,
"code": "<string>",
"message": "<string>"
}{
"error": "<string>",
"success": true,
"code": "<string>",
"message": "<string>"
}mode | Makes |
|---|---|
face | Close-up portrait of a character |
wide-body | Full-body shot of a character |
sheet | Character turnaround sheet |
location | Set or location reference |
first-frame | The opening frame of a shot |
style-collage | Look-and-feel collage |
multishot-2x4 | 8-panel storyboard |
multishot-1x4 | 4-panel storyboard |
1k, 4 at 2k (default) and 6 at 4k. Add up to 14 referenceImageUrls. params takes optional per-mode settings: cinematography for every mode (cinematic, anime, realistic, cartoon, fantasy, …); age and gender for face; camera-angle for first-frame; color-palette, lighting-mood and era-vibe for style-collage. Poll Poll image status with generation.id.
curl -X POST "https://mvp.tryunsora.com/api/v1/movie-materials/create" \
-H "Authorization: Bearer uns_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mode": "face",
"prompt": "A weary lighthouse keeper in her sixties, wind-burned skin, grey braid",
"params": { "age": "elderly", "gender": "female", "cinematography": "realistic" },
"ratio": "3:4"
}'
Authorizations
An Unsora API key (uns_…). A Clerk session token also works.
Body
Description of the character, place or scene.
face close-up portrait; wide-body full body; sheet character turnaround; location set reference; first-frame opening shot; style-collage look and feel; multishot-2x4 and multishot-1x4 storyboard grids.
face, wide-body, sheet, location, first-frame, style-collage, multishot-2x4, multishot-1x4 Optional per-mode settings: cinematography (every mode, default cinematic); age (default adult) and gender (default female) for face; camera-angle (default eye-level) for first-frame; color-palette (default warm), lighting-mood (default natural) and era-vibe (default modern) for style-collage.
Show child attributes
Show child attributes
auto, 1:1, 9:16, 16:9, 4:3, 3:4 1k, 2k, 4k Up to 14 reference images, e.g. of the actor or the set.
14
