videostring
URL to the input video.
clarityai/crystal-video-upscalerCrystal Video Upscaler by ClarityAI enlarges an input video by a chosen scale factor (default 2×), as long as the upscaled result stays within 5K resolution.
モデルを試す
例を選択すると、その入力と結果がプレイグラウンドに読み込まれます。
{
"scale_factor": 2,
"video": "https://static.sandbase.ai/examples/db11180a-65a6-46b6-b12d-135cfcb5428f/input/dd70b287-08ea-4688-9ba7-b392ec9184bf.mp4"
}{
"scale_factor": 2,
"video": "https://static.sandbase.ai/examples/e2ad096b-d452-472c-ba75-e8a83ff48d46/input/a9b756b5-e9dc-452b-b48c-08c951b82761.mp4"
}開発を始める
このモデルをSandBase Unified Run API経由で送信します。
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"model": "clarityai/crystal-video-upscaler",
"video": "https://storage.googleapis.com/falserverless/example_inputs/crystal_upscaler/video_upscaling/video_in.mp4",
"scale_factor": 2
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
status=$(printf '%s' "$result" | jq -r .status)
case "$status" in completed|failed|timeout) break ;; esac
sleep 2
result=$(curl --fail-with-body --silent \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
"https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"SandBaseのAPIキーを作成し、サーバー環境に設定してください。すべてのリクエストはBearer認証を使用します。
export SANDBASE_API_KEY="YOUR_API_KEY"キーはサーバー側で管理してください。ブラウザコードに公開したり、リポジトリにコミットしたりしないでください。
このモデルIDと入力を使って /v1/run にPOSTしてください。上のリクエスト例には送信とポーリングが含まれています。
返されたrun IDを使って、ステータスがcompleted、failed、timeoutになるまでポーリングしてください。出力はcompleted後にのみ読み取ってください。
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"モデルのimage、video、またはaudioフィールドに、公開アクセス可能なファイルURLを指定してください。対応形式と制限は各Playground入力の横に表示されます。
Playgroundの対応する画像フィールドでアップロードまたは置換を使用してください。video URLフィールドはホストされたドライビング動画を受け付けますが、動画アップロード対応を意味するものではありません。
videostringURL to the input video.
scale_factornumberScale factor. The scale factor must be chosen such that the upscaled video does not exceed 5K resolution.
デフォルト: 2
最小: 1
最大: 200
{
"model": "clarityai/crystal-video-upscaler",
"video": "https://storage.googleapis.com/falserverless/example_inputs/crystal_upscaler/video_upscaling/video_in.mp4",
"scale_factor": 2
}完了したrunの結果は出力に表示されます。以下はモデルに保存されたサンプルであり、新規生成ではありません。
[
{
"url": "https://static.sandbase.ai/examples/db11180a-65a6-46b6-b12d-135cfcb5428f/output/f9e00bec-506d-4a90-b2fb-377ab75a3f17.mp4"
}
]