const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.phaseo.app/v1/videos/{video_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.phaseo.app/v1/videos/{video_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://api.phaseo.app/v1/videos/{video_id} \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.phaseo.app/v1/videos/{video_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.phaseo.app/v1/videos/{video_id}")
.header("Authorization", "Bearer <token>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.phaseo.app/v1/videos/{video_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.phaseo.app/v1/videos/{video_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"polling_url": "<string>",
"websocket_url": "<string>",
"model": "<string>",
"request_id": "<string>",
"session_id": "<string>",
"status": "queued",
"lifecycle_status": "pending",
"cancel_url": "<string>",
"output_access": "bytes",
"generation_id": "<string>",
"native_video_id": "<string>",
"created_at": 123,
"started_at": 123,
"completed_at": 123,
"object": "video",
"poll_after_seconds": 20,
"provider": "<string>",
"seconds": 123,
"size": "<string>",
"audio": true,
"content_url": "<string>",
"download_url": "<string>",
"expires_at": 123,
"progress": 123,
"progress_source": "<string>",
"asset": {
"id": "<string>",
"mime_type": "<string>",
"bytes": 123,
"sha256": "<string>",
"width": 123,
"height": 123,
"duration_seconds": 123
},
"outputs": [
{
"index": 123,
"mime_type": "<string>",
"bytes_available": true,
"content_url": "<string>",
"download_url": "<string>",
"expires_at": 123
}
],
"billing": {
"currency": "<string>",
"estimated_provider_cost": "<string>",
"estimated_user_cost": "<string>",
"settled_provider_cost": "<string>",
"settled_user_cost": "<string>",
"state": "pending",
"billable": true,
"total_nanos": 123,
"estimated_nanos": 123,
"reserved_nanos": 123,
"reservation_id": "<string>",
"reservation_status": "<string>",
"charge_reason": "<string>",
"charged": true,
"billed_at": "<string>"
},
"webhook": {
"url": "<string>",
"events": [
"<string>"
],
"has_secret": true,
"delivery": {
"total_attempts": 123,
"delivered_events": 123,
"delivered_event_types": [
"video.completed"
],
"pending_retries": 123,
"next_retry_at": "<string>",
"last_attempt_at": "<string>",
"last_attempt_status": "delivered",
"last_response_status": 123,
"last_delivered_at": "<string>",
"last_failure_at": "<string>",
"last_error_message": "<string>"
},
"attempts": [
{
"id": "<string>",
"delivery_key": "video.completed",
"event_type": "video.completed",
"status": "delivered",
"attempt_number": 123,
"max_attempts": 123,
"tried_at": "<string>",
"delivered_at": "<string>",
"next_retry_at": "<string>",
"response_status": 123,
"error_message": "<string>",
"response_body_preview": "<string>"
}
]
},
"next_webhook_retry_at": "<string>",
"last_webhook_progress": 123,
"last_webhook_progress_at": "<string>",
"last_webhook_dispatched_at": "<string>",
"usage": {
"cost": 123,
"is_byok": true
},
"error": null
}Obtener estado de vídeo
Obtiene el estado de una solicitud de generación de vídeo. Consulte cada 20 segundos salvo que use webhooks.
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.phaseo.app/v1/videos/{video_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.phaseo.app/v1/videos/{video_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://api.phaseo.app/v1/videos/{video_id} \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.phaseo.app/v1/videos/{video_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.phaseo.app/v1/videos/{video_id}")
.header("Authorization", "Bearer <token>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.phaseo.app/v1/videos/{video_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://api.phaseo.app/v1/videos/{video_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"polling_url": "<string>",
"websocket_url": "<string>",
"model": "<string>",
"request_id": "<string>",
"session_id": "<string>",
"status": "queued",
"lifecycle_status": "pending",
"cancel_url": "<string>",
"output_access": "bytes",
"generation_id": "<string>",
"native_video_id": "<string>",
"created_at": 123,
"started_at": 123,
"completed_at": 123,
"object": "video",
"poll_after_seconds": 20,
"provider": "<string>",
"seconds": 123,
"size": "<string>",
"audio": true,
"content_url": "<string>",
"download_url": "<string>",
"expires_at": 123,
"progress": 123,
"progress_source": "<string>",
"asset": {
"id": "<string>",
"mime_type": "<string>",
"bytes": 123,
"sha256": "<string>",
"width": 123,
"height": 123,
"duration_seconds": 123
},
"outputs": [
{
"index": 123,
"mime_type": "<string>",
"bytes_available": true,
"content_url": "<string>",
"download_url": "<string>",
"expires_at": 123
}
],
"billing": {
"currency": "<string>",
"estimated_provider_cost": "<string>",
"estimated_user_cost": "<string>",
"settled_provider_cost": "<string>",
"settled_user_cost": "<string>",
"state": "pending",
"billable": true,
"total_nanos": 123,
"estimated_nanos": 123,
"reserved_nanos": 123,
"reservation_id": "<string>",
"reservation_status": "<string>",
"charge_reason": "<string>",
"charged": true,
"billed_at": "<string>"
},
"webhook": {
"url": "<string>",
"events": [
"<string>"
],
"has_secret": true,
"delivery": {
"total_attempts": 123,
"delivered_events": 123,
"delivered_event_types": [
"video.completed"
],
"pending_retries": 123,
"next_retry_at": "<string>",
"last_attempt_at": "<string>",
"last_attempt_status": "delivered",
"last_response_status": 123,
"last_delivered_at": "<string>",
"last_failure_at": "<string>",
"last_error_message": "<string>"
},
"attempts": [
{
"id": "<string>",
"delivery_key": "video.completed",
"event_type": "video.completed",
"status": "delivered",
"attempt_number": 123,
"max_attempts": 123,
"tried_at": "<string>",
"delivered_at": "<string>",
"next_retry_at": "<string>",
"response_status": 123,
"error_message": "<string>",
"response_body_preview": "<string>"
}
]
},
"next_webhook_retry_at": "<string>",
"last_webhook_progress": 123,
"last_webhook_progress_at": "<string>",
"last_webhook_dispatched_at": "<string>",
"usage": {
"cost": 123,
"is_byok": true
},
"error": null
}Autorizaciones
Autenticación con token Bearer
Parámetros de ruta
ID de la solicitud de generación de vídeo.
Respuesta
Respuesta de estado del vídeo
URL de WebSocket para suscribirse a actualizaciones normalizadas del ciclo de vida de trabajos asíncronos.
queued, processing, completed, failed, cancelled, expired Estado normalizado del ciclo de vida asíncrono para consumidores de sondeo, WebSocket y webhooks.
pending, running, completed, failed, cancelled, expired Reservado por compatibilidad; actualmente siempre es null.
bytes, signed_url, both ID de vídeo/trabajo nativo del proveedor cuando difiere del ID propio de la pasarela.
"video"
20
Presente cuando output_access incluye bytes (endpoint autenticado).
URL firmada de primera parte para descarga directa cuando el estado es completed.
Marca de tiempo Unix (segundos) de caducidad de la download_url firmada.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Configuración depurada del webhook asíncrono y estado de entrega. Nunca se devuelven secretos; has_secret indica si las entregas firmadas están habilitadas. Las entregas firmadas incluyen las cabeceras x-phaseo-signature, x-phaseo-timestamp, x-phaseo-event-id, x-phaseo-event-type, x-phaseo-delivery-key, x-phaseo-attempt y x-phaseo-max-attempts.
Show child attributes
Show child attributes
Marca de tiempo ISO del próximo reintento programado del webhook del usuario, si está en cola.
Último intervalo aproximado de progreso enviado a los consumidores de webhooks.
Marca de tiempo ISO del envío del intervalo de progreso más reciente del webhook.
Marca de tiempo ISO del intento de envío del webhook más reciente.
Show child attributes
Show child attributes
¿Esta página le ayudó?