Skip to main content
This guide shows you how to use AI-generated video clips as scene backgrounds. Instead of stock footage, generate unique motion video clips from text prompts using AI video models — each offering different quality levels, durations, and AI credit costs.

What You’ll Learn

AI Video Generation

Generate unique video clips as scene backgrounds

Video Models

Choose from Pixverse 5.5, Veo 3.1 Fast, and Veo 3.1

Duration Control

Configure clip duration from 4 to 10 seconds per model

AI Credit Costs

Understand per-second credit costs for each model

Before You Begin

Make sure you have:
  • A Pictory API key (get one here)
  • Node.js or Python installed on your machine
  • Sufficient AI credits in your account (video generation costs more than image generation)
  • Basic understanding of AI video generation concepts
npm install axios

How It Works

When you set background.type to "video" and provide an aiVisual configuration, Pictory generates a unique AI video clip for the scene background:
  1. Prompt Processing — Your text prompt (or auto-generated prompt from story text) describes the desired motion video
  2. Video Generation — The chosen video model creates a unique clip of the specified duration
  3. Scene Integration — The generated video clip is used as the scene background
AI video generation takes significantly longer than image generation and costs more AI credits. The credit cost is calculated per second of video generated. Plan for additional processing time and budget accordingly.

Configuration Reference

Background Object

When using AI-generated video clips, set the background object on a scene as follows:
ParameterTypeRequiredDescription
typestringYesMust be "video" for AI-generated video clips
aiVisualobjectYesAI video generation configuration (see below)
Mutually Exclusive: The background object can only have one of visualUrl, color, or aiVisual. You cannot combine them in the same scene.

aiVisual Parameters

ParameterTypeRequiredDescription
promptstringNoText description of the video to generate (max 250 characters). If omitted, a prompt is auto-generated from the scene’s story text.
modelstringYesThe AI video model to use. See Available Video Models.
videoDurationstringNoDuration of the generated clip. Valid values depend on the model. See Duration Options. If omitted, the model’s default (shortest) duration is used.

Available Video Models

Each model has different quality, supported durations, aspect ratios, and per-second AI credit costs.
Model IDDisplay NameAI Credits (per second)Best For
pixverse5.5Pixverse 5.51.6Reliable for basic motion
veo3.1_fastVeo 3.1 Fast10Efficient cinematic quality
veo3.1Veo 3.120Superior cinematic quality

Duration Options

Each model supports specific clip durations. If videoDuration is omitted or invalid for the selected model, the first (shortest) duration is used as the default.
ModelAvailable DurationsDefault
pixverse5.5"5s", "8s", "10s""5s"
veo3.1_fast"4s", "6s", "8s""4s"
veo3.1"4s", "6s", "8s""4s"

Supported Aspect Ratios

The video aspect ratio is determined by the aspectRatio property at the top level of the request. Different models support different aspect ratios:
ModelSupported Aspect Ratios
pixverse5.516:9, 9:16, 1:1
veo3.1_fast16:9, 9:16
veo3.116:9, 9:16
If the request’s aspectRatio is not supported by the selected video model, the system automatically falls back to the model’s first supported aspect ratio.

AI Credit Cost Calculator

AI credits for video generation are calculated as: credits per second x duration in seconds.
Model4s5s6s8s10s
pixverse5.5812.816
veo3.1_fast406080
veo3.180120160
Cost-Saving Strategy:
  • Use pixverse5.5 at "5s" (8 credits) for testing and drafts
  • Use shorter durations when possible — a 4s clip costs half of an 8s clip
  • Reserve veo3.1 for final production where cinematic quality matters

Complete Example

import axios from "axios";

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

async function createVideoWithAIBackgroundVideoClips() {
  try {
    console.log("Creating video with AI-generated background video clips...");

    const response = await axios.post(
      `${API_BASE_URL}/v2/video/storyboard/render`,
      {
        videoName: "ai_background_video_clips_demo",
        aspectRatio: "16:9",
        scenes: [
          {
            story: "The future of technology is unfolding before our eyes.",
            createSceneOnEndOfSentence: false,
            background: {
              type: "video",
              aiVisual: {
                prompt: "Futuristic cityscape at night with flying vehicles and neon holographic signs",
                model: "pixverse5.5",
                videoDuration: "8s",
              },
            },
          },
          {
            story: "Innovation drives progress in every industry around the world.",
            createSceneOnEndOfSentence: false,
            background: {
              type: "video",
              aiVisual: {
                prompt: "Aerial view of a modern smart factory with robotic arms and glowing assembly lines",
                model: "veo3.1_fast",
                videoDuration: "6s",
              },
            },
          },
        ],
      },
      {
        headers: {
          "Content-Type": "application/json",
          Authorization: API_KEY,
        },
      }
    );

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

    // Poll for completion
    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("Video creation failed: " + JSON.stringify(statusResponse.data));
      }

      await new Promise((resolve) => setTimeout(resolve, 10000));
    }
  } catch (error) {
    console.error("Error:", error.response?.data || error.message);
    throw error;
  }
}

createVideoWithAIBackgroundVideoClips();

Auto-Generated Prompts

You can omit the prompt field to let the AI automatically generate a prompt based on your scene’s story text:
background: {
  type: "video",
  aiVisual: {
    model: "pixverse5.5",
    videoDuration: "5s"
    // No prompt — AI generates one from story text
  }
}
This is useful when:
  • Creating multi-scene videos with createSceneOnEndOfSentence: true
  • You want the AI to visually interpret your story as motion video
  • Quick content creation without manual prompt writing

Common Use Cases

Product Demo with Motion Background

background: {
  type: "video",
  aiVisual: {
    prompt: "Sleek product showcase on rotating platform with soft studio lighting",
    model: "veo3.1",
    videoDuration: "6s"
  }
}
AI Credits: 120 (6s x 20 credits/sec)

Tech Content with Budget-Friendly Clips

background: {
  type: "video",
  aiVisual: {
    prompt: "Abstract flowing data particles and digital network connections",
    model: "pixverse5.5",
    videoDuration: "5s"
  }
}
AI Credits: 8 (5s x 1.6 credits/sec)

Cinematic Storytelling

background: {
  type: "video",
  aiVisual: {
    prompt: "Dramatic aerial flyover of mountain landscape at golden hour",
    model: "veo3.1",
    videoDuration: "8s"
  }
}
AI Credits: 160 (8s x 20 credits/sec)

Balanced Quality and Cost

background: {
  type: "video",
  aiVisual: {
    prompt: "Modern city street with pedestrians and light traffic at sunset",
    model: "veo3.1_fast",
    videoDuration: "4s"
  }
}
AI Credits: 40 (4s x 10 credits/sec)

Mixing Image and Video Backgrounds

You can use AI-generated images for some scenes and AI-generated video clips for others in the same video:
scenes: [
  {
    story: "Introduction to our product line.",
    background: {
      type: "image",
      aiVisual: {
        prompt: "Clean product lineup on white background",
        model: "seedream3.0",
        mediaStyle: "minimalist"
      }
    }
  },
  {
    story: "See our product in action.",
    background: {
      type: "video",
      aiVisual: {
        prompt: "Product being used in a modern home environment with natural motion",
        model: "pixverse5.5",
        videoDuration: "8s"
      }
    }
  }
]

Best Practices

Video prompts should describe motion and action, not just a static scene:
  • Include movement: “camera slowly panning across”, “particles flowing”, “waves crashing”
  • Describe transitions: “sunrise gradually illuminating”, “zoom into details”
  • Be specific about motion: “cars driving through city streets” vs. just “city street”
  • Keep under 250 characters: Focused prompts produce better results
Good: “Aerial drone shot slowly flying over a tropical coastline with turquoise waves rolling onto white sand”Poor: “Beach scene”
ScenarioRecommended ModelDurationTotal Cost
Testing & draftspixverse5.5"5s"8 credits
General contentpixverse5.5"8s"12.8 credits
Professional qualityveo3.1_fast"6s"60 credits
Premium cinematicveo3.1"8s"160 credits
Start with pixverse5.5 for iteration, then switch to veo3.1_fast or veo3.1 for production.
Video generation can consume credits quickly. Plan your budget:
  • Use shorter durations when possible — 4s is often enough for a single scene
  • Use pixverse5.5 for scenes where basic motion is sufficient
  • Reserve veo3.1 for hero scenes that need premium quality
  • Mix AI video clips with AI images or stock visuals across scenes to manage costs
AI video generation takes significantly longer than image generation:
  • pixverse5.5: Fastest video generation
  • veo3.1_fast: Moderate processing time
  • veo3.1: Longest processing time but highest quality
  • Multiple scenes with AI video clips will multiply total processing time
  • Consider using AI video for key scenes only
Not all models support all aspect ratios:
  • pixverse5.5 supports 16:9, 9:16, 1:1
  • veo3.1_fast and veo3.1 only support 16:9 and 9:16
  • If your video uses 1:1 aspect ratio, use pixverse5.5
  • The system auto-corrects unsupported aspect ratios to the model’s default

Troubleshooting

  • Add motion-specific language to your prompt: “slowly panning”, “zooming in”, “flowing”
  • Avoid static descriptions — describe what’s happening, not just what’s there
  • Try a higher-quality model for more nuanced motion rendering
Each model has specific valid durations:
  • pixverse5.5: "5s", "8s", "10s"
  • veo3.1_fast: "4s", "6s", "8s"
  • veo3.1: "4s", "6s", "8s"
Make sure you use a duration supported by your selected model.
// Correct
background: {
  type: "video",
  aiVisual: {
    model: "pixverse5.5",
    videoDuration: "5s"
  }
}

// Wrong — type must be "video" for video models
background: {
  type: "image",
  aiVisual: {
    model: "pixverse5.5",
    videoDuration: "5s"
  }
}

// Wrong — missing type
background: {
  aiVisual: {
    model: "veo3.1",
    videoDuration: "6s"
  }
}

// Wrong — mixing background types
background: {
  type: "video",
  visualUrl: "https://...",
  aiVisual: { model: "pixverse5.5" }
}
Video generation costs AI credits per second. Check your balance:
  • A veo3.1 clip at "8s" costs 160 credits per scene
  • Switch to pixverse5.5 at "5s" (8 credits) for budget-friendly generation
  • Reduce videoDuration to lower the cost
If you specify an aspect ratio not supported by the video model, the system automatically falls back to the model’s default:
  • veo3.1 / veo3.1_fast only support 16:9 and 9:16
  • Use pixverse5.5 for 16:9, 9:16, and 1:1 aspect ratios

Next Steps

API Reference