Videos
Aumenta la resolución de un vídeo de Runway
Aumenta la resolución de un vídeo mediante CometAPI con Magnific, eligiendo una resolución de salida de 720p a 4k y controles de detalle opcionales.
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>"
}
}Usa
Omite un control numérico para usar el valor predeterminado del modelo. Un valor de
magnific_video_upscaler_creative para aumentar la resolución de un vídeo de origen. La solicitud
devuelve un id de tarea para recuperar el resultado finalizado.
Prepara la solicitud
- Autentícate con tu clave de API de CometAPI.
- Establece
modelenmagnific_video_upscaler_creativey proporcionavideoUripara un vídeo de hasta 30 segundos. - Sustituye la URL de vídeo de ejemplo por una URL HTTPS accesible.
videoUritambién acepta un URI de datos de vídeo Base64 con un tamaño codificado de hasta 5 MB. - Elige
resolution:720p,1k,2ko4k. Omite el campo para2k.
Ajusta la mejora
| Campo | Cómo usarlo |
|---|---|
creativity | Cantidad de detalle generado que se añade, desde 1 hasta 100. |
sharpen | Intensidad de nitidez, desde 1 hasta 100. |
smartGrain | Intensidad de mejora de grano y textura, desde 1 hasta 100. |
flavor | vivid enfatiza el color y el detalle; natural favorece una reproducción fiel. |
fpsBoost | Establece true para solicitar una mayor velocidad de fotogramas de salida. |
0 se considera
una omisión, por lo que no selecciona explícitamente intensidad cero. Del mismo modo,
fpsBoost: false se considera una omisión y no desactiva explícitamente
la mejora de la velocidad de fotogramas. Omite los campos opcionales en lugar de enviar null.
Recupera el resultado
Guarda elid devuelto y usa
Obtener una tarea de Runway para recuperar el estado de la tarea.
Cuando status sea SUCCEEDED, lee las URL del resultado en output. Si la tarea
falla, inspecciona failure y failureCode cuando estén presentes.Cuerpo
application/json
Magnific video-upscaling request.
Respuesta
The task was created. Save its id for task retrieval.
Última modificación el 21 de septiembre de 2026
⌘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>"
}
}