Reels safe-zone boxes in Python: a pure function for any frame size
Meta's Reels percentages are relative, so one pure Python function gives the safe box for any frame size. It runs offline and feeds a caption anchor.

Meta's Reels ad guide gives the safe area as fractions: 14% top, 35% bottom, 6% each side. A pure function turns any width and height into the box in pixels, with no network call. The code below runs as written. It returns 1080x1920 as 269, 672 and 65 px, and a caption anchor range for a text block of a given height.
The function
Percentages are from Meta's guide, read 2026-10-04. The anchor range is what you pass to design.placement.anchor_ratio in video captions, where the OpenAPI schema accepts 0.05 to 0.95.
def box(w, h, top=0.14, bottom=0.35, side=0.06):
t, b, s = round(h * top), round(h * bottom), round(w * side)
return {"left": s, "top": t, "right": w - s, "bottom": h - b}
def anchor(w, h, block_px):
z = box(w, h)
lo = (z["top"] + block_px / 2) / h
hi = (z["bottom"] - block_px / 2) / h
lo, hi = max(lo, 0.05), min(hi, 0.95)
return round(lo, 2), round(hi, 2)
print(box(1080, 1920))
print(anchor(1080, 1920, 150))Sizes compared
The same fractions applied to two frame sizes (my arithmetic on Meta's percentages).
| Frame | Top | Bottom | Side | Box |
|---|---|---|---|---|
| 1080 x 1920 | 269 | 672 | 65 | 950 x 979 |
| 1440 x 2560 | 358 | 896 | 86 | 1268 x 1306 |
Sources
Related posts
More in Developers
- Reference image preflight checklist before a Seedance 2.5 job
Most reference-to-video failures are input problems. A checklist and a curl preflight for URLs, count and mix before you pay for a Seedance 2.5 job on Sume.
- Removed OpenAI video ids: the exact list and a script to find them
OpenAI removed the Videos API and five sora-2 model ids on 2026-09-24. The exact ids from its deprecations page, and a Python script that finds them in a repo.
- Replace your mocked Sora client with a Sume contract test
Tests that mocked a Sora client now guard nothing. Write a small pytest contract test around your own video interface, plus one live smoke test against Sume.
- Reproduce the same AI voiceover later: model id, voice, settings
To redo a narration line months later you need the model id, voice, language, format and settings. Sume's completed TTS job records them. A short routine.
Written by Sume