wc -c < FILE in your shell gives size_bytes (exact: the upload is signed for it), and its length is needed only later (create_video). Returns upload_command, one shell line, curl -fsS -T “FILE” ”$(curl -fsS ‘<upload_link>’)”: run it with FILE replaced by the path to the file (keep the quotes), then call finish_upload. Pick the style while it uploads. The link in it works for 2 hours.
Inputs
A refusal is a result with
isError: true and structuredContent.error = {code, message, next}: see Limits and errors.