動画
Runway 動画をアップスケールする
CometAPI で Magnific を使用して動画をアップスケールし、出力解像度を720pから4kで選択し、必要に応じてディテール設定を調整します。
POST
/
runwayml
/
v1
/
video_upscale
cURL
curl --request POST \
--url https://api.cometapi.com/runwayml/v1/video_upscale \
--header "Authorization: Bearer $COMETAPI_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "magnific_video_upscaler_creative",
"videoUri": "https://example.com/source-video.mp4",
"resolution": "2k"
}'import os
import requests
response = requests.post(
"https://api.cometapi.com/runwayml/v1/video_upscale",
headers={"Authorization": f"Bearer {os.environ['COMETAPI_KEY']}"},
json={
"model": "magnific_video_upscaler_creative",
"videoUri": "https://example.com/source-video.mp4",
"resolution": "2k"
},
)
response.raise_for_status()
print(response.json())const response = await fetch(
"https://api.cometapi.com/runwayml/v1/video_upscale",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.COMETAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "magnific_video_upscaler_creative",
"videoUri": "https://example.com/source-video.mp4",
"resolution": "2k"
}),
},
);
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/video_upscale",
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' => 'magnific_video_upscaler_creative',
'videoUri' => 'https://example.com/source-video.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/video_upscale"
payload := strings.NewReader("{\n \"model\": \"magnific_video_upscaler_creative\",\n \"videoUri\": \"https://example.com/source-video.mp4\"\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/video_upscale")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"magnific_video_upscaler_creative\",\n \"videoUri\": \"https://example.com/source-video.mp4\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cometapi.com/runwayml/v1/video_upscale")
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\": \"magnific_video_upscaler_creative\",\n \"videoUri\": \"https://example.com/source-video.mp4\"\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>"
}
}ソース動画をアップスケールするには
モデルのデフォルトを使用するには、数値コントロールを省略します。
magnific_video_upscaler_creative を使用します。リクエストは
完了した出力を取得するためのタスク id を返します。
リクエストを準備する
- CometAPI API キーで認証します。
modelをmagnific_video_upscaler_creativeに設定し、videoUriには 最大30秒の動画を指定します。- 例の動画 URL をアクセス可能な HTTPS URL に置き換えます。
videoUriは エンコード後のサイズが最大5 MBのBase64動画データURIも受け入れます。 resolutionを選択します:720p、1k、2k、または4k。2kの場合はフィールドを省略します。
強化を調整する
| フィールド | 使用方法 |
|---|---|
creativity | 追加する生成ディテールの量。1 から 100. |
sharpen | シャープネスの強度。1 から 100. |
smartGrain | 粒状感とテクスチャの強化強度。1 から 100. |
flavor | vivid は色とディテールを強調し、natural は忠実な再現を優先します。 |
fpsBoost | 出力フレームレートを上げるには、true を設定します。 |
0 の値は
省略として扱われるため、強度を明示的にゼロに設定することはありません。同様に、
fpsBoost: false も省略として扱われ、
フレームレート強化を明示的に無効化しません。null を送信する代わりに、オプションのフィールドを省略してください。
結果を取得する
返されたid を保存し、
Runway タスクを取得する を使用してタスクのステータスを取得します。
status が SUCCEEDED になったら、output から結果の URL を読み取ります。タスクが
失敗した場合は、存在する failure と failureCode を確認します。ボディ
application/json
Magnific video-upscaling request.
レスポンス
The task was created. Save its id for task retrieval.
最終更新日 2026年9月21日
⌘I
cURL
curl --request POST \
--url https://api.cometapi.com/runwayml/v1/video_upscale \
--header "Authorization: Bearer $COMETAPI_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "magnific_video_upscaler_creative",
"videoUri": "https://example.com/source-video.mp4",
"resolution": "2k"
}'import os
import requests
response = requests.post(
"https://api.cometapi.com/runwayml/v1/video_upscale",
headers={"Authorization": f"Bearer {os.environ['COMETAPI_KEY']}"},
json={
"model": "magnific_video_upscaler_creative",
"videoUri": "https://example.com/source-video.mp4",
"resolution": "2k"
},
)
response.raise_for_status()
print(response.json())const response = await fetch(
"https://api.cometapi.com/runwayml/v1/video_upscale",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.COMETAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "magnific_video_upscaler_creative",
"videoUri": "https://example.com/source-video.mp4",
"resolution": "2k"
}),
},
);
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/video_upscale",
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' => 'magnific_video_upscaler_creative',
'videoUri' => 'https://example.com/source-video.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/video_upscale"
payload := strings.NewReader("{\n \"model\": \"magnific_video_upscaler_creative\",\n \"videoUri\": \"https://example.com/source-video.mp4\"\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/video_upscale")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"magnific_video_upscaler_creative\",\n \"videoUri\": \"https://example.com/source-video.mp4\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cometapi.com/runwayml/v1/video_upscale")
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\": \"magnific_video_upscaler_creative\",\n \"videoUri\": \"https://example.com/source-video.mp4\"\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>"
}
}