Skip to main content
POST
/
api
/
generative-jobs
Create a thumbnail generation job
curl --request POST \
  --url https://api.opus.pro/api/generative-jobs \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "jobType": "thumbnail",
  "sourceUri": "https://youtube.com/watch?v=...",
  "referenceImageUri": "https://cdn.opus.pro/uploads/.../ref.png",
  "maskImageUri": "https://cdn.opus.pro/uploads/.../mask.png",
  "prompt": "punchy red overlay, bold sans-serif title"
}
'
import requests

url = "https://api.opus.pro/api/generative-jobs"

payload = {
"jobType": "thumbnail",
"sourceUri": "https://youtube.com/watch?v=...",
"referenceImageUri": "https://cdn.opus.pro/uploads/.../ref.png",
"maskImageUri": "https://cdn.opus.pro/uploads/.../mask.png",
"prompt": "punchy red overlay, bold sans-serif title"
}
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({
jobType: 'thumbnail',
sourceUri: 'https://youtube.com/watch?v=...',
referenceImageUri: 'https://cdn.opus.pro/uploads/.../ref.png',
maskImageUri: 'https://cdn.opus.pro/uploads/.../mask.png',
prompt: 'punchy red overlay, bold sans-serif title'
})
};

fetch('https://api.opus.pro/api/generative-jobs', 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.opus.pro/api/generative-jobs",
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([
'jobType' => 'thumbnail',
'sourceUri' => 'https://youtube.com/watch?v=...',
'referenceImageUri' => 'https://cdn.opus.pro/uploads/.../ref.png',
'maskImageUri' => 'https://cdn.opus.pro/uploads/.../mask.png',
'prompt' => 'punchy red overlay, bold sans-serif title'
]),
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.opus.pro/api/generative-jobs"

payload := strings.NewReader("{\n \"jobType\": \"thumbnail\",\n \"sourceUri\": \"https://youtube.com/watch?v=...\",\n \"referenceImageUri\": \"https://cdn.opus.pro/uploads/.../ref.png\",\n \"maskImageUri\": \"https://cdn.opus.pro/uploads/.../mask.png\",\n \"prompt\": \"punchy red overlay, bold sans-serif title\"\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.opus.pro/api/generative-jobs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"jobType\": \"thumbnail\",\n \"sourceUri\": \"https://youtube.com/watch?v=...\",\n \"referenceImageUri\": \"https://cdn.opus.pro/uploads/.../ref.png\",\n \"maskImageUri\": \"https://cdn.opus.pro/uploads/.../mask.png\",\n \"prompt\": \"punchy red overlay, bold sans-serif title\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.opus.pro/api/generative-jobs")

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 \"jobType\": \"thumbnail\",\n \"sourceUri\": \"https://youtube.com/watch?v=...\",\n \"referenceImageUri\": \"https://cdn.opus.pro/uploads/.../ref.png\",\n \"maskImageUri\": \"https://cdn.opus.pro/uploads/.../mask.png\",\n \"prompt\": \"punchy red overlay, bold sans-serif title\"\n}"

response = http.request(request)
puts response.read_body
{
  "jobId": "thumbnail-aB3xR7nQ8z"
}
Experimental. Subject to change; daily caps apply and the endpoint may be temporarily disabled via a runtime kill switch. Currently published jobType: thumbnail.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
jobType
enum<string>
required

The type of generative job to create. Currently the only published value is thumbnail.

Available options:
thumbnail
sourceUri
string
required

URL of the source video to extract thumbnails from.

Example:

"https://youtube.com/watch?v=..."

referenceImageUri
string

Optional reference image URL. The thumbnail composition draws stylistic cues from this image. Upload via POST /api/upload-links with usecase: 'FreeToolMedia', then pass the returned cdnUrl here.

Example:

"https://cdn.opus.pro/uploads/.../ref.png"

maskImageUri
string

Optional mask image URL for inpainting.

Example:

"https://cdn.opus.pro/uploads/.../mask.png"

prompt
string

Optional text prompt steering the thumbnail composition.

Example:

"punchy red overlay, bold sans-serif title"

Response

201 - application/json
jobId
string
required

The generated job ID. Use it with GET /api/generative-jobs/{jobId} to poll status and fetch results.

Example:

"thumbnail-aB3xR7nQ8z"