视频生视频
curl --request POST \
--url https://api.omniall.ai/runwayml/v1/video_to_video \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"videoUri": "https://example.com/video.mp4",
"promptText": "保持运动,重绘为霓虹赛博朋克风格",
"ratio": "1280:720",
"seed": 4294967295,
"references": [
{
"type": "image",
"uri": "https://example.com/image.jpg"
}
],
"contentModeration": {
"publicFigureThreshold": "auto"
},
"model": "gen4_aleph"
}
'import requests
url = "https://api.omniall.ai/runwayml/v1/video_to_video"
payload = {
"videoUri": "https://example.com/video.mp4",
"promptText": "保持运动,重绘为霓虹赛博朋克风格",
"ratio": "1280:720",
"seed": 4294967295,
"references": [
{
"type": "image",
"uri": "https://example.com/image.jpg"
}
],
"contentModeration": { "publicFigureThreshold": "auto" },
"model": "gen4_aleph"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
videoUri: 'https://example.com/video.mp4',
promptText: '保持运动,重绘为霓虹赛博朋克风格',
ratio: '1280:720',
seed: 4294967295,
references: [{type: 'image', uri: 'https://example.com/image.jpg'}],
contentModeration: {publicFigureThreshold: 'auto'},
model: 'gen4_aleph'
})
};
fetch('https://api.omniall.ai/runwayml/v1/video_to_video', 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.omniall.ai/runwayml/v1/video_to_video",
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([
'videoUri' => 'https://example.com/video.mp4',
'promptText' => '保持运动,重绘为霓虹赛博朋克风格',
'ratio' => '1280:720',
'seed' => 4294967295,
'references' => [
[
'type' => 'image',
'uri' => 'https://example.com/image.jpg'
]
],
'contentModeration' => [
'publicFigureThreshold' => 'auto'
],
'model' => 'gen4_aleph'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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.omniall.ai/runwayml/v1/video_to_video"
payload := strings.NewReader("{\n \"videoUri\": \"https://example.com/video.mp4\",\n \"promptText\": \"保持运动,重绘为霓虹赛博朋克风格\",\n \"ratio\": \"1280:720\",\n \"seed\": 4294967295,\n \"references\": [\n {\n \"type\": \"image\",\n \"uri\": \"https://example.com/image.jpg\"\n }\n ],\n \"contentModeration\": {\n \"publicFigureThreshold\": \"auto\"\n },\n \"model\": \"gen4_aleph\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.omniall.ai/runwayml/v1/video_to_video")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"videoUri\": \"https://example.com/video.mp4\",\n \"promptText\": \"保持运动,重绘为霓虹赛博朋克风格\",\n \"ratio\": \"1280:720\",\n \"seed\": 4294967295,\n \"references\": [\n {\n \"type\": \"image\",\n \"uri\": \"https://example.com/image.jpg\"\n }\n ],\n \"contentModeration\": {\n \"publicFigureThreshold\": \"auto\"\n },\n \"model\": \"gen4_aleph\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omniall.ai/runwayml/v1/video_to_video")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"videoUri\": \"https://example.com/video.mp4\",\n \"promptText\": \"保持运动,重绘为霓虹赛博朋克风格\",\n \"ratio\": \"1280:720\",\n \"seed\": 4294967295,\n \"references\": [\n {\n \"type\": \"image\",\n \"uri\": \"https://example.com/image.jpg\"\n }\n ],\n \"contentModeration\": {\n \"publicFigureThreshold\": \"auto\"\n },\n \"model\": \"gen4_aleph\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "<string>",
"createdAt": "<string>",
"output": [
"<string>"
],
"progress": 123,
"failure": "<string>",
"failureReason": "<string>"
}官方格式
视频生视频(官方)
官方格式视频生视频。
路径: POST https://api.omniall.ai/runwayml/v1/video_to_video
鉴权:Authorization: Bearer sk-...
POST
/
runwayml
/
v1
/
video_to_video
视频生视频
curl --request POST \
--url https://api.omniall.ai/runwayml/v1/video_to_video \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"videoUri": "https://example.com/video.mp4",
"promptText": "保持运动,重绘为霓虹赛博朋克风格",
"ratio": "1280:720",
"seed": 4294967295,
"references": [
{
"type": "image",
"uri": "https://example.com/image.jpg"
}
],
"contentModeration": {
"publicFigureThreshold": "auto"
},
"model": "gen4_aleph"
}
'import requests
url = "https://api.omniall.ai/runwayml/v1/video_to_video"
payload = {
"videoUri": "https://example.com/video.mp4",
"promptText": "保持运动,重绘为霓虹赛博朋克风格",
"ratio": "1280:720",
"seed": 4294967295,
"references": [
{
"type": "image",
"uri": "https://example.com/image.jpg"
}
],
"contentModeration": { "publicFigureThreshold": "auto" },
"model": "gen4_aleph"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
videoUri: 'https://example.com/video.mp4',
promptText: '保持运动,重绘为霓虹赛博朋克风格',
ratio: '1280:720',
seed: 4294967295,
references: [{type: 'image', uri: 'https://example.com/image.jpg'}],
contentModeration: {publicFigureThreshold: 'auto'},
model: 'gen4_aleph'
})
};
fetch('https://api.omniall.ai/runwayml/v1/video_to_video', 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.omniall.ai/runwayml/v1/video_to_video",
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([
'videoUri' => 'https://example.com/video.mp4',
'promptText' => '保持运动,重绘为霓虹赛博朋克风格',
'ratio' => '1280:720',
'seed' => 4294967295,
'references' => [
[
'type' => 'image',
'uri' => 'https://example.com/image.jpg'
]
],
'contentModeration' => [
'publicFigureThreshold' => 'auto'
],
'model' => 'gen4_aleph'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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.omniall.ai/runwayml/v1/video_to_video"
payload := strings.NewReader("{\n \"videoUri\": \"https://example.com/video.mp4\",\n \"promptText\": \"保持运动,重绘为霓虹赛博朋克风格\",\n \"ratio\": \"1280:720\",\n \"seed\": 4294967295,\n \"references\": [\n {\n \"type\": \"image\",\n \"uri\": \"https://example.com/image.jpg\"\n }\n ],\n \"contentModeration\": {\n \"publicFigureThreshold\": \"auto\"\n },\n \"model\": \"gen4_aleph\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.omniall.ai/runwayml/v1/video_to_video")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"videoUri\": \"https://example.com/video.mp4\",\n \"promptText\": \"保持运动,重绘为霓虹赛博朋克风格\",\n \"ratio\": \"1280:720\",\n \"seed\": 4294967295,\n \"references\": [\n {\n \"type\": \"image\",\n \"uri\": \"https://example.com/image.jpg\"\n }\n ],\n \"contentModeration\": {\n \"publicFigureThreshold\": \"auto\"\n },\n \"model\": \"gen4_aleph\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omniall.ai/runwayml/v1/video_to_video")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"videoUri\": \"https://example.com/video.mp4\",\n \"promptText\": \"保持运动,重绘为霓虹赛博朋克风格\",\n \"ratio\": \"1280:720\",\n \"seed\": 4294967295,\n \"references\": [\n {\n \"type\": \"image\",\n \"uri\": \"https://example.com/image.jpg\"\n }\n ],\n \"contentModeration\": {\n \"publicFigureThreshold\": \"auto\"\n },\n \"model\": \"gen4_aleph\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "<string>",
"createdAt": "<string>",
"output": [
"<string>"
],
"progress": 123,
"failure": "<string>",
"failureReason": "<string>"
}请求头
Bearer API Key。
示例:
"Bearer sk-..."
请求体
application/json