Gemini batch image generation with your own API key
Melia uses your own Google Gemini API key, so the images are generated and billed in your Google account. Here is how to connect it and what to check before a large batch.
1. Get a key
Create an API key in Google AI Studio. Image models need a project with billing (credit) set up; a free key without billing may be rejected for image generation. Keep the key private — anyone who has it can spend money on your account.
2. Add it in Melia
- Open Settings and choose Gemini as the provider.
- Paste the key under API configuration and press Save API key.
- Press Test connection. You should see that the connection works and models are available.

The key is stored only on your computer and is sent only to Google.
3. Choose a model
Melia lists the Gemini image models it supports: Nano Banana 2 (recommended, the default), Nano Banana Pro, Nano Banana Lite and Gemini 2.5 Flash Image. Newer models usually give better quality at a different price, so run a few prompts first.
4. Control the cost
- Start with two or three prompts.
- Use the daily budget option in Generation settings to stop a batch at a spending limit.
- Reports show an estimated cost per run. It is an estimate; Google's billing page is the official number.
If the run fails with a credit or billing message
If your account has no available credit or billing is off, Google rejects the requests (for example with a 402 "credits depleted" response). Melia pauses the batch, keeps the finished images and tells you on the run card. Add credit or enable billing in your Google console, then press Generate and choose Resume.
Related: bulk images from a prompt list · OpenAI setup.