How to flip a video horizontally with an API
To mirror a video left to right, run the hflip filter. Sume's video filter takes it as a one-line filtergraph and returns a new MP4.

To flip a video horizontally, mirror every frame left to right with the hflip filter. With Sume you send a one-line filtergraph, hflip, to the video filter endpoint and get back a new MP4; the original file is not touched.
The Sume facts come from the Video filter docs and, for the allowlist, the filter code, read 2026-09-29. What hflip does is from FFmpeg's own filter documentation, snapshotted the same day.
How do I flip a video with the Sume API?
The clip must already be a media.sume.com file in your workspace, such as the output of an earlier Sume job. The program is a filtergraph string: a filters-only ffmpeg graph. You do not write inputs, outputs or paths; the server wraps the graph for you.
Run the free check first, then send the same body to /v1/video-filter with an Idempotency-Key. The default mode is async, so you poll the job and read its result.
curl -X POST https://api.sume.com/v1/video-filter/check \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{"video_url":"https://media.sume.com/artifacts/artf_demo/talk.mp4","filtergraph":"hflip"}'
curl -X POST https://api.sume.com/v1/video-filter \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: flip-001" \
-d '{"video_url":"https://media.sume.com/artifacts/artf_demo/talk.mp4","filtergraph":"hflip"}'How do I get the flipped file back?
There is no GET /v1/video-filter/:id. Poll GET /v1/jobs/:id/status until the job is terminal, then read GET /v1/jobs/:id/result. A finished result is kind: video_filter with a new video_url, never the source URL, plus duration_seconds and the compiled filters.
The output keeps the source's size, frame rate and audio unless the program changes them, so a plain flip leaves the sound alone.
Can I flip vertically, or flip and rotate?
Yes for the flip: the allowlist has vflip next to hflip, and FFmpeg describes them as flipping the input video vertically and horizontally. Filters chain with commas, for example hflip,vflip, which is a 180-degree turn. Rotation has its own steps in How to rotate a video 90 degrees.
One caution: a mirrored frame mirrors everything in it. Text, logos and signs in the picture read backward afterward. If the mirrored copy is only for a look, that is fine; if the frame has words, check the result.
Can I flip only part of a video?
The filter runs on the whole clip; there is no time range on it. To flip one part, cut that part out first with video trim, which returns a new MP4 holding only the range you name, then send that MP4 through the filter. Trim's start and end are covered in video_trim_range_conflict: send end or duration, not both.
Joining the flipped part back between the untouched parts is a Timeline render, which places clips in order over one audio track. In current code a Timeline render takes sound only from its audio track and optional soundtrack, so each clip's own audio is dropped.
What are the limits?
The check catches unknown filter names and bad structure before you pay for an encode; see Validate a video filter program for free. It does not test option values, so a program that passes can still fail on the worker.
| Limit | Value |
|---|---|
| Source length | Up to 300 seconds |
filtergraph length | 2048 characters |
| Named filters per graph | 32 |
| Source location | This workspace's media.sume.com files |
| Unavailable filters | drawtext, subtitles, movie, lut3d |
| Price | Listed on API pricing |
Sources
Related posts
More in Media tools
- How to make a video montage: clips cut to one music track
To make a video montage, pick the music first, mark where the cuts go, then lay short clips over the track at those times in one render.
- Can AI make a song from a voice memo or a video?
Suno v6 says it can start from a voice memo, image or video. Sume's music API takes a text prompt and one optional image, so audio and video stay outside it.
- Mastodon video size limit: 99 MB, one video per post
Mastodon's docs allow a video of up to 99 MB (MP4, M4V, MOV or WebM), one per post, transcoded to H.264 at up to 1300 kbps. What that means for your export.
- Maximum video length for Sume's media tools: 300, 900 or 1800 seconds
Each Sume media tool has its own length cap: video filter and frames 300 s, trim and audio detach 1800 s in and 900 s out, compose 300 s. The full table.
Written by Sume