referenceImageUrls field to guide AI video generation with one or two reference images. Unlike firstFrameImageUrl which sets the starting frame, reference images influence the overall style, composition, and visual tone of the generated video clip.
What You Will Learn
Style-Guided Video
Generate video clips that match the style of your reference images
Multiple References
Provide up to two reference images for richer style blending
Creative Control
Combine reference images with prompts for precise video generation
Validation Rules
Understand constraints and model-specific behavior
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
- One or two publicly accessible image URLs to use as references
- Familiarity with AI-generated background video clips
How It Works
When you providereferenceImageUrls in the aiVisual object:
- The AI model analyzes the reference images for style, color palette, composition, and visual tone
- Your text prompt describes the motion and subject matter for the video
- The model generates a video clip that incorporates the visual characteristics from the reference images
- With two reference images, the model blends style elements from both for a richer result
referenceImageUrls is only available when background.type is "video". For image generation, use referenceImageUrl instead.Configuration
AddreferenceImageUrls to the aiVisual object with an array of 1–2 valid image URLs:
Examples
Example 1: Single Story Without Prompt
One scene with a story paragraph and reference images to guide style. The system splits the story into multiple scenes and auto-generates prompts. The reference images influence the visual style of all generated video clips.Example 2: Single Story with Creative Direction
Same as Example 1, but with aprompt 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].
Example 3: Multiple Scenes with Prompts
Three separate scenes, each with a one-sentence story, a scene-specific prompt, and reference images. This example shows a mix of one and two reference images across scenes.Example 4: Multiple Scenes Without Prompts
Three separate scenes, each with a one-sentence story and reference images. No prompts are provided, so the system auto-generates a visual prompt from each scene’s story text.Tracking AI Credits Used
When your video includes AI-generated visuals, the job response includes anaiCreditsUsed field that reports the total AI credits consumed across all scenes. This field is present only when at least one scene used aiVisual configuration.
Best Practices
Choose Complementary Reference Images
Choose Complementary Reference Images
When using two reference images:
- Choose images that complement each other rather than conflict
- One image can provide color/mood while the other provides composition/structure
- Avoid two images with vastly different styles, as the AI may produce inconsistent results
Write Motion-Focused Prompts
Write Motion-Focused Prompts
Since you are generating video, your prompt should describe motion and action:
- Good: “Camera slowly panning across a landscape with clouds drifting overhead”
- Poor: “A beautiful landscape” (describes a static scene)
Consider Model-Specific Behavior
Consider Model-Specific Behavior
When using
veo3.1 or veo3.1_fast with reference images, the duration is automatically set to "8s". Plan your scene duration accordingly:- If you need shorter clips, consider using
pixverse5.5instead - If
"8s"works for your scene,veo3.1_fastprovides higher quality with reference images
Ensure Image Accessibility
Ensure Image Accessibility
- All image URLs must be publicly accessible (no authentication required)
- Use direct image URLs (not page URLs that contain images)
- Supported formats include JPEG, PNG, and WebP
- The array must contain 1–2 URLs (minimum 1, maximum 2)
Troubleshooting
Error: referenceImageUrls Is Only Allowed When Type Is Video
Error: referenceImageUrls Is Only Allowed When Type Is Video
Cause:
referenceImageUrls is used with type: "image".Resolution:- Change
typeto"video"if you want to generate video clips - For image generation, use
referenceImageUrl(singular) instead
Error: firstFrameImageUrl and referenceImageUrls Cannot Be Provided Together
Error: firstFrameImageUrl and referenceImageUrls Cannot Be Provided Together
Cause: Both
firstFrameImageUrl and referenceImageUrls are provided in the same scene.Resolution:firstFrameImageUrlcontrols the starting frame;referenceImageUrlsguides overall style- Choose the approach that fits your use case and remove the other field
Video Duration Forced to 8s with Veo Models
Video Duration Forced to 8s with Veo Models
Cause: When using
referenceImageUrls with veo3.1 or veo3.1_fast, the duration is automatically set to "8s".Resolution:- This is expected behavior and cannot be overridden for these models
- If you need a different duration, use
pixverse5.5instead, which supports"5s","8s", and"10s"with reference images
Generated Video Does Not Reflect Reference Image Style
Generated Video Does Not Reflect Reference Image Style
Cause: The AI model may weigh the text prompt more heavily than the reference images.Resolution:
- Use reference images with strong, distinctive style characteristics
- Simplify your text prompt to give the reference images more influence
- Try a different model for better style adherence
Next Steps
Visual Continuity
Create seamless transitions between consecutive scenes
First Frame Image
Control the starting frame of AI-generated video clips
Reference Image for Images
Guide AI image generation with a reference image
AI-Generated Video Clips
Learn the basics of AI video clip generation
API Reference
Render Storyboard Video
Direct video rendering with AI visuals
Create Storyboard Preview
Create preview before rendering
