Model API

Workflow Utilities Scale Video

FFMPEG Utilities to Scale Videos

Model id

Use this in every request
workflow-utilities/scale-video

Run 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

Input fields for workflow-utilities/scale-video
NameTypeDescription
video_urlrequiredstring (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.

Default: stretch

One of: stretch, pad, crop

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

Default: black

One of: 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.

Default: libx264

One of: libx264, libx265

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

Default: fast

One of: 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.

Default: 18

Output

A succeeded job lists its results under outputs, stored on our side. See Jobs for every field.

Job excerpt
"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