Author’s note: 9:16 assets generated by MAGI-2 need to be converted into pixel boundaries according to the official template for the target ad placement, then reviewed across the entire timeline and in a real player. Only after confirming that subtitles, key information, and platform UI don’t obscure one another should you sign off.
The subtitle safe area for a MAGI-2 vertical ad must be validated against the “final exported file + official template for the target placement + full timeline.” The generated frame itself can’t be used as the basis. Sand’s API only determines the generated frame and the audio toggle; whether subtitles get obscured depends on the final composition and placement configuration. The acceptance order is as follows: first use ffprobe to lock down the actual specs of the delivered file, then choose the official mask based on the actual placement for TikTok, YouTube, or Instagram Reels, convert the safe margins into pixel coordinates, inspect the subtitle edges and key objects frame by frame, and finally review in the target player. Only when all three checks pass—geometric range, text legibility, and key information integrity—can that placement be signed off.
Three conditions can change the conclusion: which platform and which placement you’re running (for example, TikTok Spark and Non-Spark differ), how the ad copy and buttons are configured, and whether you’re using one master to run across multiple placements. The data verification date is 2026-11-30. The pixel boxes in this article are theoretical examples converted from official margin recommendations. The playback, screenshot, and recheck steps are part of the acceptance design; no actual testing was performed in this article.

MAGI-2 Vertical Ad Subtitle Acceptance Knowledge Map

Figure caption: The whole acceptance flow is one-way, with only one loop-back at the decision point. Step 1 separates the “frame size/aspect used at generation time” from the “file actually delivered.” Step 2 splits into three parallel branches by placement, and each branch has its own safe-area rules. Step 3 converts those rules uniformly into pixel coordinates. Step 4 puts the coordinates back onto the full timeline and checks them in a real player. If any of the three checks fails, go back to the coordinate or timeline step, adjust, recheck, and then move on to Step 6 for sign-off. Step 5’s script is only an aid—it doesn’t replace manual frame-by-frame review.
Index: Order of the Sections
- Section 1: Specs — First, confirm the actual width, height, and orientation of the delivered file. Every coordinate later on is based on this file, so this has to come first.
- Section 2: Templates — Decide which official mask to use. The templates for the three platforms are listed side by side; just check the one for the placement you’re actually running.
- Section 3: Coordinates — Convert the margin rules from Section 2 into pixel boundaries on the file from Section 1, giving you numbers you can measure.
- Section 4: Timeline — Use the boundaries from Section 3 to check frame by frame and state by state, then review again in the player.
- Section 5: Scripts — Turn the repeatable calculations from Sections 3 and 4 into code, and use it as needed.
- Section 6: Sign-off — Compile the issue log and decide whether it’s ready to deliver.
To Know: Terms You Need Before Reading the Main Article
| Term | Brief explanation |
|---|---|
| Safe zone | The area of the frame where the platform recommends placing important visuals and text. Outside this area, content may be covered by avatars, buttons, or explanatory text, or get cropped |
| Burned-in subtitles | Subtitles rendered into the image pixels; their position is fixed at export time |
| Switchable subtitles | A subtitle track drawn by the player; the player decides its position and line breaks, so it needs to be logged separately |
| Spark / Non-Spark | Two types of TikTok auction In-Feed ads. With Spark, the ad caption comes from the original video |
| Transparent mask | A template image with an alpha channel provided by the platform. Overlay it on the frame to see where the UI will take up space |
| Final-video fingerprint | A record that uniquely identifies a specific exported file—such as specs, duration, and export settings—used to match acceptance results to that export |
1. MAGI-2 Vertical Ad Generation and Delivery Specs
1.1 MAGI-2 Vertical Generation Parameters (Vendor Documentation)
According to the official Sand documentation, MAGI-2 can generate vertical assets through two entry points, and the same concept uses different field names in each. Sand’s release announcement (2026-11-24) states that MAGI-2 can generate clips up to 30 seconds long at 25fps, with 1080p output produced through spatiotemporal upsampling.
| Entry point (vendor) | Endpoint | Vertical format and resolution fields | Audio field | Verified limitations |
|---|---|---|---|---|
| Sand Native | POST /v2/generations |
aspectRatio:"9:16", resolution:"1080p", model:"magi-2" |
generateAudio |
Per official documentation |
| Sand Ark compatible | POST /compatible/ark/api/v3/contents/generations/tasks |
ratio:"9:16", resolution:"1080p" |
generate_audio |
Duration: 4–30 seconds; 1080p only |
This document only covers the generation aspect ratio and the audio toggle; it doesn’t address whether ad placements will obscure subtitles. For assets with audio, finalize the sound and the edit first, then use an editable subtitle track to place subtitles precisely. For silent ads, present the key information in full before the first interaction prompt appears.
1.2 MAGI-2 Vertical Master and ffprobe Delivery Record
For the first version, you can create the vertical master on a 1080×1920 timeline, then choose the final specs according to the placement where it will actually be delivered. Versions with voiceover need the subtitle project file and timecodes preserved. If a model-generated shot contains readable text or fabricated lettering, check frame by frame whether it will interfere with post-production subtitles. Starting with the first key frame, leave dedicated space for the person’s mouth area, product labels, and claim information, and reserve a horizontal band for subtitles.
Capture the final file’s specs with the following command:
ffprobe -v error -show_streams -show_format -of json export.mp4
You’ll want to record the width and height, pixel aspect ratio, display rotation, frame rate, duration, video codec, and audio track information. Before overlaying the template, check the frame size against the player’s display orientation, handle rotation and non-square pixels, then overlay the template on the same pixel coordinate system. Any cropping or scaling done between the working file and the final export should be written into the record.
2. Choosing a MAGI-2 vertical ad template by placement

2.1 TikTok Auction In-Feed (first-party docs)
The official guidance is to use 9:16 vertical for Non-Spark ads, with a minimum resolution of 540×960. The safe zone is decided by the shape of the frame, the length of the ad caption, and the extra layout elements. The help center offers two template sets — standard left-to-right and Arabic right-to-left — each split into a plain version and one with an anchor. For Spark ads, the caption comes from the original video, and the docs say up to four lines will be shown, which eats into the usable area inside the frame.
When you’re signing off on a creative, record: Spark or Non-Spark, targeting region, ad caption, anchor, button, and the actual ad version — then pick the matching mask. Burned-in subtitles and the ad caption are two separate display layers, so check them separately. Previews and actual layouts can shift from device to device, so save the template name you used, the file date, and the configuration.
2.2 YouTube vertical video ads (first-party docs)
Google Ads lists 1080×1920 as the recommended vertical size and provides a transparent safe-zone template for that aspect ratio; the red areas in the template are where important text and graphics should go. Buttons, overlays, and calls to action vary by ad format, campaign type, and screen. The initial impression and the full-screen state of a vertical may crop differently. The docs even give an example: an in-app interaction squeezes the player into a square, cutting off the top and bottom of the frame. Scope your checks to the placements you actually selected, marking out each real surface — Shorts, in-stream, and the like — one by one.
2.3 Instagram Reels video ads (first-party docs)
Meta’s design guidance: leave at least 14% at the top, 35% at the bottom, and 6% on each side, so important content doesn’t get cropped or covered by the profile picture and buttons. The docs also recommend 9:16, square pixels, a constant frame rate, and a resolution of 1440×2560. These percentages apply only to the Reels ad placement — you can’t just carry them over to TikTok or YouTube, or to other surfaces within Reels.
| Placement | What the official docs provide | How this article uses it | Nature |
|---|---|---|---|
| TikTok In-Feed | Multiple masks that differ by configuration | Explains how to choose only, no conversion | First-party docs |
| YouTube vertical | 1080×1920 transparent template | Overlay the template and verify, don’t invent your own margins | First-party docs |
| Instagram Reels | Top 14%, bottom 35%, 6% on each side | Converted into pixel boundaries | Official ratios + theoretical worked example |
| Square crop | Official example shows squeeze cropping | Derived from centered cropping | Theoretical worked example |
It’s worth keeping two kinds of boundaries apart: the platform’s actual placement templates are official files, while the rectangles you calculate from percentages are illustrative margins you set yourself. Neither can stand in for the other.
3. Convert official safe margins into MAGI-2 vertical ad inspection coordinates
3.1 Coordinate system and rounding rules
Use the top-left corner of the displayed frame as the origin: x increases to the right, and y increases downward. To keep every boundary on a whole pixel, round the left and top boundaries up, and round the right and bottom boundaries down—meaning all four edges move inward toward the frame. Areas are represented by rectangular boundary coordinates; the right and bottom boundaries refer to the outer frame edge.
3.2 Reels safe margin conversion example (theoretical example)
Use 1080×1920 to demonstrate the Reels conversion: left and right margins are 64.8 pixels each, the top margin is 268.8 pixels, and the bottom margin is 672 pixels. The 1080 width is only used to demonstrate proportional conversion; actual export specs are determined by project requirements and placement guidelines.
| Frame size | Left/right margins | Top margin | Bottom margin | Usable area |
|---|---|---|---|---|
| 1080×1920 | 64.8 | 268.8 | 672 | x=65…1015, y=269…1248 |
| 1440×2560 | 86.4 | 358.4 | 896 | x=87…1353, y=359…1664 |
Every part of the subtitle must fall within this range, including the text itself, stroke, shadow, background plate, and the outermost edge during animation. If the official template has an irregular shape, check actual pixels frame by frame against the officially allowed shape; the rectangular bounding box can only be used for a first pass.
3.3 Out-of-bounds and cropping examples (theoretical example)
Suppose a composite box for a two-line subtitle is x=150…920, y=1080…1210; it falls within the Reels example margins above. Move the same subtitle down until its bottom edge reaches y=1300—52 pixels beyond the 1248 boundary—and that placement fails.
Look at cropping using the same pixel basis: if a 1080-wide master is center-cropped to a square, the vertically visible range is 420…1500. This is only an inference for center cropping; actual offset and overlay positions are subject to the target placement’s template or preview. The calculation order is: first determine the visible area of each object box in its current state, then subtract overlay areas such as buttons, caption text, and switchable subtitles. When sharing a single master, take the common visible area across all target states. If the intersection is too small, causing font size restrictions or subtitles blocking the product, deliver separate versions with adjusted subtitle positions for each placement.
4. Check MAGI-2 Vertical Ad Subtitle Overlaps Across the Full Timeline
4.1 Define the Objects and Overlay Templates Frame by Frame
Create one ad slot record for each finished version. List the dimensions, placement, language, ad description and button configuration, overlay filename, review date, and expected subtitle mode, and separately flag the sound-on and muted reading states. Key objects to check include, at minimum, embedded subtitles, the brand, product or price, and required disclaimers. For toggleable subtitles, separately record their position, line breaks, and timecodes after they’re enabled, and check whether they overlap the embedded copy.
Use the files exported in this pass to read back the project, align the official transparent overlays to the same frame boundary, and keep the scale unchanged. Focus on every frame in these segments: the longest two-line subtitles, subtitle entrances and exits, quick cuts, highlighted backgrounds, end-card promotions, and follow animations, while also checking object outlines and occlusion. It’s also best to check the first screen and cases where subtitles automatically wrap to three lines. Even when subtitles sit inside the safe area, if they cover the product model number, hand gestures, or lip movement, reposition them or rewrap the text. Play the brightest and darkest backgrounds separately and check edges, contrast, and readability on small screens; add a backing plate, shorten the text, or adjust the font size when needed.
4.2 Recheck in Real Players
When reviewing in a player, use the target ad configuration and check each item: first screen, full screen, visible crop, long lines in the ad description, buttons, anchors, whether platform subtitles are present, and mute state. Spot-check on narrow screens and on the screens the project commonly uses.
- TikTok: For approved ads, you can preview them in the mobile app with the Ads Manager QR code as described in the official instructions. Version combinations and devices vary, so spot-check results don’t represent every case.
- Google: There’s a video ad preview gallery; the official documentation says in-stream ads can be viewed on mobile, desktop, and connected TV. For Shorts, check them together with the template for the corresponding placement and that placement’s preview screen.
- Editors without an ad account: You can deliver the offline template verification results and the final files. Actual ad preview evidence should be re-verified by an authorized advertiser following the process.
4.3 Verify Audio and Subtitle Timing
Against the approved audio track, confirm that around the points where the brand, price, and conditions are read, the corresponding text falls within the time window in which it should appear: it doesn’t show up early during pauses, and sentence endings aren’t lost at cuts. Per W3C guidance on prerecorded captions, accessibility captions must also identify speakers, sound effects, and other information needed to understand the content. Watch the whole piece again with the sound off and check that all required information and its order can be read. Whenever you change font size, position, text, compositing, or export settings, recheck that segment and the affected placements, and update the finished-file fingerprint and segment timecodes.
5. Using Scripts to Assist with MAGI-2 Portrait Ad Validation
The script does only two repeatable things: calculate boundaries according to the rules in Section 3, and generate rewrite candidates when subtitles are too long. Frame-by-frame inspection and playback review still need to be done manually. The table below shows where each stage’s tool comes from:
| Stage | Tool source | Notes |
|---|---|---|
| MAGI-2 video generation | Sand official API (first-party) | Fields are covered in Section 1.1 |
| Spec reading | FFprobe (open-source tool) | Read-only; does not modify files |
| Coordinate calculation | Local Python | Pure integer arithmetic; no API calls |
| Candidate subtitle line-break rewrites | OpenAI-compatible API at APIYI (apiyi.com) | Handles text only; rewrites still need human review |
Note that the research for this article only verified Sand’s two MAGI-2 entry points. The APIYI row in the table is only for auxiliary tasks such as subtitle text; it does not mean MAGI-2 is being invoked through it.
5.1 Minimal example: getting the model to produce shorter line breaks
import openai
client = openai.OpenAI(
api_key="YOUR_API_KEY",
base_url="https://api.apiyi.com/v1"
)
resp = client.chat.completions.create(
model="gpt-4o-mini", # check the platform's model list for the exact model name
messages=[{"role": "user", "content":
"把这句广告字幕改成两行、每行不超过12个汉字,保留价格和条件:"
"限时直降两百元,以下单页面显示为准"}]
)
print(resp.choices[0].message.content)
View the full implementation code (ffprobe readout + coordinate checks + rewrite candidates)
import json
import subprocess
import openai
def probe(path):
"""Read the delivery file's specs with ffprobe and keep them as-is for the record"""
out = subprocess.run(
["ffprobe", "-v", "error", "-show_streams",
"-show_format", "-of", "json", path],
capture_output=True, text=True, check=True).stdout
info = json.loads(out)
v = next(s for s in info["streams"] if s["codec_type"] == "video")
return {
"width": v["width"], "height": v["height"],
"sar": v.get("sample_aspect_ratio"),
"fps": v.get("r_frame_rate"),
"codec": v.get("codec_name"),
"duration": info["format"].get("duration"),
"side_data": v.get("side_data_list"), # check whether a display rotation is attached
"has_audio": any(s["codec_type"] == "audio" for s in info["streams"]),
}
def reels_safe_box(w, h, top=14, bottom=35, side=6):
"""Convert the percentage margins into pixels, rounding all four edges inward (integer math avoids floating-point drift)"""
x0 = (w * side + 99) // 100 # round the left edge up
x1 = (w * (100 - side)) // 100 # round the right edge down
y0 = (h * top + 99) // 100 # round the top edge up
y1 = (h * (100 - bottom)) // 100 # round the bottom edge down
return x0, x1, y0, y1
def check_box(box, safe):
"""box and safe are both (x0, x1, y0, y1); returns the overflow in pixels for each edge"""
bx0, bx1, by0, by1 = box
sx0, sx1, sy0, sy1 = safe
return {
"left": max(0, sx0 - bx0), "right": max(0, bx1 - sx1),
"top": max(0, sy0 - by0), "bottom": max(0, by1 - sy1),
}
def shorten(text, max_chars=12):
client = openai.OpenAI(
api_key="YOUR_API_KEY",
base_url="https://api.apiyi.com/v1"
)
r = client.chat.completions.create(
model="gpt-4o-mini", # model name per the platform's list
messages=[
{"role": "system", "content": "你是广告字幕编辑,不得删改价格、条件和品牌。"},
{"role": "user", "content": f"改成两行,每行不超过{max_chars}字:{text}"},
])
return r.choices[0].message.content
if __name__ == "__main__":
spec = probe("export.mp4")
print(spec)
safe = reels_safe_box(spec["width"], spec["height"])
print("Reels 示范边界(理论算例):", safe)
# worked example from the article: after moving the subtitle box down, its bottom edge reaches 1300
print(check_box((150, 920, 1080, 1300), safe))
At 1080×1920, reels_safe_box returns (65, 1015, 269, 1248), which matches the worked example in Section 3.2. Checking the sample subtitle box shows its bottom edge overshooting by 52 pixels. These numbers are recomputations of the theoretical example — not measurements from an actual rendered video.
🚀 Quick start: For text-assist tasks like subtitle rewriting, you can pick up free trial credits at APIYI apiyi.com and hook the script above straight into the OpenAI-compatible API. Check the platform page for the model list and billing details.
6. MAGI-2 Vertical Ad Sign-off Criteria and Delivery Records
Record one line per issue; the following is a sample format, not an acceptance result that was actually run in this article:
| Final cut version | Placement | Timecode | Issue | Action | Recheck item |
|---|---|---|---|---|---|
| Vertical version 2 | Instagram Reels | 7.4 s | Bottom edge of the two-line price note exceeds the boundary by 52 px | Move subtitles up 60 px and shorten line breaks | Font and final export |
The sign-off rule is: for each placement, check the geometry, text readability, and completeness of critical information; sign off only when all three pass. For each placement, deliver the final video, subtitle track or subtitle project, and an acceptance record organized by device and placement, and save timestamps and final-cut fingerprints that can pinpoint exact locations. If the team needs to batch-generate candidate subtitle line-break options, they can use the unified interface at APIYI apiyi.com to connect multiple models for comparison, but the final sign-off still depends on the conclusions of the three manual checks above.
FAQ
Q1: If I select 9:16 when generating with MAGI-2, can I ignore the subtitle safe area?
No. 9:16 only determines the generation aspect ratio. Whether subtitles get obscured depends on the final composition and placement configuration, so you must overlay the official template for the target placement on the final export for acceptance.
Q2: Can the 14%, 35%, and 6% values for Reels be used on TikTok or YouTube?
No. These percentages apply only to the Instagram Reels ad placement. TikTok requires the corresponding mask based on Spark/Non-Spark, anchors, and caption line count, while YouTube should use the official transparent template according to the actual display placement.
Q3: Are the pixel coordinates in the article measured data?
No. `x=65…1015`, `y=269…1248`, and the square crop `420…1500` are all theoretical examples derived from official safe-margin recommendations or centered assumptions. The actual offset is subject to the template and preview for the target placement.
Q4: If the subtitles are inside the safe area, why can they still fail acceptance?
Acceptance looks at three things: geometry, readability, and completeness of critical information. Even if subtitles are inside the safe area, if they cover the product model, mouth shape, or gestures, or are unreadable against a bright background, they still need to be repositioned or adjusted.
Q5: Can I call MAGI-2 through APIYI to generate video?
The sources for this article only verified two official entry points: Sand Native and Ark compatibility. Whether APIYI supports MAGI-2 should be based on the model list at apiyi.com; this article makes no assumptions. The article only uses APIYI for auxiliary steps such as subtitle text rewriting.
Q6: Without an ad account, how far can acceptance go?
You can complete offline template verification and deliver the final files and acceptance records. Actual ad preview evidence should be re-verified by an authorized advertiser using official processes such as TikTok QR code preview or Google video preview. The text API used in the auxiliary scripts can first be run on APIYI apiyi.com with the free quota.
📚 References
- Sand MAGI-2 release post: Model duration, frame rate, and upscaling details (published 2026-11-24)
- Link:
sand.ai/blog/magi-2/
- Link:
- Sand Native API and Ark-compatible API: Generation fields and duration/resolution limits
- Link:
platform.sand.ai/docs/api-reference/,platform.sand.ai/docs/ark-generations/
- Link:
- FFprobe documentation: Reading delivered file specs
- Link:
ffmpeg.org/ffprobe.html
- Link:
- TikTok Auction In-Feed Ads specs and QR code preview: Specs updated in June 2026; QR code preview description updated in October 2025
- Link:
ads.tiktok.com/resources/help/article/tiktok-auction-in-feed-ads
- Link:
- Google Ads video specs, mobile cropping, and video preview
- Link:
support.google.com/google-ads/answer/13547298,support.google.com/google-ads/answer/9128498,support.google.com/google-ads/answer/9671934
- Link:
- Meta Instagram Reels ads guidelines
- Link:
business-auth.facebook.com/business/ads-guide/update/video/instagram-reels
- Link:
- W3C guidance on prerecorded captions
- Link:
w3.org/WAI/WCAG22/Understanding/captions-prerecorded.html
- Link:
All references above were reviewed and verified on 2026-11-30.
Author: APIYI Technical Team
Technical contact: Feel free to contact us through the APIYI homepage at apiyi.com. For more resources, visit the docs.apiyi.com documentation center.