Skip to main content
This guide shows you how to use AI-generated images as scene backgrounds in your videos. Instead of stock visuals, generate custom images from text prompts using a variety of AI image models, each with different quality levels and AI credit costs.

What You’ll Learn

AI Image Generation

Generate unique images with AI instead of stock visuals

Image Models

Choose from Flux, Seedream, Nano Banana, and Nano Banana Pro

Media Styles

Apply styles like photorealistic, artistic, cartoon, and more

AI Credit Costs

Understand per-image credit costs for each model

Before You Begin

Make sure you have:
  • A Pictory API key
  • Node.js or Python installed on your machine
  • Sufficient AI credits in your account
  • Basic understanding of AI image generation concepts

How It Works

When you set background.type to "image" and provide an aiVisual configuration, Pictory generates a unique AI image for the scene background:
  1. Prompt Processing: Your text prompt (or auto-generated prompt from story text) is analyzed
  2. Style Application: The selected mediaStyle is applied to shape the visual output
  3. AI Generation: The chosen image model creates a unique image
  4. Scene Integration: The generated image is used as the scene background
AI image generation takes additional processing time compared to stock visuals. The time varies by model: faster models like Flux generate in seconds, while higher-quality models take longer.

Configuration Reference

Background Object

When using AI-generated images, set the background object on a scene as follows:
Mutually Exclusive: The background object can only have one of visualUrl, color, or aiVisual. You cannot combine them in the same scene.

aiVisual Parameters

The videoDuration parameter is not allowed when type is "image". It is only used for AI-generated video clips.

Available Image Models

Each model has different strengths and AI credit costs. Choose based on your quality requirements and budget.
Model Selection Strategy:
  • Use flux-schnell (0.6 credits) for quick iterations, testing, and drafts
  • Use seedream3.0 (2 credits) when your image includes text or numbers
  • Use nanobanana (4 credits) when you need fine detail and precision
  • Use nanobanana-pro (14 credits) for premium, cinematic-quality final output

Available Media Styles

The mediaStyle parameter shapes the look and feel of the generated image. It is optional; if omitted, the model uses its default rendering style.

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.

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].

Example 3: Multiple Scenes with Prompts

Three separate scenes, each with a one-sentence story and a scene-specific prompt. The prompt directly describes the visual for that scene.

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.

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.
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

  • Be specific: Include details about composition, lighting, and mood
  • Use descriptive language: “bright morning sunlight streaming through glass walls” vs “sunny room”
  • Mention key elements: “modern office with glass walls and city skyline view”
  • Keep under 500 characters: Concise prompts produce more focused results
  • Avoid negatives: Describe what you want, not what you do not want
Good: “Professional business meeting in modern conference room with natural light and city view”Poor: “Not a dark room, people talking, no clutter”
Start with flux-schnell for iteration, then switch to a higher-quality model for production.
  • Corporate/Professional: photorealistic or minimalist
  • Creative/Artistic: artistic or vintage
  • Tech/Innovation: futuristic
  • Educational/Fun: cartoon
  • Consistent branding: Stick to one style across scenes
If your image needs to display readable text or numbers, use seedream3.0; it is specifically optimized for rendering text and numbers clearly within generated images.

Troubleshooting

  • Make your prompt more specific and detailed
  • Add descriptive adjectives: “bright”, “modern”, “spacious”
  • Specify composition: “aerial view”, “close-up”, “wide angle”
  • Include lighting details: “sunset lighting”, “studio lighting”
  • Try a different model; each interprets prompts differently
  • Switch to a higher-quality model (nanobanana or nanobanana-pro)
  • Avoid overly complex prompts; keep them focused
  • Try a different mediaStyle that suits the content
Ensure your configuration follows these rules:
Each image generation costs AI credits based on the model used. Check your credit balance and consider using a more economical model like flux-schnell (0.6 credits per image).

Next Steps

AI-Generated Video Clips

Use AI-generated video clips as scene backgrounds

AI Voice-Over

Add professional narration to your videos

Brand Settings

Apply consistent branding automatically

Background Music

Add music to complement your visuals

API Reference

Render Storyboard Video

Direct video rendering with AI visuals

Create Storyboard Preview

Create preview before rendering

Get Storyboard Preview Job

Monitor storyboard creation progress

Search Media

Search stock visuals as alternative to AI