> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pictory.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# AI-Generated Scene Background Images

> Generate unique AI images as scene backgrounds using models like Flux, Seedream, Nano Banana 2, and Nano Banana Pro

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

> [card] AI Image Generation
>
> Generate unique images with AI instead of stock visuals

> [card] Image Models
>
> Choose from Flux, Seedream, Nano Banana, Nano Banana 2, Nano Banana Lite 2, and Nano Banana Pro

> [card] Media Styles
>
> Apply styles like photorealistic, artistic, cartoon, and more

> [card] AI Credit Costs
>
> Understand per-image credit costs for each model

## Before You Begin

Make sure you have:

* A [Pictory API key](https://app.pictory.ai/api-access)
* Node.js or Python installed on your machine
* Sufficient AI credits in your account
* Basic understanding of AI image generation concepts

```bash npm theme={null}
npm install axios
```

```bash pip theme={null}
pip install requests
```

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

> [!NOTE]
>
> 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:

| Parameter | Type | Required | Description |
| - | - | - | - |
| `type` | string | Yes | Must be `"image"` for AI-generated images |
| `aiVisual` | object | Yes | AI image generation configuration (see below) |

> [!WARNING]
>
> **Mutually Exclusive:** The `background` object can only have **one** of `visualUrl`, `color`, or `aiVisual`. You cannot combine them in the same scene.

### `aiVisual` Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `prompt` | string | No | Text description of the image to generate (max 500 characters). If omitted, a prompt is auto-generated from the scene's story text. |
| `model` | string | Yes | The AI image model to use. See [Available Image Models](#available-image-models). |
| `mediaStyle` | string | No | Visual style to apply. See [Available Media Styles](#available-media-styles). Applied by the prompt enhancer, so it turns enhancement on unless `enhancePrompt` is `false`. |
| `referenceImageUrls` | string\[] | No | Reference images to edit or combine: up to 4 (not supported on `flux-schnell`). The single `referenceImageUrl` still works. |
| `trainingPreset` | string | No | `sales-training`, `product-training`, or `soft-skills-training`. |
| `enhancePrompt` | boolean | No | Rewrite a prompt you wrote with the AI enhancer. Off by default. |

> [!NOTE]
>
> The `videoDuration` parameter is **not allowed** when `type` is `"image"`. It is only used for [AI-generated video clips](https://docs.pictory.ai/guides/ai-generated-visuals/background-videos.md).

## Available Image Models

Each model has different strengths and AI credit costs. Choose based on your quality requirements and budget.

| Model ID | Display Name | AI Credits (per image) | Best For | Supported Aspect Ratios |
| - | - | - | - | - |
| `flux-schnell` | Flux | 0.9 | Reliable for basic layouts | `1:1`, `16:9`, `9:16` |
| `seedream3.0` | Seedream | 3 | Reliable for text and numbers | `1:1`, `16:9`, `9:16` |
| `nanobanana-lite2` | Nano Banana Lite 2 | 6 | Fast, budget detail | `1:1`, `16:9`, `9:16` |
| `nanobanana` | Nano Banana | 6 | Excels at details | `1:1`, `16:9`, `9:16` |
| `nanobanana2` | Nano Banana 2 | 12 | Strong multi-reference edits | `1:1`, `16:9`, `9:16` |
| `nanobanana-pro` | Nano Banana Pro | 21 | Superior cinematic quality | `1:1`, `16:9`, `9:16` |

> [!TIP]
>
> **Model Selection Strategy:**
>
> * Use `flux-schnell` (0.9 credits) for quick iterations, testing, and drafts
> * Use `seedream3.0` (3 credits) when your image includes text or numbers
> * Use `nanobanana` (6 credits) when you need fine detail and precision
> * Use `nanobanana-pro` (21 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.

| Style | Visual Characteristics | Best Used For |
| - | - | - |
| `photorealistic` | Realistic photographs, natural lighting | Corporate videos, professional presentations, realistic scenarios |
| `artistic` | Artistic renderings, painterly effects | Creative content, brand storytelling, abstract concepts |
| `cartoon` | Cartoon-style imagery, bold colors | Children's content, educational videos, fun marketing |
| `minimalist` | Simple, clean designs, reduced details | Modern branding, tech content, professional minimalism |
| `vintage` | Retro aesthetic, aged appearance | Nostalgia marketing, historical content, unique branding |
| `futuristic` | Modern, sci-fi look, high-tech feel | Technology content, innovation topics, forward-thinking brands |

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

```javascript Node.js theme={null}
import axios from "axios";

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

async function createImagesWithAutoPrompt() {
  const response = await axios.post(
    `${API_BASE_URL}/v2/video/storyboard/render`,
    {
      videoName: "ai-images-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,
          background: {
            type: "image",
            aiVisual: {
              model: "nanobanana",
              mediaStyle: "photorealistic"
            }
          }
        }
      ]
    },
    { 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, 10000));
  }
}

createImagesWithAutoPrompt();
```

```python Python theme={null}
import requests
import time

API_BASE_URL = 'https://api.pictory.ai/pictoryapis'
API_KEY = 'YOUR_API_KEY'

def create_images_with_auto_prompt():
    response = requests.post(
        f'{API_BASE_URL}/v2/video/storyboard/render',
        json={
            'videoName': 'ai-images-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,
                    'background': {
                        'type': 'image',
                        'aiVisual': {
                            'model': 'nanobanana',
                            'mediaStyle': 'photorealistic'
                        }
                    }
                }
            ]
        },
        headers={'Content-Type': 'application/json', 'Authorization': API_KEY},
    )
    response.raise_for_status()

    job_id = response.json()['data']['jobId']
    print(f"Job ID: {job_id}")

    job_completed = False
    while not job_completed:
        status_response = requests.get(
            f'{API_BASE_URL}/v1/jobs/{job_id}',
            headers={'Authorization': API_KEY},
        )
        status_response.raise_for_status()
        status = status_response.json()['data']['status']
        print(f"Status: {status}")
        if status == 'completed':
            job_completed = True
            print(f"Video URL: {status_response.json()['data']['videoURL']}")
        elif status == 'failed':
            raise Exception(f"Failed: {status_response.json()}")
        time.sleep(10)

if __name__ == '__main__':
    create_images_with_auto_prompt()
```

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

```javascript Node.js theme={null}
import axios from "axios";

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

async function createImagesWithCreativeDirection() {
  const response = await axios.post(
    `${API_BASE_URL}/v2/video/storyboard/render`,
    {
      videoName: "ai-images-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,
          background: {
            type: "image",
            aiVisual: {
              model: "nanobanana",
              mediaStyle: "photorealistic",
              prompt: "Wide-angle establishing shots of diverse professionals in bright, airy coworking spaces with large windows and natural daylight"
            }
          }
        }
      ]
    },
    { 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, 10000));
  }
}

createImagesWithCreativeDirection();
```

```python Python theme={null}
import requests
import time

API_BASE_URL = 'https://api.pictory.ai/pictoryapis'
API_KEY = 'YOUR_API_KEY'

def create_images_with_creative_direction():
    response = requests.post(
        f'{API_BASE_URL}/v2/video/storyboard/render',
        json={
            'videoName': 'ai-images-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,
                    'background': {
                        'type': 'image',
                        'aiVisual': {
                            'model': 'nanobanana',
                            'mediaStyle': 'photorealistic',
                            'prompt': 'Wide-angle establishing shots of diverse professionals in bright, airy coworking spaces with large windows and natural daylight'
                        }
                    }
                }
            ]
        },
        headers={'Content-Type': 'application/json', 'Authorization': API_KEY},
    )
    response.raise_for_status()

    job_id = response.json()['data']['jobId']
    print(f"Job ID: {job_id}")

    job_completed = False
    while not job_completed:
        status_response = requests.get(
            f'{API_BASE_URL}/v1/jobs/{job_id}',
            headers={'Authorization': API_KEY},
        )
        status_response.raise_for_status()
        status = status_response.json()['data']['status']
        print(f"Status: {status}")
        if status == 'completed':
            job_completed = True
            print(f"Video URL: {status_response.json()['data']['videoURL']}")
        elif status == 'failed':
            raise Exception(f"Failed: {status_response.json()}")
        time.sleep(10)

if __name__ == '__main__':
    create_images_with_creative_direction()
```

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

```javascript Node.js theme={null}
import axios from "axios";

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

async function createImagesWithScenePrompts() {
  const response = await axios.post(
    `${API_BASE_URL}/v2/video/storyboard/render`,
    {
      videoName: "ai-images-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: "image",
            aiVisual: {
              model: "nanobanana",
              mediaStyle: "photorealistic",
              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: "image",
            aiVisual: {
              model: "nanobanana",
              mediaStyle: "photorealistic",
              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: "image",
            aiVisual: {
              model: "nanobanana",
              mediaStyle: "photorealistic",
              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, 10000));
  }
}

createImagesWithScenePrompts();
```

```python Python theme={null}
import requests
import time

API_BASE_URL = 'https://api.pictory.ai/pictoryapis'
API_KEY = 'YOUR_API_KEY'

def create_images_with_scene_prompts():
    response = requests.post(
        f'{API_BASE_URL}/v2/video/storyboard/render',
        json={
            'videoName': 'ai-images-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': 'image',
                        'aiVisual': {
                            'model': 'nanobanana',
                            'mediaStyle': 'photorealistic',
                            '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': 'image',
                        'aiVisual': {
                            'model': 'nanobanana',
                            'mediaStyle': 'photorealistic',
                            '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': 'image',
                        'aiVisual': {
                            'model': 'nanobanana',
                            'mediaStyle': 'photorealistic',
                            'prompt': 'Diverse professionals confidently presenting polished video content on various devices'
                        }
                    }
                }
            ]
        },
        headers={'Content-Type': 'application/json', 'Authorization': API_KEY},
    )
    response.raise_for_status()

    job_id = response.json()['data']['jobId']
    print(f"Job ID: {job_id}")

    job_completed = False
    while not job_completed:
        status_response = requests.get(
            f'{API_BASE_URL}/v1/jobs/{job_id}',
            headers={'Authorization': API_KEY},
        )
        status_response.raise_for_status()
        status = status_response.json()['data']['status']
        print(f"Status: {status}")
        if status == 'completed':
            job_completed = True
            print(f"Video URL: {status_response.json()['data']['videoURL']}")
        elif status == 'failed':
            raise Exception(f"Failed: {status_response.json()}")
        time.sleep(10)

if __name__ == '__main__':
    create_images_with_scene_prompts()
```

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

```javascript Node.js theme={null}
import axios from "axios";

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

async function createImagesAutoScenes() {
  const response = await axios.post(
    `${API_BASE_URL}/v2/video/storyboard/render`,
    {
      videoName: "ai-images-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: "image",
            aiVisual: {
              model: "nanobanana",
              mediaStyle: "photorealistic"
            }
          }
        },
        {
          story: "AI-powered tools generate custom visuals from simple text prompts in minutes.",
          background: {
            type: "image",
            aiVisual: {
              model: "nanobanana",
              mediaStyle: "photorealistic"
            }
          }
        },
        {
          story: "Professional-quality videos are now accessible to educators and marketers everywhere.",
          background: {
            type: "image",
            aiVisual: {
              model: "nanobanana",
              mediaStyle: "photorealistic"
            }
          }
        }
      ]
    },
    { 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, 10000));
  }
}

createImagesAutoScenes();
```

```python Python theme={null}
import requests
import time

API_BASE_URL = 'https://api.pictory.ai/pictoryapis'
API_KEY = 'YOUR_API_KEY'

def create_images_auto_scenes():
    response = requests.post(
        f'{API_BASE_URL}/v2/video/storyboard/render',
        json={
            'videoName': 'ai-images-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': 'image',
                        'aiVisual': {
                            'model': 'nanobanana',
                            'mediaStyle': 'photorealistic'
                        }
                    }
                },
                {
                    'story': 'AI-powered tools generate custom visuals from simple text prompts in minutes.',
                    'background': {
                        'type': 'image',
                        'aiVisual': {
                            'model': 'nanobanana',
                            'mediaStyle': 'photorealistic'
                        }
                    }
                },
                {
                    'story': 'Professional-quality videos are now accessible to educators and marketers everywhere.',
                    'background': {
                        'type': 'image',
                        'aiVisual': {
                            'model': 'nanobanana',
                            'mediaStyle': 'photorealistic'
                        }
                    }
                }
            ]
        },
        headers={'Content-Type': 'application/json', 'Authorization': API_KEY},
    )
    response.raise_for_status()

    job_id = response.json()['data']['jobId']
    print(f"Job ID: {job_id}")

    job_completed = False
    while not job_completed:
        status_response = requests.get(
            f'{API_BASE_URL}/v1/jobs/{job_id}',
            headers={'Authorization': API_KEY},
        )
        status_response.raise_for_status()
        status = status_response.json()['data']['status']
        print(f"Status: {status}")
        if status == 'completed':
            job_completed = True
            print(f"Video URL: {status_response.json()['data']['videoURL']}")
        elif status == 'failed':
            raise Exception(f"Failed: {status_response.json()}")
        time.sleep(10)

if __name__ == '__main__':
    create_images_auto_scenes()
```

***

## 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. The response below is for Example 3 or Example 4: three `nanobanana` images, 6 credits each.

```json theme={null}
{
    "job_id": "a1d36612-326d-4b81-aece-411f8aed4c70",
    "success": true,
    "data": {
        "status": "completed",
        "aiCreditsUsed": 18
    }
}
```

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](https://docs.pictory.ai/api-reference/jobs/get-storyboard-preview-job-by-id.md) or [Get Video Render Job](https://docs.pictory.ai/api-reference/jobs/get-video-render-job-by-id.md) API reference.

***

## Best Practices

> [accordion] Write Effective Prompts
>
> * **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"

> [accordion] Choose the Right Model for Your Budget
>
> | Scenario | Recommended Model | Cost |
> | - | - | - |
> | Testing & drafts | `flux-schnell` | 0.9 credits |
> | General content | `seedream3.0` | 3 credits |
> | Detail-rich scenes | `nanobanana` | 6 credits |
> | Premium final output | `nanobanana-pro` | 21 credits |
>
> Start with `flux-schnell` for iteration, then switch to a higher-quality model for production.

> [accordion] Match Media Style to Your Brand
>
> * **Corporate/Professional:** `photorealistic` or `minimalist`
> * **Creative/Artistic:** `artistic` or `vintage`
> * **Tech/Innovation:** `futuristic`
> * **Educational/Fun:** `cartoon`
> * **Consistent branding:** Stick to one style across scenes

> [accordion] Use Text-Rendering Models for Text in Images
>
> 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

> [accordion] Generated Image Does Not Match Prompt
>
> * 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

> [accordion] Image quality is low
>
> * 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

> [accordion] Error: Invalid background configuration
>
> Ensure your configuration follows these rules:
>
> ```javascript theme={null}
> // Correct
> background: {
>   type: "image",
>   aiVisual: {
>     model: "flux-schnell",
>     mediaStyle: "photorealistic"
>   }
> }
>
> // Wrong: missing type
> background: {
>   aiVisual: { model: "flux-schnell" }
> }
>
> // Wrong: mixing background types
> background: {
>   type: "image",
>   visualUrl: "https://...",
>   aiVisual: { model: "flux-schnell" }
> }
>
> // Wrong: videoDuration not allowed for images
> background: {
>   type: "image",
>   aiVisual: {
>     model: "flux-schnell",
>     videoDuration: "5s"
>   }
> }
> ```

> [accordion] Error: Insufficient AI credits
>
> 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.9 credits per image).

## Next Steps

> [card] [AI-Generated Video Clips](https://docs.pictory.ai/guides/ai-generated-visuals/background-videos.md)
>
> Use AI-generated video clips as scene backgrounds

> [card] [AI Voice-Over](https://docs.pictory.ai/guides/text-to-video/ai-voiceover.md)
>
> Add professional narration to your videos

> [card] [Brand Settings](https://docs.pictory.ai/guides/branding-customization/brand-settings.md)
>
> Apply consistent branding automatically

> [card] [Background Music](https://docs.pictory.ai/guides/advanced-features/background-music.md)
>
> Add music to complement your visuals

## API Reference

> [card] [Render Storyboard Video](https://docs.pictory.ai/api-reference/videos/render-storyboard-video.md)
>
> Direct video rendering with AI visuals

> [card] [Create Storyboard Preview](https://docs.pictory.ai/api-reference/videos/create-storyboard-preview.md)
>
> Create preview before rendering

> [card] [Get Storyboard Preview Job](https://docs.pictory.ai/api-reference/jobs/get-storyboard-preview-job-by-id.md)
>
> Monitor storyboard creation progress

> [card] [Search Media](https://docs.pictory.ai/api-reference/media-management/search-media.md)
>
> Search stock visuals as alternative to AI


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.