create role task
curl --request POST \
--url https://api.mountsea.ai/sora/role/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"videoUrl": "https://example.com/example.mp4",
"name": "mikeniuniu",
"displayName": "display name of the role",
"description": "description of the role",
"instructionText": "instruction text of the role",
"safetyInstructionText": "safety instruction text of the role"
}
'import requests
url = "https://api.mountsea.ai/sora/role/create"
payload = {
"videoUrl": "https://example.com/example.mp4",
"name": "mikeniuniu",
"displayName": "display name of the role",
"description": "description of the role",
"instructionText": "instruction text of the role",
"safetyInstructionText": "safety instruction text of the role"
}
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({
videoUrl: 'https://example.com/example.mp4',
name: 'mikeniuniu',
displayName: 'display name of the role',
description: 'description of the role',
instructionText: 'instruction text of the role',
safetyInstructionText: 'safety instruction text of the role'
})
};
fetch('https://api.mountsea.ai/sora/role/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://api.mountsea.ai/sora/role/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([
'videoUrl' => 'https://example.com/example.mp4',
'name' => 'mikeniuniu',
'displayName' => 'display name of the role',
'description' => 'description of the role',
'instructionText' => 'instruction text of the role',
'safetyInstructionText' => 'safety instruction text of the role'
]),
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.mountsea.ai/sora/role/create"
payload := strings.NewReader("{\n \"videoUrl\": \"https://example.com/example.mp4\",\n \"name\": \"mikeniuniu\",\n \"displayName\": \"display name of the role\",\n \"description\": \"description of the role\",\n \"instructionText\": \"instruction text of the role\",\n \"safetyInstructionText\": \"safety instruction text of the role\"\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.mountsea.ai/sora/role/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"videoUrl\": \"https://example.com/example.mp4\",\n \"name\": \"mikeniuniu\",\n \"displayName\": \"display name of the role\",\n \"description\": \"description of the role\",\n \"instructionText\": \"instruction text of the role\",\n \"safetyInstructionText\": \"safety instruction text of the role\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mountsea.ai/sora/role/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 \"videoUrl\": \"https://example.com/example.mp4\",\n \"name\": \"mikeniuniu\",\n \"displayName\": \"display name of the role\",\n \"description\": \"description of the role\",\n \"instructionText\": \"instruction text of the role\",\n \"safetyInstructionText\": \"safety instruction text of the role\"\n}"
response = http.request(request)
puts response.read_body{
"taskId": "<string>"
}{
"taskId": "<string>"
}Sora2 (Unavailable)
sora create role
create role task
POST
/
sora
/
role
/
create
create role task
curl --request POST \
--url https://api.mountsea.ai/sora/role/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"videoUrl": "https://example.com/example.mp4",
"name": "mikeniuniu",
"displayName": "display name of the role",
"description": "description of the role",
"instructionText": "instruction text of the role",
"safetyInstructionText": "safety instruction text of the role"
}
'import requests
url = "https://api.mountsea.ai/sora/role/create"
payload = {
"videoUrl": "https://example.com/example.mp4",
"name": "mikeniuniu",
"displayName": "display name of the role",
"description": "description of the role",
"instructionText": "instruction text of the role",
"safetyInstructionText": "safety instruction text of the role"
}
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({
videoUrl: 'https://example.com/example.mp4',
name: 'mikeniuniu',
displayName: 'display name of the role',
description: 'description of the role',
instructionText: 'instruction text of the role',
safetyInstructionText: 'safety instruction text of the role'
})
};
fetch('https://api.mountsea.ai/sora/role/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://api.mountsea.ai/sora/role/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([
'videoUrl' => 'https://example.com/example.mp4',
'name' => 'mikeniuniu',
'displayName' => 'display name of the role',
'description' => 'description of the role',
'instructionText' => 'instruction text of the role',
'safetyInstructionText' => 'safety instruction text of the role'
]),
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.mountsea.ai/sora/role/create"
payload := strings.NewReader("{\n \"videoUrl\": \"https://example.com/example.mp4\",\n \"name\": \"mikeniuniu\",\n \"displayName\": \"display name of the role\",\n \"description\": \"description of the role\",\n \"instructionText\": \"instruction text of the role\",\n \"safetyInstructionText\": \"safety instruction text of the role\"\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.mountsea.ai/sora/role/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"videoUrl\": \"https://example.com/example.mp4\",\n \"name\": \"mikeniuniu\",\n \"displayName\": \"display name of the role\",\n \"description\": \"description of the role\",\n \"instructionText\": \"instruction text of the role\",\n \"safetyInstructionText\": \"safety instruction text of the role\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mountsea.ai/sora/role/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 \"videoUrl\": \"https://example.com/example.mp4\",\n \"name\": \"mikeniuniu\",\n \"displayName\": \"display name of the role\",\n \"description\": \"description of the role\",\n \"instructionText\": \"instruction text of the role\",\n \"safetyInstructionText\": \"safety instruction text of the role\"\n}"
response = http.request(request)
puts response.read_body{
"taskId": "<string>"
}{
"taskId": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
video url of the role,not longer than 3 seconds
Example:
"https://example.com/example.mp4"
name of the role,must be unique
Example:
"mikeniuniu"
display name of the role
Example:
"display name of the role"
description of the role
Example:
"description of the role"
instruction text of the role
Example:
"instruction text of the role"
safety instruction text of the role
Example:
"safety instruction text of the role"
Response
Role task created successfully
task id, used to get task result later
⌘I