cURL
curl --request POST \
--url https://api.opus.pro/api/social-copy-jobs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"projectId": "P0000000demo",
"clipId": "CUexample1",
"postAccountId": "postAccountId_xxx1",
"subAccountId": "subAccountId_xxx1",
"prompt": "Write the caption in a playful, witty tone that uses humor to keep the audience engaged, while ending with a clear call to action.",
"forceRegenerate": false
}
'import requests
url = "https://api.opus.pro/api/social-copy-jobs"
payload = {
"projectId": "P0000000demo",
"clipId": "CUexample1",
"postAccountId": "postAccountId_xxx1",
"subAccountId": "subAccountId_xxx1",
"prompt": "Write the caption in a playful, witty tone that uses humor to keep the audience engaged, while ending with a clear call to action.",
"forceRegenerate": False
}
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({
projectId: 'P0000000demo',
clipId: 'CUexample1',
postAccountId: 'postAccountId_xxx1',
subAccountId: 'subAccountId_xxx1',
prompt: 'Write the caption in a playful, witty tone that uses humor to keep the audience engaged, while ending with a clear call to action.',
forceRegenerate: false
})
};
fetch('https://api.opus.pro/api/social-copy-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/social-copy-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([
'projectId' => 'P0000000demo',
'clipId' => 'CUexample1',
'postAccountId' => 'postAccountId_xxx1',
'subAccountId' => 'subAccountId_xxx1',
'prompt' => 'Write the caption in a playful, witty tone that uses humor to keep the audience engaged, while ending with a clear call to action.',
'forceRegenerate' => false
]),
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/social-copy-jobs"
payload := strings.NewReader("{\n \"projectId\": \"P0000000demo\",\n \"clipId\": \"CUexample1\",\n \"postAccountId\": \"postAccountId_xxx1\",\n \"subAccountId\": \"subAccountId_xxx1\",\n \"prompt\": \"Write the caption in a playful, witty tone that uses humor to keep the audience engaged, while ending with a clear call to action.\",\n \"forceRegenerate\": false\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/social-copy-jobs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"projectId\": \"P0000000demo\",\n \"clipId\": \"CUexample1\",\n \"postAccountId\": \"postAccountId_xxx1\",\n \"subAccountId\": \"subAccountId_xxx1\",\n \"prompt\": \"Write the caption in a playful, witty tone that uses humor to keep the audience engaged, while ending with a clear call to action.\",\n \"forceRegenerate\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opus.pro/api/social-copy-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 \"projectId\": \"P0000000demo\",\n \"clipId\": \"CUexample1\",\n \"postAccountId\": \"postAccountId_xxx1\",\n \"subAccountId\": \"subAccountId_xxx1\",\n \"prompt\": \"Write the caption in a playful, witty tone that uses humor to keep the audience engaged, while ending with a clear call to action.\",\n \"forceRegenerate\": false\n}"
response = http.request(request)
puts response.read_body{
"data": {
"jobId": "96e3d68c-49ef-4c19-b3b6-595f9564537c"
}
}Social Posting
Create a Social Copy Generation Job
You can start a social copy generation job by making a POST request to https://api.opus.pro/api/social-copy-jobs.
POST
/
api
/
social-copy-jobs
cURL
curl --request POST \
--url https://api.opus.pro/api/social-copy-jobs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"projectId": "P0000000demo",
"clipId": "CUexample1",
"postAccountId": "postAccountId_xxx1",
"subAccountId": "subAccountId_xxx1",
"prompt": "Write the caption in a playful, witty tone that uses humor to keep the audience engaged, while ending with a clear call to action.",
"forceRegenerate": false
}
'import requests
url = "https://api.opus.pro/api/social-copy-jobs"
payload = {
"projectId": "P0000000demo",
"clipId": "CUexample1",
"postAccountId": "postAccountId_xxx1",
"subAccountId": "subAccountId_xxx1",
"prompt": "Write the caption in a playful, witty tone that uses humor to keep the audience engaged, while ending with a clear call to action.",
"forceRegenerate": False
}
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({
projectId: 'P0000000demo',
clipId: 'CUexample1',
postAccountId: 'postAccountId_xxx1',
subAccountId: 'subAccountId_xxx1',
prompt: 'Write the caption in a playful, witty tone that uses humor to keep the audience engaged, while ending with a clear call to action.',
forceRegenerate: false
})
};
fetch('https://api.opus.pro/api/social-copy-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/social-copy-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([
'projectId' => 'P0000000demo',
'clipId' => 'CUexample1',
'postAccountId' => 'postAccountId_xxx1',
'subAccountId' => 'subAccountId_xxx1',
'prompt' => 'Write the caption in a playful, witty tone that uses humor to keep the audience engaged, while ending with a clear call to action.',
'forceRegenerate' => false
]),
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/social-copy-jobs"
payload := strings.NewReader("{\n \"projectId\": \"P0000000demo\",\n \"clipId\": \"CUexample1\",\n \"postAccountId\": \"postAccountId_xxx1\",\n \"subAccountId\": \"subAccountId_xxx1\",\n \"prompt\": \"Write the caption in a playful, witty tone that uses humor to keep the audience engaged, while ending with a clear call to action.\",\n \"forceRegenerate\": false\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/social-copy-jobs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"projectId\": \"P0000000demo\",\n \"clipId\": \"CUexample1\",\n \"postAccountId\": \"postAccountId_xxx1\",\n \"subAccountId\": \"subAccountId_xxx1\",\n \"prompt\": \"Write the caption in a playful, witty tone that uses humor to keep the audience engaged, while ending with a clear call to action.\",\n \"forceRegenerate\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opus.pro/api/social-copy-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 \"projectId\": \"P0000000demo\",\n \"clipId\": \"CUexample1\",\n \"postAccountId\": \"postAccountId_xxx1\",\n \"subAccountId\": \"subAccountId_xxx1\",\n \"prompt\": \"Write the caption in a playful, witty tone that uses humor to keep the audience engaged, while ending with a clear call to action.\",\n \"forceRegenerate\": false\n}"
response = http.request(request)
puts response.read_body{
"data": {
"jobId": "96e3d68c-49ef-4c19-b3b6-595f9564537c"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Project ID
Bare clip ID (e.g. CUexample1). Not the composite {projectId}.{clipId} form returned as id by GET /api/exportable-clips — pass only the part after the dot.
Unique ID of the connected social account record
Sub-account ID used by Facebook pages, Instagram business accounts, or LinkedIn
Custom style or tone instruction for generation
Whether to bypass the cached result and regenerate
Response
201 - application/json
Successfully created a social copy generation job
Show child attributes
Show child attributes
Was this page helpful?
⌘I