Model API'si
Workflow Utilities Scale Video
Video boyutlandırma aracıyla klibini başka bir kadraja uyarlayabilirsin.
Model kimliği
workflow-utilities/scale-videoÇalıştır
Girdiye ücret teklifi al, bu teklifle üretimi başlat, ardından işin durumunu sorgula. Önce RAYWAKE_API_KEY değişkenini ayarla; ayrıntılar için Kimlik doğrulama sayfasına bak.
# 1. Price the exact input (quotes are valid for up to 10 minutes)
curl -s https://api.raywake.com/v1/quotes \
-H "Authorization: Bearer $RAYWAKE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "workflow-utilities/scale-video",
"input": {
"video_url": "https://example.com/input.mp4"
}
}'
# 2. Start the generation with the quote_id from step 1
curl -s https://api.raywake.com/v1/generate \
-H "Authorization: Bearer $RAYWAKE_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"model": "workflow-utilities/scale-video", "quote_id": "QUOTE_ID", "input": {"video_url":"https://example.com/input.mp4"}}'
# 3. Poll until the status is terminal
curl -s https://api.raywake.com/v1/jobs/JOB_ID \
-H "Authorization: Bearer $RAYWAKE_API_KEY"Girdi
| Alan | Tür | Açıklama |
|---|---|---|
video_urlzorunlu | string (URL) | URL of the video file to scale/resize. Height and Width of the video must be even numbers for compatibility with video codecs. |
width | integer | Target width in pixels. If only width is provided, height is auto-calculated to preserve aspect ratio. At least one of width or height must be provided. |
height | integer | Target height in pixels. If only height is provided, width is auto-calculated to preserve aspect ratio. At least one of width or height must be provided. |
mode | string (enum) | Scaling mode. 'stretch' scales the video to the exact target dimensions (may distort aspect ratio). 'pad' scales to fit within the target dimensions while preserving aspect ratio, then pads with the chosen color to fill the remaining space (letterbox/pillarbox). 'crop' scales to cover the target dimensions while preserving aspect ratio, then center-crops to the exact target size. |
pad_color | string (enum) | Padding color when mode is 'pad'. Ignored for other modes. |
codec | string (enum) | Video codec to use for encoding. libx264 (H.264) is widely compatible, libx265 (H.265/HEVC) offers better compression. |
preset | string (enum) | Encoding speed preset. Slower presets give better compression but take longer. |
crf | integer | Constant Rate Factor for quality (0-51). Lower values mean better quality and larger files. 18 is visually lossless for most content. |
Çıktı
Başarılı bir iş, sonuçlarını outputs altında listeler; dosyalar bizim tarafımızda saklanır. Tüm alanlar için İşler sayfasına bak.
"outputs": [
{ "type": "video", "url": "https://…", "mime_type": "video/mp4", "thumbnail_url": "https://…" }
]Fiyatlandırma
- en fazla$1,43/ üretim
Girdinin kesin ücreti ücret teklifinden gelir. Bakiye nasıl kesinleşir?