Conform a trim to 540x960 at 30 fps for TikTok non-Spark ads
TikTok's non-Spark ad spec sets 540x960 as the 9:16 minimum. One video-trim job with output 540x960 at 30 fps costs $0.02. Bitrate is not a field.

Send video-trim with precision: exact and output: {width: 540, height: 960, fps: 30} to get a 9:16 file at TikTok's stated minimum size for $0.02. TikTok's ad specification page (read 2026-10-09) lists 540x960 as the minimum for 9:16 video, and Sume's trim output accepts width and height from 256 to 2160.
What TikTok asks for
These are TikTok's non-Spark ad figures from its own specification page; Sume does not enforce them.
- File types listed: .mp4, .mov, .mpeg, .3gp, .avi.
- Length up to 10 minutes and file size up to 500 MB.
- Bitrate of at least 516 kbps.
| Ratio | Minimum size |
|---|---|
| 9:16 | 540x960 |
| 16:9 | 960x540 |
| 1:1 | 640x640 |
The request
output works only with precision: exact. A keyframe cut with output returns video_trim_output_requires_exact. Allowed fps values are 24, 25, 30 and 60. Import the clip first with POST /v1/media-imports so it sits on media.sume.com, send an Idempotency-Key header, then poll GET /v1/jobs/:id/status and read GET /v1/jobs/:id/result. The API rejects off-host URLs at admit, so a bad URL fails before any work runs.
curl -X POST https://api.sume.com/v1/video-trim \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: tiktok-540-001" \
-d '{"video_url":"https://media.sume.com/artifacts/artf_demo/ad.mp4","start":0,"duration":30,"precision":"exact","output":{"width":540,"height":960,"fps":30}}'Two honest gaps
First, the docs do not say how a source with a different aspect ratio is fitted into the output frame. Send a source that is already 9:16 and check the result frame with video frames. Second, Sume does not expose a bitrate field: the server compiles ffmpeg and rejects codec, crf and similar keys with ffmpeg_fields_rejected. So the 516 kbps floor is something you confirm on upload, not something you can set here.
Cost
One trim job is $0.02 at the public rate. Three ad lengths from one master (15, 30 and 45 seconds) are three jobs, 3 x $0.02 = $0.06.
Checking the result
After the job is ready, run video inspect on the result with frames: false to read the probe, and sample one frame at the middle of the clip with video frames. That costs a few cents of compute at most and confirms the size before you upload. Because the TikTok page also lists a 10-minute length limit and a 500 MB file limit, keep ads short: a 30-second 540x960 file is far below both. Every media job follows the same lifecycle: submit with an Idempotency-Key, receive a job, poll GET /v1/jobs/:id/status until it is ready, then read GET /v1/jobs/:id/result. A retry with the same key does not queue a second job, so a network error during submit never doubles a charge.
Sources
Related posts
More in Media tools
- Crop 1920x1080 to 3:4 with video filter: width 0.421875, x 0.2890625
A centered 3:4 crop of a 1920x1080 frame keeps 810x1080 pixels. In video-filter fractions that is width 0.421875, height 1, x 0.2890625. One job, $0.02.
- Crop 1920x1080 to 9:16 with an API: width 0.3164, x 0.3418
Center-crop a 16:9 clip to vertical with Sume video filter: the crop fractions, the arithmetic, and why 1280x720 falls under TikTok's 540x960 minimum.
- Crop a 1080x1920 clip to a 1080x1080 square for a TikTok 1:1 ad
TikTok's 1:1 ad needs 640x640 or more. A 9:16 source crops to a square with video filter height 0.5625 and y 0.21875, or y 0.1 to keep the top. $0.02.
- Crop an avatar video to 1:1: video-filter fractions for every ratio
Exact x, y, width and height fractions that turn a 9:16, 3:4, 4:3 or 16:9 Sume avatar clip into a centered square with video-filter, $0.02 a job.
Written by Sume