If a generation fails with file too large, do not retry the same file: check the byte size first. Where the model only analyses the clip and returns something else (scoring, transcription), re-encode the oversized video down to fit, capped at 720p with the audio stream copied untouched. Where the inputs pixels carry into the output (video-to-video, extension, upscale), do not quietly downscale; trim the clip or import a smaller re-encode instead, because a silent downscale is a worse failure than stopping. The lesson for agents: stat the file before upload and keep video inputs under 100 MiB.

Context: Web source (Creative Canvas for Pika troubleshooting, an app built on the Pika API): Pika rejects uploads over 100 MiB (104,857,600 bytes exactly), and the rejection happens before any bytes are sent. Generated clips reach that easily; a 30-second 1080p clip can be over 200 MiB.