elements array as shape and text elements, and can be freely mixed with them.
What You’ll Learn
Three Ways to Add Media
Bring your own URL, search the stock library, or generate with AI
Positioning and Sizing
Anchor presets, exact placement, and automatic fit-to-screen sizing
Playback Settings
Control looping and audio muting for video elements
Color Overlays
Tint an individual element, independent of the scene background
Before You Begin
Make sure you have:- A Pictory API key
- Basic understanding of scene configuration in the Pictory API
Media elements are processed by the v3 storyboard engine. Any scene that includes an
elements array is automatically routed to v3; you do not need to set storyboardVersion yourself.How Media Elements Work
Settype to "video" or "image", then tell Pictory where the media comes from. Every media element uses exactly one of three sources:
| Source field | What it does | Best for |
|---|---|---|
visualUrl | Uses the file at the URL you provide | Your own footage, product shots, screenshots |
searchFilter | Searches the stock library with your query | Quick, relevant b-roll and imagery without hosting files |
aiVisual | Generates the media from a text prompt | Visuals that do not exist yet: illustrations, concept shots |
- A maximum of 20 elements per scene is allowed (shapes, text, and media combined).
- Provide exactly one of
visualUrl,searchFilter, oraiVisualper media element; sending two or more is rejected.
Source 1: Your Own Media (visualUrl)
Point visualUrl at any publicly reachable video or image file. Pictory reads the file’s duration and dimensions automatically, so the element keeps its natural proportions.
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | "video" or "image" |
visualUrl | string | Yes | URL of the media file |
Source 2: Stock Library Search (searchFilter)
Describe what you want and Pictory finds a matching visual in the stock library. For media elements, searchFilter takes a single field:
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | "video" or "image". This also decides whether stock videos or stock photos are searched |
searchFilter.query | string | Yes | What to search for, in plain language |
language field, so non-English queries work naturally.
If the search finds no suitable match, the element is simply left out of the video. The rest of the scene still renders and the request does not fail. Prefer specific, visual queries (“growth chart on laptop screen”) over abstract ones (“success”).
Source 3: AI-Generated Media (aiVisual)
Generate the element from a text prompt. The aiVisual object accepts the same fields as background AI visuals:
| Field | Type | Required | Description |
|---|---|---|---|
aiVisual.prompt | string | No | What to generate. If omitted, the scene’s narration guides the generation |
aiVisual.model | string | Yes | Image models: flux-schnell, seedream3.0, nanobanana, nanobanana-pro. Video models: pixverse5.5, veo3.1_fast, veo3.1 |
aiVisual.mediaStyle | string | No | photorealistic, artistic, cartoon, minimalist, vintage, futuristic |
aiVisual.videoDuration | string | No | Video elements only, e.g. "8s". Allowed values depend on the model. Defaults to the model’s shortest duration |
AI generation consumes AI Credits according to the selected model’s rate. See the per-model credit tables in the AI Background Images and AI Background Videos guides, and Understanding AI Credits. If your account does not have enough credits, the element is skipped and the rest of the video still renders.
Positioning and Sizing
Media elements use the same positioning rules as shapes and text: aposition anchor or explicit top/left offsets, never both.
| Field | Type | Description |
|---|---|---|
position | string | Anchor region: top-left, top-center, top-right, center-left, center, center-right, bottom-left, bottom-center, bottom-right. Defaults to center |
top | string | Vertical offset as a percentage from the top, e.g. "40%". Cannot be combined with position |
left | string | Horizontal offset as a percentage from the left, e.g. "55%". Cannot be combined with position |
width | string | Element width as a percentage of the canvas, e.g. "30%". Height follows automatically from the media’s own proportions |
Sizing: exact or automatic
- If you provide
width, it is used exactly as given. Awidthof"100%"spans the full canvas. - If you omit
width, the element is sized automatically: it starts at 30% of the canvas and shrinks as needed so the whole element stays on screen, taking into account its position and the media’s proportions. A portrait clip placed near the bottom of a landscape video, for example, is scaled down so it does not run off the bottom edge.
Recipe: full-screen video element
To cover the entire frame with a video element, combine explicit offsets at the origin with a 100% width:Playback Settings (Video Elements)
Video elements accept an optionalsettings object:
| Field | Type | Default | Description |
|---|---|---|---|
settings.loop | boolean | true | Restart the clip when it ends, for as long as the scene lasts |
settings.mute | boolean | true | Silence the clip’s own audio so it does not compete with your narration |
true, which is what you want for most picture-in-picture overlays. Set mute: false only when the element’s own audio should be heard.
Color Overlay on an Element
Any media element can carry its owncolorOverlay, the same tint control available for scene backgrounds, applied to just this element:
Complete Example
When an Element Cannot Be Resolved
Media elements are designed to degrade gracefully. The element is left out of the video, without failing the request, when:- a
searchFilterquery finds no suitable stock match, - an
aiVisualgeneration fails, or - the account does not have enough AI Credits for the generation.
visualUrl is publicly reachable.
Next Steps
Shapes and Text Elements
Add badges, arrows, and decorative text alongside your media
Background Color Overlay
Tint the whole scene background for readability and branding
AI-Generated Visuals
Use the same AI models for full scene backgrounds
Get Project by ID
See how elements appear in the saved project structure
