Video Creation API
Creates a full video with multiple sequences. Each sequence can contain media (images or videos) animated according to the specified animation type. You can add an intro, an outro, transitions between sequences, a logo, and before/after effects.Authentication
All requests must include the header:x-api-key: YOUR_API_KEY
Headers
Request Body
Array of two colors
[background, text] (e.g. ["#1a1a2e", "#ffffff"]).
First color is background, second is text color.Enables logo display on video/image sequences (top right corner,
100 px). Logo on intro/outro is controlled separately via
sequence.data.displayLogo.Logo URL. Required if
displayLogo=true or if you want to show the
logo on intros/outros. Optional.Sequences
Ordered array of video sequences. Each sequence represents a clip in
the final video. Sequences are composed in the order of their
order field.Display order of the sequence in the video (starts at 0). Intro must
be first (
0), outro last.Sequence duration in seconds. -
"video" sequences: max 5 seconds
(capped automatically) - "intro" sequences: 2 to 5 seconds (recommended
: 3) - "outro" sequences: 3 to 5 seconds (recommended: 5) - "image"
sequences: unlimitedSequence type: -
"intro" — Introduction screen (logo + intro text) -
"outro" — End screen (logo + contact or text) - "video" — Animated
video sequence (triggers AI generation) - "image" — Static image
sequence - "beforeAfter" — Before/after sequence (static comparison
slide)Animation type. Possible values:Camera movements:
"CAMERA_PUSH_IN"— Zoom in"CAMERA_PUSH_OUT"— Zoom out"CAMERA_MOVE_RIGHT"— Move right"CAMERA_CRANE_UP"— Move up"CAMERA_ORBIT_LEFT"— Rotate left
"AUTO_EFFECTS"— Automatic animation (AI-generated prompt)"AUTO_REVERSE"— Reversed automatic animation
"REALTOR_SMILING"— Real estate agent portrait animation
"BEFORE_AFTER_INTERIOR"— Interior transformation (progressive staging)"BEFORE_AFTER_EXTERIOR"— Exterior transformation (landscaping)"BEFORE_AFTER_DECLUTTER"— Declutter (furniture disappearing)"BEFORE_AFTER_RENOVATION"— Renovation (timelapse with renovation team)
"none"— No animation"fade"— Simple fade
Media
Array of media for this sequence. At least one media required for
"video" and "image" types. "intro" and "outro" sequences do not
need media (empty array []).Sequence data
Intro data (type: "intro")
Outro data (type: "outro")
For Interview and Sample (generic) templates:
Before/After data
Required for BEFORE_AFTER effects. URL of the “after”
transformation image. The “before” image is provided via
medias[0].url.Transitions
Transitions define how a sequence enters relative to the previous one. The transition is defined in thedata.transition field of the target sequence.
Transition type: -
"fade" — Crossfade (default) - "wipe" —
Horizontal wipe - "slide" — Slide - "flip" — Flip - "clock-wipe" —
Clock wipe - "iris" — Circular opening - "none" — No transitionTransition duration in frames (1 to 120). At 30 fps: -
15 ≈ 0.5
second - 20 ≈ 0.67 second (default) - 30 ≈ 1 second - 60 ≈ 2 secondsLogo — Detailed behavior
The logo is controlled at two levels:-
Video level (
video.displayLogo+video.logoUrl):- Enables logo display in top right corner (100 px) on
"video"and"image"type sequences.
- Enables logo display in top right corner (100 px) on
-
Sequence level (
sequence.data.displayLogo):- On
"intro"and"outro": the logo fromvideo.logoUrlis displayed centered (200 px for intro, 150 px for outro). - Controlled individually by
sequence.data.displayLogo(defaulttrue). - To hide the logo on a specific intro/outro, pass
"displayLogo": falsein itsdata.
- On
Webhook
Responses
201 — Created successfully
Unique identifier of the generated video. Use with
GET /api/video-editor/generate/video/{id} to track progress.List of generated content (one item per
"video" type sequence). Each
item contains: - id: Generation id - url: Source image URL -
effect: Animation type - format: Video format - status: Status
("pending" | "success" | "error")400 — Validation error
Returned if the request body is invalid (missing sequence, invalid format, etc.).401 — Unauthorized
Returned ifx-api-key is missing or invalid.
500 — Server Error
Internal server error.Examples
Example 1 — Basic video with intro + outro + logo
Example 2 — Video with transitions between sequences
Example 3 — BEFORE_AFTER effect with two images
Example 4 — Logo hidden on intro but visible on sequences
Sample Response
Important Notes
"video"sequences automatically trigger AI animation generation from the provided image. Each video sequence consumes 1 credit.- Maximum duration for a
"video"sequence is 5 seconds (capped automatically). "intro"and"outro"sequences do not consume credits (no AI generation).- Use the returned
idwithGET /api/video-editor/generate/video/{id}to track progress. - If a webhook is provided, you will receive a notification when the final video is ready.
Intro / Outro Summary
Transitions Summary
Transitions are optional. Without a defined transition, the switch between sequences uses the template default transition (fade of ~20 frames). To customize, adddata.transition on each desired sequence.
