Model API'si

Workflow Utilities Scale Video

Video boyutlandırma aracıyla klibini başka bir kadraja uyarlayabilirsin.

Model kimliği

Her istekte bunu kullan
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

workflow-utilities/scale-video girdi alanları
AlanTürAçıklama
video_urlzorunlustring (URL)
URL of the video file to scale/resize. Height and Width of the video must be even numbers for compatibility with video codecs.
widthinteger
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.
heightinteger
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.
modestring (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.

Varsayılan: stretch

Seçenekler: stretch, pad, crop

pad_colorstring (enum)
Padding color when mode is 'pad'. Ignored for other modes.

Varsayılan: black

Seçenekler: black, white, red, green, blue, gray

codecstring (enum)
Video codec to use for encoding. libx264 (H.264) is widely compatible, libx265 (H.265/HEVC) offers better compression.

Varsayılan: libx264

Seçenekler: libx264, libx265

presetstring (enum)
Encoding speed preset. Slower presets give better compression but take longer.

Varsayılan: fast

Seçenekler: ultrafast, fast, medium, slow

crfinteger
Constant Rate Factor for quality (0-51). Lower values mean better quality and larger files. 18 is visually lossless for most content.

Varsayılan: 18

Çı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.

İş yanıtından bir bölüm
"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?