Videolar
Bir Runway karakter performansı oluşturun
Bir karakter görseli veya videosu ve referans performans klibi kullanarak CometAPI aracılığıyla bir Runway Act-Two karakter performansı görevi oluşturun.
POST
/
runwayml
/
v1
/
character_performance
cURL
curl --request POST \
--url https://api.cometapi.com/runwayml/v1/character_performance \
--header "Authorization: Bearer $COMETAPI_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "act_two",
"character": {
"type": "image",
"uri": "https://example.com/character.jpg"
},
"reference": {
"type": "video",
"uri": "https://example.com/performance.mp4"
},
"bodyControl": true,
"expressionIntensity": 3
}'import os
import requests
response = requests.post(
"https://api.cometapi.com/runwayml/v1/character_performance",
headers={"Authorization": f"Bearer {os.environ['COMETAPI_KEY']}"},
json={
"model": "act_two",
"character": {
"type": "image",
"uri": "https://example.com/character.jpg"
},
"reference": {
"type": "video",
"uri": "https://example.com/performance.mp4"
},
"bodyControl": True,
"expressionIntensity": 3
},
)
response.raise_for_status()
print(response.json())const response = await fetch(
"https://api.cometapi.com/runwayml/v1/character_performance",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.COMETAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "act_two",
"character": {
"type": "image",
"uri": "https://example.com/character.jpg"
},
"reference": {
"type": "video",
"uri": "https://example.com/performance.mp4"
},
"bodyControl": true,
"expressionIntensity": 3
}),
},
);
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cometapi.com/runwayml/v1/character_performance",
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([
'model' => 'act_two',
'character' => [
'type' => 'image',
'uri' => 'https://example.com/character.jpg'
],
'reference' => [
'type' => 'video',
'uri' => 'https://example.com/performance.mp4'
]
]),
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.cometapi.com/runwayml/v1/character_performance"
payload := strings.NewReader("{\n \"model\": \"act_two\",\n \"character\": {\n \"type\": \"image\",\n \"uri\": \"https://example.com/character.jpg\"\n },\n \"reference\": {\n \"type\": \"video\",\n \"uri\": \"https://example.com/performance.mp4\"\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://api.cometapi.com/runwayml/v1/character_performance")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"act_two\",\n \"character\": {\n \"type\": \"image\",\n \"uri\": \"https://example.com/character.jpg\"\n },\n \"reference\": {\n \"type\": \"video\",\n \"uri\": \"https://example.com/performance.mp4\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cometapi.com/runwayml/v1/character_performance")
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 \"model\": \"act_two\",\n \"character\": {\n \"type\": \"image\",\n \"uri\": \"https://example.com/character.jpg\"\n },\n \"reference\": {\n \"type\": \"video\",\n \"uri\": \"https://example.com/performance.mp4\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "00000000-0000-4000-8000-000000000000"
}{
"code": "<string>",
"message": "<string>",
"data": "<unknown>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}Bir referans videosunun performansını bir karakter görseline uygulamak için
act_two kullanın
veya videoya uygulamak için kullanın. İstek, tamamlanan çıktıyı almak için bir görev id döndürür.
Varlıkları hazırlayın
- CometAPI API anahtarınızla kimlik doğrulaması yapın.
modeldeğeriniact_twoolarak ayarlayın.- Varlık şu konumda olacak şekilde
character.typedeğeriniimageveyavideoolarak sağlayıncharacter.uri. Tanınabilir bir yüzü görünür ve çerçevenin içinde tutun. reference.typedeğerinivideoolarak, 3 ila 30 saniyelik bir performans klibiylereference.uriiçinde sağlayın.- Örnek medya URL’lerini erişilebilir HTTPS URL’leriyle değiştirin. Medya alanları ayrıca kodlanmış boyutu 5 MB’a kadar olan Base64 veri URI’lerini kabul eder.
Performansı yapılandırın
Yalnızcamodel, character ve reference gereklidir.
| Alan | Kullanım şekli |
|---|---|
bodyControl | Yüz ifadelerine ek olarak vücut hareketleri ve jestler istemek için true değerini ayarlayın. Ayarı belirtilmemiş bırakmak için atlayın. |
expressionIntensity | 1 ile 5 arasında kullanın; daha yüksek değerler daha güçlü ifadeler ister. Şunun için atlayın: 3. |
seed | Açık bir örnekleme başlangıç değeri için 1 ile 4294967295 arasında kullanın. Rastgele bir başlangıç değeri için atlayın. |
contentModeration.publicFigureThreshold | Standart kamuya mal olmuş kişi tespiti için auto veya daha az kısıtlayıcı tespit için low kullanın. |
bodyControl: false atlama olarak değerlendirilir; bu nedenle vücut kontrolünü açıkça
devre dışı bırakmaz. seed ya da expressionIntensity için 0 değeri de
atlama olarak değerlendirilir. İsteğe bağlı alanları null göndermek yerine atlayın.
İsteğe bağlı ratio değerleri 1280:720,
720:1280, 960:960, 1104:832, 832:1104veya 1584:672 olabilir.
Sonucu alın
Döndürülenid değerini kaydedin ve
Runway görevi alma işlemini görev durumunu almak için kullanın.
status, SUCCEEDED olduğunda, sonuç URL’lerini output içinden okuyun. Görev
başarısız olursa, mevcut olduğunda failure ve failureCode öğelerini inceleyin.Gövde
application/json
Act-Two character-performance request.
Yanıt
The task was created. Save its id for task retrieval.
Son değiştirilme tarihi 21 Eylül 2026
⌘I
cURL
curl --request POST \
--url https://api.cometapi.com/runwayml/v1/character_performance \
--header "Authorization: Bearer $COMETAPI_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "act_two",
"character": {
"type": "image",
"uri": "https://example.com/character.jpg"
},
"reference": {
"type": "video",
"uri": "https://example.com/performance.mp4"
},
"bodyControl": true,
"expressionIntensity": 3
}'import os
import requests
response = requests.post(
"https://api.cometapi.com/runwayml/v1/character_performance",
headers={"Authorization": f"Bearer {os.environ['COMETAPI_KEY']}"},
json={
"model": "act_two",
"character": {
"type": "image",
"uri": "https://example.com/character.jpg"
},
"reference": {
"type": "video",
"uri": "https://example.com/performance.mp4"
},
"bodyControl": True,
"expressionIntensity": 3
},
)
response.raise_for_status()
print(response.json())const response = await fetch(
"https://api.cometapi.com/runwayml/v1/character_performance",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.COMETAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "act_two",
"character": {
"type": "image",
"uri": "https://example.com/character.jpg"
},
"reference": {
"type": "video",
"uri": "https://example.com/performance.mp4"
},
"bodyControl": true,
"expressionIntensity": 3
}),
},
);
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cometapi.com/runwayml/v1/character_performance",
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([
'model' => 'act_two',
'character' => [
'type' => 'image',
'uri' => 'https://example.com/character.jpg'
],
'reference' => [
'type' => 'video',
'uri' => 'https://example.com/performance.mp4'
]
]),
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.cometapi.com/runwayml/v1/character_performance"
payload := strings.NewReader("{\n \"model\": \"act_two\",\n \"character\": {\n \"type\": \"image\",\n \"uri\": \"https://example.com/character.jpg\"\n },\n \"reference\": {\n \"type\": \"video\",\n \"uri\": \"https://example.com/performance.mp4\"\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://api.cometapi.com/runwayml/v1/character_performance")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"act_two\",\n \"character\": {\n \"type\": \"image\",\n \"uri\": \"https://example.com/character.jpg\"\n },\n \"reference\": {\n \"type\": \"video\",\n \"uri\": \"https://example.com/performance.mp4\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cometapi.com/runwayml/v1/character_performance")
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 \"model\": \"act_two\",\n \"character\": {\n \"type\": \"image\",\n \"uri\": \"https://example.com/character.jpg\"\n },\n \"reference\": {\n \"type\": \"video\",\n \"uri\": \"https://example.com/performance.mp4\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "00000000-0000-4000-8000-000000000000"
}{
"code": "<string>",
"message": "<string>",
"data": "<unknown>"
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}