Model API
Workflow Utilities Scale Video
FFMPEG Utilities to Scale Videos
Model id
workflow-utilities/scale-videoRun it
Quote the input, start the generation with the quote, then poll the job. Set RAYWAKE_API_KEY first; see Authentication.
# 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"Input
| Name | Type | Description |
|---|---|---|
video_urlrequired | 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. |
Output
A succeeded job lists its results under outputs, stored on our side. See Jobs for every field.
"outputs": [
{ "type": "video", "url": "https://…", "mime_type": "video/mp4", "thumbnail_url": "https://…" }
]Pricing
- up to$1.43/ run
The exact charge for your input comes from a quote. How charges settle