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

<CardGroup cols={2}>
  <Card title="AI Image Generation" icon="wand-magic-sparkles">
    Generate unique images with AI instead of stock visuals
  </Card>

  <Card title="Image Models" icon="palette">
    Choose from Flux, Seedream, Nano Banana, and Nano Banana Pro
  </Card>

  <Card title="Media Styles" icon="paintbrush">
    Apply styles like photorealistic, artistic, cartoon, and more
  </Card>

  <Card title="AI Credit Costs" icon="bolt">
    Understand per-image credit costs for each model
  </Card>
</CardGroup>

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

<CodeGroup>
  ```bash npm theme={null}
  npm install axios
  ```

  ```bash pip theme={null}
  pip install requests
  ```
</CodeGroup>

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

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

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

<Note>
  The `videoDuration` parameter is **not allowed** when `type` is `"image"`. It is only used for [AI-generated video clips](/guides/ai-generated-visuals/background-videos).
</Note>

## 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.6                    | Reliable for basic layouts    | `1:1`, `16:9`, `9:16`   |
| `seedream3.0`    | Seedream        | 2                      | Reliable for text and numbers | `1:1`, `16:9`, `9:16`   |
| `nanobanana`     | Nano Banana     | 4                      | Excels at details             | `1:1`, `16:9`, `9:16`   |
| `nanobanana-pro` | Nano Banana Pro | 14                     | Superior cinematic quality    | `1:1`, `16:9`, `9:16`   |

<Tip>
  **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
</Tip>

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

<CodeGroup>
  ```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()
  ```
</CodeGroup>

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

<CodeGroup>
  ```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()
  ```
</CodeGroup>

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

<CodeGroup>
  ```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()
  ```
</CodeGroup>

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

<CodeGroup>
  ```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()
  ```
</CodeGroup>

***

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

```json theme={null}
{
    "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](/api-reference/jobs/get-storyboard-preview-job-by-id) or [Get Video Render Job](/api-reference/jobs/get-video-render-job-by-id) API reference.

***

## Best Practices

<AccordionGroup>
  <Accordion title="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>

  <Accordion title="Choose the Right Model for Your Budget">
    | Scenario             | Recommended Model | Cost        |
    | -------------------- | ----------------- | ----------- |
    | Testing & drafts     | `flux-schnell`    | 0.6 credits |
    | General content      | `seedream3.0`     | 2 credits   |
    | Detail-rich scenes   | `nanobanana`      | 4 credits   |
    | Premium final output | `nanobanana-pro`  | 14 credits  |

    Start with `flux-schnell` for iteration, then switch to a higher-quality model for production.
  </Accordion>

  <Accordion title="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>

  <Accordion title="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.
  </Accordion>
</AccordionGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="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>

  <Accordion title="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>

  <Accordion title="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>

  <Accordion title="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.6 credits per image).
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="AI-Generated Video Clips" icon="video" href="/guides/ai-generated-visuals/background-videos">
    Use AI-generated video clips as scene backgrounds
  </Card>

  <Card title="AI Voice-Over" icon="microphone" href="/guides/text-to-video/ai-voiceover">
    Add professional narration to your videos
  </Card>

  <Card title="Brand Settings" icon="palette" href="/guides/branding-customization/brand-settings">
    Apply consistent branding automatically
  </Card>

  <Card title="Background Music" icon="music" href="/guides/advanced-features/background-music">
    Add music to complement your visuals
  </Card>
</CardGroup>

## API Reference

<CardGroup cols={2}>
  <Card title="Render Storyboard Video" icon="video" href="/api-reference/videos/render-storyboard-video">
    Direct video rendering with AI visuals
  </Card>

  <Card title="Create Storyboard Preview" icon="eye" href="/api-reference/videos/create-storyboard-preview">
    Create preview before rendering
  </Card>

  <Card title="Get Storyboard Preview Job" icon="clock" href="/api-reference/jobs/get-storyboard-preview-job-by-id">
    Monitor storyboard creation progress
  </Card>

  <Card title="Search Media" icon="images" href="/api-reference/media-management/search-media">
    Search stock visuals as alternative to AI
  </Card>
</CardGroup>
