Gemini Video Generator
Gemini Video Generator is a tool in Nappai that lets you turn a written description or an existing image into a short video. It uses Google Gemini’s video‑generation capabilities, so you only need to provide a prompt, choose a model, and set a few options. The component can also work on many records at once using Mapping Mode.
How it Works
When you run the component, Nappai sends your settings to the Google Gemini API. Gemini processes the prompt (or image) and returns a video file. The component then makes that video available to the rest of your workflow. If you enable Mapping Mode, the component can receive a list of prompts or images and produce a video for each item, all in one run.
Inputs
Mapping Mode
This component has a special mode called “Mapping Mode”. When you enable this mode using the toggle switch, an additional input called “Mapping Data” is activated, and each input field offers you three different ways to provide data:
- Fixed: You type the value directly into the field.
- Mapped: You connect the output of another component to use its result as the value.
- Javascript: You write Javascript code to dynamically calculate the value.
This flexibility allows you to create more dynamic and connected workflows.
Input Fields
- Aspect Ratio: Choose the shape of the video. Pick either 9:16 for vertical videos or 16:9 for horizontal videos.
- Duration (seconds): Set how long the video will be, in whole seconds.
- Generation Mode: Decide whether the video comes from a text prompt (text_to_image) or from an existing image (image_to_image).
- Mapping Mode: Turn on or off the ability to process many records at once.
- Video Model: Select which Gemini model you want to use for generation.
- Prompt: Write a description of the video you want. Keep it under 4000 characters.
- Tool Name: If you plan to use this component as a tool for an AI agent, give the agent a short name to recognize it.
- Tool Description: Provide a clear explanation of what the tool does so the agent knows when to call it.
- Tools arguments metadata: Define the arguments that the tool will accept when it is used by an agent.
Credential
Before you can use the component, you must set up a Google Gemini API credential in Nappai’s credential section. The credential requires a Google API Key. Once the credential is created, select it in the component’s Credential field.
Outputs
- Video: The generated video file. It can be used in later components, saved to storage, or sent to users.
- Tool: A ready‑to‑use tool that an AI agent can call to generate videos on demand.
Usage Example
- Create a new workflow in the Nappai dashboard.
- Add the Gemini Video Generator component.
- Configure the inputs:
- Aspect Ratio: 16:9
- Duration (seconds): 10
- Generation Mode: text_to_image
- Prompt: “A sunrise over a calm lake, with birds flying in the sky.”
- Set the Video Model to the default Gemini model.
- Choose the Google Gemini API credential you created earlier.
- Run the workflow.
- The component outputs a 10‑second video that you can preview, download, or pass to another component.
Related Components
- Gemini Image Generator – Creates still images from text prompts.
- Gemini Text to Image – Generates images directly from text.
- Video Editor – Allows you to trim, add overlays, or combine videos produced by Gemini.
Tips and Best Practices
- Keep prompts concise; longer prompts can increase processing time.
- Test with a short duration first to verify the output before generating longer videos.
- Use Mapping Mode when you have a list of prompts or images to batch‑process.
- Choose the correct aspect ratio for the platform where the video will be displayed.
- Store generated videos in a dedicated folder for easy retrieval.
Security Considerations
- The component uses a Google Gemini API key. Store this key securely in Nappai’s credential manager and never expose it in the workflow.
- Only grant the credential to trusted users or components.
- Review Google’s usage limits and billing to avoid unexpected charges.