Propagate edits from still frames across a shot
Export a frame from your source clip, edit it in an image editor, and send it back with the source video and a short prompt describing the change. For example, recolor a jacket in an exported frame and ask the API to carry the new color across the shot. The source clip guides the motion, framing, and camera movement.
Get the result
The response contains a job id and created_at. Poll the job at GET /v2/video-shot-edit/{id}. When the job completes, download the H.264 MP4 from result.video_url.
The output has the same frame count, frame rate, and displayed frame size as the source clip. An odd width or height is padded by one pixel to an even number. The output uses the source audio when available. A source with no audio track gives a video-only MP4.
Billing is based on the length of the input video. See Pricing.
Best practices
- Write one short instruction. Start with a verb such as add, remove, replace, or relight. Name the exact target if the shot contains similar objects. For example, “Replace the mug on the left side of the desk with a glass of water.” Describe the edit and let the source video guide the motion and framing.
- Edit the original frame at full resolution. Keep the source crop, framing, and size. Leave everything outside the intended edit as it appears in the source frame. A change elsewhere in the still can carry through to the result.
- Start with one edited frame at
time: 0. Shot Edit follows the source video. One edited first frame is usually enough for a change that applies throughout the shot, such as restyling the scene. - Add keyframes when the edit needs to change during the clip. Use them when an edit starts mid-clip, the clip cuts to a new shot or location, different subjects need different edits, or the target appears from a new angle.
- Match each keyframe to its source frame. Set
timeto the source frame’s timestamp, keep its framing and aspect ratio, and use at most one keyframe per frame. When you show the same edit in several keyframes, keep the change consistent across them.
Try Shot Edit for object removal or replacement, product placement, changes to clothing or materials, relighting, or restyling a scene.
Authentication
Headers
A unique value per job, 1 to 255 characters, not counting quotes. Resending the request with the same Idempotency-Key returns the same job. See Idempotent Requests.
Request
The source clip as an HTTPS URL, a base64 data URI, or a Cloud Storage storage_uri. See video formats and codecs.
Up to 200 MB from HTTPS or Cloud Storage and up to 15 MB as a data URI. Use a constant frame rate of 20–30 fps and up to 241 frames (about 10 seconds at 24 fps). The long side can be up to 1920 pixels and the short side up to 1080 pixels.
Response headers
true when an earlier request with the same Idempotency-Key created this job. Not sent otherwise.