创建视频任务
curl --request POST \
--url https://api.maxapi.ai/runwayml/v1/image_to_video \
--header 'Content-Type: application/json' \
--data '
{
"promptImage": [
{
"uri": "https://xxx/res/img/open.png",
"position": "first"
},
{
"uri": "https://xxx/res/img/open.png",
"position": "last"
}
],
"seed": 4294967295,
"model": "gen4_turbo",
"promptText": "wave",
"watermark": false,
"duration": 5,
"ratio": "1280:768"
}
'import requests
url = "https://api.maxapi.ai/runwayml/v1/image_to_video"
payload = {
"promptImage": [
{
"uri": "https://xxx/res/img/open.png",
"position": "first"
},
{
"uri": "https://xxx/res/img/open.png",
"position": "last"
}
],
"seed": 4294967295,
"model": "gen4_turbo",
"promptText": "wave",
"watermark": False,
"duration": 5,
"ratio": "1280:768"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
promptImage: [
{uri: 'https://xxx/res/img/open.png', position: 'first'},
{uri: 'https://xxx/res/img/open.png', position: 'last'}
],
seed: 4294967295,
model: 'gen4_turbo',
promptText: 'wave',
watermark: false,
duration: 5,
ratio: '1280:768'
})
};
fetch('https://api.maxapi.ai/runwayml/v1/image_to_video', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.maxapi.ai/runwayml/v1/image_to_video"
payload := strings.NewReader("{\n \"promptImage\": [\n {\n \"uri\": \"https://xxx/res/img/open.png\",\n \"position\": \"first\"\n },\n {\n \"uri\": \"https://xxx/res/img/open.png\",\n \"position\": \"last\"\n }\n ],\n \"seed\": 4294967295,\n \"model\": \"gen4_turbo\",\n \"promptText\": \"wave\",\n \"watermark\": false,\n \"duration\": 5,\n \"ratio\": \"1280:768\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.maxapi.ai/runwayml/v1/image_to_video")
.header("Content-Type", "application/json")
.body("{\n \"promptImage\": [\n {\n \"uri\": \"https://xxx/res/img/open.png\",\n \"position\": \"first\"\n },\n {\n \"uri\": \"https://xxx/res/img/open.png\",\n \"position\": \"last\"\n }\n ],\n \"seed\": 4294967295,\n \"model\": \"gen4_turbo\",\n \"promptText\": \"wave\",\n \"watermark\": false,\n \"duration\": 5,\n \"ratio\": \"1280:768\"\n}")
.asString();{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}POST
https://api.maxapi.ai
/
runwayml
/
v1
/
image_to_video
创建视频任务
curl --request POST \
--url https://api.maxapi.ai/runwayml/v1/image_to_video \
--header 'Content-Type: application/json' \
--data '
{
"promptImage": [
{
"uri": "https://xxx/res/img/open.png",
"position": "first"
},
{
"uri": "https://xxx/res/img/open.png",
"position": "last"
}
],
"seed": 4294967295,
"model": "gen4_turbo",
"promptText": "wave",
"watermark": false,
"duration": 5,
"ratio": "1280:768"
}
'import requests
url = "https://api.maxapi.ai/runwayml/v1/image_to_video"
payload = {
"promptImage": [
{
"uri": "https://xxx/res/img/open.png",
"position": "first"
},
{
"uri": "https://xxx/res/img/open.png",
"position": "last"
}
],
"seed": 4294967295,
"model": "gen4_turbo",
"promptText": "wave",
"watermark": False,
"duration": 5,
"ratio": "1280:768"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
promptImage: [
{uri: 'https://xxx/res/img/open.png', position: 'first'},
{uri: 'https://xxx/res/img/open.png', position: 'last'}
],
seed: 4294967295,
model: 'gen4_turbo',
promptText: 'wave',
watermark: false,
duration: 5,
ratio: '1280:768'
})
};
fetch('https://api.maxapi.ai/runwayml/v1/image_to_video', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.maxapi.ai/runwayml/v1/image_to_video"
payload := strings.NewReader("{\n \"promptImage\": [\n {\n \"uri\": \"https://xxx/res/img/open.png\",\n \"position\": \"first\"\n },\n {\n \"uri\": \"https://xxx/res/img/open.png\",\n \"position\": \"last\"\n }\n ],\n \"seed\": 4294967295,\n \"model\": \"gen4_turbo\",\n \"promptText\": \"wave\",\n \"watermark\": false,\n \"duration\": 5,\n \"ratio\": \"1280:768\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.maxapi.ai/runwayml/v1/image_to_video")
.header("Content-Type", "application/json")
.body("{\n \"promptImage\": [\n {\n \"uri\": \"https://xxx/res/img/open.png\",\n \"position\": \"first\"\n },\n {\n \"uri\": \"https://xxx/res/img/open.png\",\n \"position\": \"last\"\n }\n ],\n \"seed\": 4294967295,\n \"model\": \"gen4_turbo\",\n \"promptText\": \"wave\",\n \"watermark\": false,\n \"duration\": 5,\n \"ratio\": \"1280:768\"\n}")
.asString();{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}请求头
请求体
application/json
响应
200 - application/json
任务创建成功,返回可用于查询状态的任务 ID。
用于查询任务状态的 Runway 任务 ID。