Implement computer vision solutions 3.1 Design and implement image- and video-generation solutions
A marketing app requests a Sora 2 (preview) video with size set to 1280x720 and sends a…
Study guide skill: Implement a solution that generates videos from text prompts and reference media
Question B2-023
A marketing app requests a Sora 2 (preview) video with size set to 1280x720 and sends a 1024x1024 product photo as input_reference so the video starts from that image. The request fails. What should you do?
Select one answer.
Answer: D
With Sora 2 (preview), input_reference is a single reference image used as a visual anchor for the first frame, and the source image must match the output video size exactly, so a 1024x1024 photo fails for a 1280x720 request until it's resized or cropped to that size. Remix needs the ID of a previously completed video, GIF isn't an accepted image type (JPEG, PNG, or WebP), and changing the duration doesn't fix the size mismatch.
Deep dive
How it works
Sora 2 (preview) can start a video from an image through the input_reference parameter. The API parameters table defines it as a single reference image used as a visual anchor for the first frame, accepted as image/jpeg, image/png or image/webp. It has one strict rule: it must match size exactly.
"Size" means the output video resolution you request in the same call. Here the request asks for 1280x720, and the photo is 1024x1024. Different width, height and aspect ratio, so the request fails.
The fix is preprocessing, not a different parameter:
- Decide the framing you need for the requested size (here, landscape).
- Resize or crop the photo to exactly the requested width and height, keeping the product in frame.
- Send it as input_reference with the same size value.
One caution when you plan sizes: the Sora page lists output resolutions in more than one section, and the lists don't match. Don't rely on memorized size lists. Pick a size the API accepts for your deployment and make the image match it exactly.
The other options, and when you'd use them
- Pass the image as remix_video_id: remix_video_id takes the ID of a previously completed video, to reuse its structure, motion and framing. An image isn't a video ID.
- Convert the image to a GIF: GIF isn't an accepted type. input_reference accepts JPEG, PNG or WebP.
- Request a longer video duration: Duration is set separately by the seconds parameter. It doesn't change the size rule; the image still has to match the requested output size.
Exam tip
Sora 2 input_reference = one JPEG/PNG/WebP image that exactly matches the requested output size. Remix = an existing video ID. Duration is irrelevant to the size error.
References
Last reviewed: