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
}動画の状態を取得
動画生成リクエストの状態を取得します。Webhookを使用していない場合は20秒ごとにポーリングしてください。
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
}承認
Bearer トークンによる認証
パスパラメータ
動画生成リクエストのID。
レスポンス
動画状態のレスポンス
非同期ジョブの正規化されたライフサイクル更新を購読するWebSocket URL。
queued, processing, completed, failed, cancelled, expired ポーリング、WebSocket、Webhookの利用側向けに正規化された非同期ライフサイクル状態。
pending, running, completed, failed, cancelled, expired 互換性のために予約されています。現在は常にnullです。
bytes, signed_url, both ゲートウェイが所有するIDと異なる場合の、プロバイダー固有の動画/ジョブID。
"video"
20
output_accessにbytesが含まれる場合に存在します(認証が必要なエンドポイント)。
状態がcompletedの場合の、直接ダウンロード用のファーストパーティ署名付きURL。
署名付きdownload_urlが失効するUnixタイムスタンプ(秒)。
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
機密情報を除去した非同期Webhook設定と配信状態。シークレットは返されません。has_secretは署名付き配信が有効かを示します。署名付き配信にはx-phaseo-signature、x-phaseo-timestamp、x-phaseo-event-id、x-phaseo-event-type、x-phaseo-delivery-key、x-phaseo-attempt、x-phaseo-max-attemptsヘッダーが含まれます。
Show child attributes
Show child attributes
ユーザーWebhookの次回再試行のISOタイムスタンプ(キューに登録されている場合)。
Webhookの利用側に最後に送信した大まかな進捗区分。
直近のWebhook進捗区分が送信されたISOタイムスタンプ。
直近のWebhook送信試行のISOタイムスタンプ。
Show child attributes
Show child attributes