Skip to main content
This guide shows you how to use the visualContinuity feature to create smooth, seamless transitions between consecutive AI-generated scenes. When enabled, the system uses the output of each scene as a reference for the next, producing a cohesive visual flow throughout your video.

What You Will Learn

Visual Continuity for Video

Create seamless transitions between AI-generated video clips

Visual Continuity for Images

Create visually consistent AI-generated image sequences

Ken Burns Effect

Combine continuity with zoom and pan for cinematic image slideshows

With vs. Without Continuity

Understand the difference continuity makes

Before You Begin

Make sure you have:
npm install axios

How It Works

When visualContinuity is set to true in the aiVisual object:
  1. The first scene in the sequence is generated normally from its prompt (or auto-generated prompt from the story text)
  2. For each subsequent scene, the system extracts a reference from the previous scene’s output:
    • Video scenes: The last frame of the previous video is used as the first frame for the next scene
    • Image scenes: The generated image of the previous scene is used as a reference for the next scene
  3. The AI model blends this reference with the current scene’s prompt to produce a visually consistent result

When Does Continuity Apply?

Visual continuity applies in two scenarios:
  • Within the same story: Consecutive scenes that were split from the same original story (for example, when using createSceneOnEndOfSentence: true)
  • Across consecutive stories: Consecutive scenes from different stories, enabling seamless transitions across story boundaries
In both cases, visualContinuity must be set to true for the system to use the previous scene’s output as a reference.
If visualContinuity is not set or is false, the following behavior applies for consecutive scenes from the same story:
  • Image scenes: All user-provided reference images are cleared, and visuals are generated independently.
  • Video scenes: Only firstFrameImageUrl is cleared if it was provided. However, referenceImageUrls are preserved and still used for generation.

Configuration

Add visualContinuity: true to the aiVisual object in your scene’s background configuration:
{
  "background": {
    "type": "video",
    "aiVisual": {
      "model": "pixverse5.5",
      "visualContinuity": true
    }
  }
}

Prompt Behavior with Auto-Created Scenes

When you provide a story as a paragraph and use createSceneOnNewLine: true and createSceneOnEndOfSentence: true, the system automatically splits your story into multiple scenes. The way the prompt field behaves depends on whether you provide it or not.

Without Prompt (Auto-Generated)

When you omit the prompt field, the system automatically generates a visual prompt for each scene based on that scene’s portion of the story text. This is the simplest approach and works well for most use cases.
{
  "background": {
    "type": "video",
    "aiVisual": {
      "model": "pixverse5.5",
      "visualContinuity": true
    }
  }
}

With Creative Direction Prompt

When you provide a prompt alongside a story that will be split into multiple scenes, the prompt acts as a creative direction for the entire video. Since scenes are not finalized at the time of the request (the system creates them from the story), the creative direction prompt describes the overall visual style and mood rather than any specific scene. The system uses your creative direction to guide the auto-generated prompts for each individual scene. This ensures a consistent visual tone across all scenes while still generating scene-specific content. A good creative direction prompt follows this structure: [Action/Movement] + [Scene/Environment] + [Camera Technique] + [Visual Style] Examples of creative direction prompts:
Creative Direction PromptUse Case
"Slow cinematic panning shots in modern office environments with warm natural lighting and shallow depth of field"Corporate content
"Dynamic aerial drone footage over urban landscapes with fast cuts and vibrant neon color grading"Marketing video
"Gentle zoom transitions in cozy classroom settings with soft pastel tones and hand-drawn illustration style"Educational content
"Smooth tracking shots through futuristic environments with cool blue lighting and minimalist design"Technology content
{
  "background": {
    "type": "video",
    "aiVisual": {
      "model": "pixverse5.5",
      "visualContinuity": true,
      "prompt": "Smooth cinematic tracking shots in modern creative workspaces with warm golden-hour lighting and shallow depth of field"
    }
  }
}
The creative direction prompt applies to the overall video, not to individual scenes. The system combines your creative direction with each scene’s story text to generate scene-specific visual prompts that maintain a consistent style throughout the video.

Examples

Example 1: Single Story Without Prompt

One scene with a story paragraph. The system splits the story into multiple scenes using createSceneOnEndOfSentence and auto-generates a visual prompt for each scene from its story text. Visual continuity ensures each scene flows naturally into the next.
import axios from "axios";

const API_BASE_URL = "https://api.pictory.ai/pictoryapis";
const API_KEY = "YOUR_API_KEY";

async function createContinuityAutoPrompt() {
  const response = await axios.post(
    `${API_BASE_URL}/v2/video/storyboard/render`,
    {
      videoName: "visual-continuity-auto-prompt",
      language: "en",
      backgroundMusic: { enabled: true, autoMusic: true, volume: 0.5 },
      voiceOver: {
        enabled: true,
        aiVoices: [{ speaker: "Jackson", speed: 100, amplificationLevel: 0 }]
      },
      scenes: [
        {
          story: "Every day, millions of content creators, educators, and marketers face the same challenge. They need professional-quality videos but do not have a production team. Hours are spent searching stock libraries for footage that almost fits. Days are lost waiting for design assets. AI-powered video creation changes everything. With a simple text prompt, you can generate custom visuals tailored to your exact narrative. No more settling for generic stock footage. Whether you are building an online course, launching a campaign, or growing your social media presence, AI visuals give you the power to create stunning content in minutes.",
          createSceneOnNewLine: true,
          createSceneOnEndOfSentence: true,
          sceneTransition: "hblur",
          background: {
            type: "video",
            aiVisual: {
              model: "pixverse5.5",
              visualContinuity: true
            }
          }
        }
      ]
    },
    { headers: { "Content-Type": "application/json", Authorization: API_KEY } }
  );

  const jobId = response.data.data.jobId;
  console.log("Job ID:", jobId);

  let jobCompleted = false;
  while (!jobCompleted) {
    const statusResponse = await axios.get(
      `${API_BASE_URL}/v1/jobs/${jobId}`,
      { headers: { Authorization: API_KEY } }
    );
    const status = statusResponse.data.data.status;
    console.log("Status:", status);
    if (status === "completed") {
      jobCompleted = true;
      console.log("Video URL:", statusResponse.data.data.videoURL);
    } else if (status === "failed") {
      throw new Error("Failed: " + JSON.stringify(statusResponse.data));
    }
    await new Promise((resolve) => setTimeout(resolve, 15000));
  }
}

createContinuityAutoPrompt();

Example 2: Single Story with Creative Direction

Same as Example 1, but with a prompt that acts as creative direction for the entire video. Since the story is split into multiple scenes, the prompt guides the overall visual tone rather than describing a specific scene. A good creative direction prompt follows this structure: [Action/Movement] + [Scene/Environment] + [Camera Technique] + [Visual Style].
import axios from "axios";

const API_BASE_URL = "https://api.pictory.ai/pictoryapis";
const API_KEY = "YOUR_API_KEY";

async function createContinuityCreativeDirection() {
  const response = await axios.post(
    `${API_BASE_URL}/v2/video/storyboard/render`,
    {
      videoName: "visual-continuity-creative-direction",
      language: "en",
      backgroundMusic: { enabled: true, autoMusic: true, volume: 0.5 },
      voiceOver: {
        enabled: true,
        aiVoices: [{ speaker: "Jackson", speed: 100, amplificationLevel: 0 }]
      },
      scenes: [
        {
          story: "Every day, millions of content creators, educators, and marketers face the same challenge. They need professional-quality videos but do not have a production team. Hours are spent searching stock libraries for footage that almost fits. Days are lost waiting for design assets. AI-powered video creation changes everything. With a simple text prompt, you can generate custom visuals tailored to your exact narrative. No more settling for generic stock footage. Whether you are building an online course, launching a campaign, or growing your social media presence, AI visuals give you the power to create stunning content in minutes.",
          createSceneOnNewLine: true,
          createSceneOnEndOfSentence: true,
          sceneTransition: "hblur",
          background: {
            type: "video",
            aiVisual: {
              model: "pixverse5.5",
              visualContinuity: true,
              prompt: "Smooth cinematic tracking shots in modern creative workspaces with warm golden-hour lighting and shallow depth of field"
            }
          }
        }
      ]
    },
    { headers: { "Content-Type": "application/json", Authorization: API_KEY } }
  );

  const jobId = response.data.data.jobId;
  console.log("Job ID:", jobId);

  let jobCompleted = false;
  while (!jobCompleted) {
    const statusResponse = await axios.get(
      `${API_BASE_URL}/v1/jobs/${jobId}`,
      { headers: { Authorization: API_KEY } }
    );
    const status = statusResponse.data.data.status;
    console.log("Status:", status);
    if (status === "completed") {
      jobCompleted = true;
      console.log("Video URL:", statusResponse.data.data.videoURL);
    } else if (status === "failed") {
      throw new Error("Failed: " + JSON.stringify(statusResponse.data));
    }
    await new Promise((resolve) => setTimeout(resolve, 15000));
  }
}

createContinuityCreativeDirection();

Example 3: Multiple Scenes with Prompts

Three separate scenes, each with a one-sentence story and a scene-specific prompt. All scenes have visualContinuity: true to maintain smooth visual transitions.
import axios from "axios";

const API_BASE_URL = "https://api.pictory.ai/pictoryapis";
const API_KEY = "YOUR_API_KEY";

async function createContinuityScenePrompts() {
  const response = await axios.post(
    `${API_BASE_URL}/v2/video/storyboard/render`,
    {
      videoName: "visual-continuity-scene-prompts",
      language: "en",
      backgroundMusic: { enabled: true, autoMusic: true, volume: 0.5 },
      voiceOver: {
        enabled: true,
        aiVoices: [{ speaker: "Jackson", speed: 100, amplificationLevel: 0 }]
      },
      scenes: [
        {
          story: "Content creators struggle to find the perfect visuals for their videos.",
          background: {
            type: "video",
            aiVisual: {
              model: "pixverse5.5",
              visualContinuity: true,
              prompt: "A frustrated creator scrolling through endless stock footage on a laptop in a dimly lit room"
            }
          }
        },
        {
          story: "AI-powered tools generate custom visuals from simple text prompts in minutes.",
          background: {
            type: "video",
            aiVisual: {
              model: "pixverse5.5",
              visualContinuity: true,
              prompt: "A bright modern workspace with AI-generated visuals appearing on a large monitor"
            }
          }
        },
        {
          story: "Professional-quality videos are now accessible to educators and marketers everywhere.",
          background: {
            type: "video",
            aiVisual: {
              model: "pixverse5.5",
              visualContinuity: true,
              prompt: "Diverse professionals confidently presenting polished video content on various devices"
            }
          }
        }
      ]
    },
    { headers: { "Content-Type": "application/json", Authorization: API_KEY } }
  );

  const jobId = response.data.data.jobId;
  console.log("Job ID:", jobId);

  let jobCompleted = false;
  while (!jobCompleted) {
    const statusResponse = await axios.get(
      `${API_BASE_URL}/v1/jobs/${jobId}`,
      { headers: { Authorization: API_KEY } }
    );
    const status = statusResponse.data.data.status;
    console.log("Status:", status);
    if (status === "completed") {
      jobCompleted = true;
      console.log("Video URL:", statusResponse.data.data.videoURL);
    } else if (status === "failed") {
      throw new Error("Failed: " + JSON.stringify(statusResponse.data));
    }
    await new Promise((resolve) => setTimeout(resolve, 15000));
  }
}

createContinuityScenePrompts();

Example 4: Multiple Scenes Without Prompts

Three separate scenes, each with a one-sentence story. No prompts are provided, so the system auto-generates a visual prompt from each scene’s story text. Visual continuity connects all scenes.
import axios from "axios";

const API_BASE_URL = "https://api.pictory.ai/pictoryapis";
const API_KEY = "YOUR_API_KEY";

async function createContinuityAutoScenes() {
  const response = await axios.post(
    `${API_BASE_URL}/v2/video/storyboard/render`,
    {
      videoName: "visual-continuity-auto-scenes",
      language: "en",
      backgroundMusic: { enabled: true, autoMusic: true, volume: 0.5 },
      voiceOver: {
        enabled: true,
        aiVoices: [{ speaker: "Jackson", speed: 100, amplificationLevel: 0 }]
      },
      scenes: [
        {
          story: "Content creators struggle to find the perfect visuals for their videos.",
          background: {
            type: "video",
            aiVisual: {
              model: "pixverse5.5",
              visualContinuity: true
            }
          }
        },
        {
          story: "AI-powered tools generate custom visuals from simple text prompts in minutes.",
          background: {
            type: "video",
            aiVisual: {
              model: "pixverse5.5",
              visualContinuity: true
            }
          }
        },
        {
          story: "Professional-quality videos are now accessible to educators and marketers everywhere.",
          background: {
            type: "video",
            aiVisual: {
              model: "pixverse5.5",
              visualContinuity: true
            }
          }
        }
      ]
    },
    { headers: { "Content-Type": "application/json", Authorization: API_KEY } }
  );

  const jobId = response.data.data.jobId;
  console.log("Job ID:", jobId);

  let jobCompleted = false;
  while (!jobCompleted) {
    const statusResponse = await axios.get(
      `${API_BASE_URL}/v1/jobs/${jobId}`,
      { headers: { Authorization: API_KEY } }
    );
    const status = statusResponse.data.data.status;
    console.log("Status:", status);
    if (status === "completed") {
      jobCompleted = true;
      console.log("Video URL:", statusResponse.data.data.videoURL);
    } else if (status === "failed") {
      throw new Error("Failed: " + JSON.stringify(statusResponse.data));
    }
    await new Promise((resolve) => setTimeout(resolve, 15000));
  }
}

createContinuityAutoScenes();

Tracking AI Credits Used

When your video includes AI-generated visuals, the job response includes an aiCreditsUsed field that reports the total AI credits consumed across all scenes. This field is present only when at least one scene used aiVisual configuration.
{
    "job_id": "a1d36612-326d-4b81-aece-411f8aed4c70",
    "success": true,
    "data": {
        "status": "completed",
        "aiCreditsUsed": 24
    }
}
Use this value to track credit consumption and manage your AI credit budget. For detailed job response documentation, refer to the Get Storyboard Preview Job or Get Video Render Job API reference.

Best Practices

Visual continuity works best when:
  • Your story follows a consistent narrative or theme
  • You want a polished, professional look with smooth transitions
  • Scenes are part of the same visual journey (for example, a product walkthrough or a story arc)
Consider turning it off when:
  • Scenes represent completely different topics or settings
  • You want each scene to have a distinct, independent visual style
  • You are mixing different AI models across scenes
For the best results, pair visualContinuity with scene transitions like "hblur". This creates a double layer of smoothness:
  • Visual continuity ensures the content of consecutive scenes is visually related
  • Scene transitions ensure the playback between scenes is smooth
{
  "sceneTransition": "hblur",
  "background": {
    "type": "video",
    "aiVisual": {
      "model": "pixverse5.5",
      "visualContinuity": true
    }
  }
}
When using AI-generated images with visual continuity, enable the Ken Burns effect to add subtle zoom and pan animations. This transforms a slideshow of static images into a dynamic, cinematic experience.
{
  "background": {
    "type": "image",
    "aiVisual": {
      "model": "nanobanana",
      "visualContinuity": true,
      "mediaStyle": "photorealistic"
    },
    "settings": {
      "kenBurnsEffect": true
    }
  }
}

Troubleshooting

Cause: visualContinuity is not set to true, or scenes are not consecutive.Resolution:
  1. Ensure visualContinuity is set to true in the aiVisual object for all scenes that should be connected
  2. Verify that scenes are consecutive in the scenes array
  3. Remember that visual continuity has no effect on the first scene in a sequence
Cause: The previous scene’s output may not have been available as a reference.Resolution:
  1. When continuity is active and the previous scene’s output is unavailable, the system falls back to generating the visual without a reference image
  2. Ensure all scenes in the sequence have valid story text or prompts
  3. Verify that your AI credit balance is sufficient for all scenes

Next Steps

First Frame Image

Control the starting frame of AI-generated video clips

Reference Image for Images

Guide AI image generation with a reference image

Reference Images for Videos

Guide AI video generation with reference images

AI-Generated Background Images

Learn the basics of AI image generation for scene backgrounds

API Reference

Render Storyboard Video

Direct video rendering with AI visuals

Create Storyboard Preview

Create preview before rendering