Archived docs Get your API Key
Get started
Tutorials
Guides
Reference
Help for AI agents
🤖 AI Assistant

Slideshow

A classic photo slideshow with background music and crossfade transitions between images. Each image holds for 4 seconds with a 1-second crossfade between scenes.

Complete JSON

{
  "comment": "Photo slideshow with crossfades and background music",
  "resolution": "full-hd",
  "quality": "high",
  "scenes": [
    {
      "duration": 4,
      "transition": { "style": "fade", "duration": 1 },
      "elements": [
        { "type": "image", "src": "https://cdn.json2video.com/assets/samples/slideshow-01.jpg", "zoom": 1.05 }
      ]
    },
    {
      "duration": 4,
      "transition": { "style": "fade", "duration": 1 },
      "elements": [
        { "type": "image", "src": "https://cdn.json2video.com/assets/samples/slideshow-02.jpg", "zoom": 1.05 }
      ]
    },
    {
      "duration": 4,
      "transition": { "style": "fade", "duration": 1 },
      "elements": [
        { "type": "image", "src": "https://cdn.json2video.com/assets/samples/slideshow-03.jpg", "zoom": 1.05 }
      ]
    },
    {
      "duration": 4,
      "elements": [
        { "type": "image", "src": "https://cdn.json2video.com/assets/samples/slideshow-04.jpg", "zoom": 1.05 }
      ]
    }
  ],
  "elements": [
    {
      "type": "audio",
      "src": "https://cdn.json2video.com/assets/audios/uplifting-cinematic.mp3",
      "fade-out": 2,
      "volume": 0.6
    }
  ]
}

How it works

Each image gets its own scene with a 4-second duration. A transition block of { "style": "fade", "duration": 1 } on each scene tells the renderer to crossfade out into the next scene over the last second. The zoom: 1.05 on each image adds a subtle Ken Burns zoom that keeps the slideshow visually alive.

Background music is a movie-level audio element — placing it at the movie root (in the top-level elements array, not inside any scene) makes it span the whole render. The fade-out: 2 smooths the end of the music so it doesn't cut abruptly when the last image fades to black. volume: 0.6 reduces the music so it sits comfortably in the mix when you later add voice or subtitles.

To produce a longer slideshow, add more scenes — every scene with the same duration keeps the rhythm consistent. To produce a faster-paced slideshow, drop scene duration to 2 and transition duration to 0.5.

Try it

Replace the src URLs with your own image URLs (uploaded via the Media dashboard, or from any public HTTPS URL) and POST the JSON to POST /v2/movies. See the Quickstart for the full API call.

See also