Create YouTube thumbnail jobs
curl --request POST \
--url https://mvp.tryunsora.com/api/v1/thumbnails/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"context": [
{
"content": "<string>"
}
],
"referenceImageUrls": [
"<string>"
],
"templateImageUrls": [
"<string>"
],
"expression": "auto",
"variations": 1
}
'import requests
url = "https://mvp.tryunsora.com/api/v1/thumbnails/create"
payload = {
"prompt": "<string>",
"context": [{ "content": "<string>" }],
"referenceImageUrls": ["<string>"],
"templateImageUrls": ["<string>"],
"expression": "auto",
"variations": 1
}
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>',
context: [{content: '<string>'}],
referenceImageUrls: ['<string>'],
templateImageUrls: ['<string>'],
expression: 'auto',
variations: 1
})
};
fetch('https://mvp.tryunsora.com/api/v1/thumbnails/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/thumbnails/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>',
'context' => [
[
'content' => '<string>'
]
],
'referenceImageUrls' => [
'<string>'
],
'templateImageUrls' => [
'<string>'
],
'expression' => 'auto',
'variations' => 1
]),
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/thumbnails/create"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"context\": [\n {\n \"content\": \"<string>\"\n }\n ],\n \"referenceImageUrls\": [\n \"<string>\"\n ],\n \"templateImageUrls\": [\n \"<string>\"\n ],\n \"expression\": \"auto\",\n \"variations\": 1\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/thumbnails/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"context\": [\n {\n \"content\": \"<string>\"\n }\n ],\n \"referenceImageUrls\": [\n \"<string>\"\n ],\n \"templateImageUrls\": [\n \"<string>\"\n ],\n \"expression\": \"auto\",\n \"variations\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mvp.tryunsora.com/api/v1/thumbnails/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 \"context\": [\n {\n \"content\": \"<string>\"\n }\n ],\n \"referenceImageUrls\": [\n \"<string>\"\n ],\n \"templateImageUrls\": [\n \"<string>\"\n ],\n \"expression\": \"auto\",\n \"variations\": 1\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"generations": [
{
"id": "<string>",
"status": "<string>"
}
],
"creditsDeducted": 123,
"creditsRemaining": 123
}{
"error": "<string>",
"success": true,
"code": "<string>",
"message": "<string>"
}{
"error": "<string>",
"success": true,
"code": "<string>",
"message": "<string>"
}Thumbnail generator
Create thumbnail
Generate click-worthy YouTube thumbnails from a title, script, or reference image — returns a job you can poll until the images are ready.
POST
/
thumbnails
/
create
Create YouTube thumbnail jobs
curl --request POST \
--url https://mvp.tryunsora.com/api/v1/thumbnails/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>",
"context": [
{
"content": "<string>"
}
],
"referenceImageUrls": [
"<string>"
],
"templateImageUrls": [
"<string>"
],
"expression": "auto",
"variations": 1
}
'import requests
url = "https://mvp.tryunsora.com/api/v1/thumbnails/create"
payload = {
"prompt": "<string>",
"context": [{ "content": "<string>" }],
"referenceImageUrls": ["<string>"],
"templateImageUrls": ["<string>"],
"expression": "auto",
"variations": 1
}
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>',
context: [{content: '<string>'}],
referenceImageUrls: ['<string>'],
templateImageUrls: ['<string>'],
expression: 'auto',
variations: 1
})
};
fetch('https://mvp.tryunsora.com/api/v1/thumbnails/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/thumbnails/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>',
'context' => [
[
'content' => '<string>'
]
],
'referenceImageUrls' => [
'<string>'
],
'templateImageUrls' => [
'<string>'
],
'expression' => 'auto',
'variations' => 1
]),
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/thumbnails/create"
payload := strings.NewReader("{\n \"prompt\": \"<string>\",\n \"context\": [\n {\n \"content\": \"<string>\"\n }\n ],\n \"referenceImageUrls\": [\n \"<string>\"\n ],\n \"templateImageUrls\": [\n \"<string>\"\n ],\n \"expression\": \"auto\",\n \"variations\": 1\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/thumbnails/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"prompt\": \"<string>\",\n \"context\": [\n {\n \"content\": \"<string>\"\n }\n ],\n \"referenceImageUrls\": [\n \"<string>\"\n ],\n \"templateImageUrls\": [\n \"<string>\"\n ],\n \"expression\": \"auto\",\n \"variations\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mvp.tryunsora.com/api/v1/thumbnails/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 \"context\": [\n {\n \"content\": \"<string>\"\n }\n ],\n \"referenceImageUrls\": [\n \"<string>\"\n ],\n \"templateImageUrls\": [\n \"<string>\"\n ],\n \"expression\": \"auto\",\n \"variations\": 1\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"generations": [
{
"id": "<string>",
"status": "<string>"
}
],
"creditsDeducted": 123,
"creditsRemaining": 123
}{
"error": "<string>",
"success": true,
"code": "<string>",
"message": "<string>"
}{
"error": "<string>",
"success": true,
"code": "<string>",
"message": "<string>"
}Pass YouTube URL in
context for YouTube thumbnail mode:
{
"prompt": "Bold title, shocked face",
"context": [{ "type": "youtube", "content": "https://youtube.com/watch?v=..." }],
"variations": 3
}
context takes exactly one item: a YouTube link (youtube) or a public PDF (document). With more than one item, or a link that doesn’t match its type, the context is ignored without an error, so check the item before you send it. label works in place of content.
Each variation is a separate job and costs 12 credits. variations outside 1–20 is clamped, and an unknown expression falls back to auto. Poll each id with Poll image status.Authorizations
Headers
API key requests only. Retrying with the same key within 24 hours replays the first response (with the Idempotent-Replayed: true header) instead of charging again. The body isn't compared; reusing the key on a different endpoint returns 409 IDEMPOTENCY_CONFLICT. Keys over 128 characters are ignored.
Maximum string length:
128Body
application/json

