Skip to main content

JSON Structure Overview

A Zvid project is a plain JSON object submitted as payload to POST /api/render/api-key.

{
"payload": {
"name": "my-video",
"duration": 30,
"visuals": [],
"audios": []
}
}

The Zvid API validates the payload, checks account limits, queues the render, resolves remote assets, and produces the final video.

Project Object

interface Project {
name?: string;
width?: number;
height?: number;
resolution?: ResolutionPreset;
duration?: number;
frameRate?: number;
backgroundColor?: string;
outputFormat?: "mp4" | "mov" | "avi" | "webm";
visuals?: Item[];
audios?: AudioItem[];
scenes?: Scene[];
thumbnail?: string;
subtitle?: Subtitle;
}
PropertyTypeRequiredDefaultNotes
namestringNo"unnamed"Output filename without extension. Letters, numbers, spaces, _, and - are accepted by API validation.
widthnumberNo1280Used for custom resolution. Limited by the user's plan.
heightnumberNo720Used for custom resolution. Limited by the user's plan.
resolutionResolutionPresetNocustom dimensionsPreset dimensions override width and height when not custom.
durationnumberNo10Seconds. Minimum 0.1; maximum is plan-dependent.
frameRatenumberNo30Integer from 1 to 60.
backgroundColorstringNo#ffffffHex color, such as #000000.
outputFormatstringNomp4API accepts only mp4, mov, avi, and webm.
visualsItem[]No[]Text/HTML, image, video, GIF, and (deprecated) SVG elements. When scenes is set, these act as a global overlay layer.
audiosAudioItem[]No[]External audio tracks.
scenesScene[]NononeSequential, self-contained segments. When present, drives the timeline; visuals/audios overlay all scenes.
thumbnailstringNogenerated when absentOptional remote image URL.
subtitleSubtitleNononeCaption and subtitle configuration.

Resolution Presets

See the ResolutionPreset source reference for supported preset names, dimensions, and usage notes.

Property Reference

All visual elements share timeline, transform, and layering fields — see Common Element Properties for the canonical tables and the media-support matrix. The pages below are the source references for reusable typed properties:

Element Types

Scenes

For multi-part videos, use Scenes. The scenes array splits a project into sequential, self-contained segments, each with its own local timeline and optional cross-scene transition. Project-level visuals and audios then render as a global overlay spanning every scene.

Defaults

Project Defaults

PropertyDefault
width1280
height720
duration10
frameRate30
backgroundColor#ffffff
outputFormatmp4
nameunnamed
visuals[]
audios[]

Visual Defaults

Shared visual defaults (position, timing, opacity, track, animations) are listed in Common Element Properties.

Video Defaults

PropertyDefault
videoBegin0
videoEndproject duration or source duration when available
videoDurationproject duration or source duration when available
volume1
speed1
transition, transitionIdnull

Audio Defaults

PropertyDefault
enter0
exitproject duration
audioBegin0
audioEndproject duration or source duration when available
audioDurationproject duration or source duration when available
volume1
speed1

Supported Formats

  • Input media: remote HTTP/HTTPS assets accepted by API validation and checked during rendering.
  • Output video: mp4, mov, avi, or webm.
  • HTML: HTML markup with native CSS and JavaScript via customCode, described in Text & HTML Elements.
  • SVG: inline SVG only — deprecated; embed SVG inside an HTML element instead.

Resource Limits

Limits are plan-dependent and enforced before or during rendering. They include output resolution, project duration, input media resolution, media size, and element counts by type. Validation errors include the active plan limits when the payload exceeds them.

Quick Examples

Basic Text Element

{
"type": "TEXT",
"text": "Hello World",
"x": 640,
"y": 360,
"anchor": "center-center",
"style": {
"fontSize": 48,
"color": "#000000",
"textAlign": "center"
}
}

Basic Image Element

{
"type": "IMAGE",
"src": "https://images.pexels.com/photos/32972375/pexels-photo-32972375.jpeg",
"x": 100,
"y": 100,
"width": 607,
"height": 910
}

Basic Video Element

{
"type": "VIDEO",
"src": "https://videos.pexels.com/video-files/1409899/1409899-sd_640_360_25fps.mp4",
"videoEnd": 10,
"volume": 0
}

Basic Audio Element

{
"src": "https://cdn.pixabay.com/audio/2025/04/21/audio_ed6f0ed574.mp3",
"volume": 0.5
}

Next Steps