---
title: &quot;Use Nano Banana in Hermes Agent via RunAPI — Image API Guide&quot;
url: &quot;https://runapi.ai/hermes-nano-banana.md&quot;
canonical: &quot;https://runapi.ai/hermes-nano-banana&quot;
locale: &quot;en&quot;
model: &quot;nano-banana&quot;
---

# Use Nano Banana in Hermes Agent.

Nano Banana is Google&#39;s Gemini-native image generation model with industry-leading text rendering in generated images. Pro outputs up to 4K resolution, Nano Banana 2 optimizes for speed with extended aspect ratios, and Edit modifies existing images. Hermes Agent calls all three through the RunAPI custom provider — no ComfyUI or GPU setup needed.

## API example

```bash
curl -X POST https://runapi.ai/api/v1/nano_banana/text_to_image \
  -H &quot;Authorization: Bearer $RUNAPI_API_KEY&quot; \
  -H &quot;Content-Type: application/json&quot; \
  -d &#39;{
    &quot;model&quot;: &quot;nano-banana-pro&quot;,
    &quot;prompt&quot;: &quot;A minimalist product card for a coffee brand, the text DARK ROAST in bold sans-serif across the top, a steaming cup below, warm studio lighting&quot;,
    &quot;aspect_ratio&quot;: &quot;4:3&quot;,
    &quot;output_resolution&quot;: &quot;4k&quot;,
    &quot;output_format&quot;: &quot;png&quot;
  }&#39;

```

### Response

```json
{
  &quot;task_id&quot;: &quot;tsk_abc123&quot;,
  &quot;status&quot;: &quot;pending&quot;,
  &quot;model&quot;: &quot;nano-banana-pro&quot;
}

```

## How it works

1. **Configure RunAPI** — Set the RUNAPI_API_KEY environment variable. If you already configured RunAPI as a custom:runapi provider in Hermes Agent for chat, the same key and base_url work for Nano Banana image generation.
2. **Call Nano Banana** — Send a POST to the text_to_image endpoint with model set to nano-banana-pro for highest quality, nano-banana-2 for speed, or nano-banana for the base variant. Set output_resolution to 4k on Pro or 2 for maximum detail. For editing, POST to edit_image with nano-banana-edit and include an image_url.
3. **Get the result** — The response includes a task_id. Poll the task status endpoint until status changes to completed. The finished response contains the generated image URL. RunAPI SDKs and the CLI handle polling automatically.

## Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `model` | `string` | Required. nano-banana-pro (highest quality, 4K), nano-banana-2 (fast, extended ratios), nano-banana (base), or nano-banana-edit (editing). |
| `prompt` | `string` | Text description of the desired image. Include any text you want rendered in the image — Nano Banana handles typography natively. |
| `image_url` | `string` | Source image URL. Required for nano-banana-edit, ignored for text_to_image variants. |
| `aspect_ratio` | `string` | Optional. Output aspect ratio. Pro accepts: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9, auto. Nano Banana 2 adds 1:4, 1:8, 4:1, 8:1. |
| `output_resolution` | `string` | Optional. Pro and 2 only. Accepted values: 1k, 2k, 4k. Defaults to 1k. |
| `output_format` | `string` | Optional. Output file format. Accepted values: png, jpeg, jpg. |
| `callback_url` | `string` | Optional. Webhook URL that receives a POST when the task completes. |

## FAQ

### What is the difference between Nano Banana Pro, 2, and the base variant?

Nano Banana Pro delivers the highest image quality with up to 4K output resolution. Nano Banana 2 is optimized for speed and supports extra aspect ratios like 1:4 and 8:1 for banner and tall formats. The base nano-banana variant is the most affordable option at standard resolution. All three share the same text_to_image endpoint.

### How do I switch between Nano Banana text generation and image editing in Hermes Agent?

For text-to-image generation, POST to /api/v1/nano_banana/text_to_image with any generation variant (nano-banana-pro, nano-banana-2, or nano-banana). For editing, POST to /api/v1/nano_banana/edit_image with model nano-banana-edit and include the source image_url. Both endpoints use the same custom:runapi provider and RUNAPI_API_KEY.

### How does Nano Banana 4K output pricing work?

Nano Banana Pro pricing varies by output_resolution: 1k and 2k are the same rate, while 4k costs more per image. Nano Banana 2 follows a similar tier structure. Check the RunAPI pricing page for exact per-image rates. There is no monthly minimum.

### Does Hermes Agent need ComfyUI or a GPU to use Nano Banana?

No. Hermes Agent calls Nano Banana through the RunAPI custom:runapi provider endpoint. RunAPI handles all GPU infrastructure server-side. No ComfyUI workflow, no cloud GPU rental, no local VRAM requirements — send a prompt and receive an image URL.

### How does Hermes Agent call Nano Banana through the RunAPI endpoint?

Configure the custom:runapi provider in Hermes Agent and set the model to the Nano Banana slug. Hermes Agent sends the request to RunAPI&#39;s image generation endpoint, which routes to Google&#39;s Gemini-native image generation model.

### How does Nano Banana compare to Midjourney V8?

Nano Banana 2 and Pro are competitive with Midjourney V8 on photorealism and significantly ahead on text rendering accuracy. The main advantage is API access -- Midjourney requires Discord or a separate web UI, while Nano Banana runs through a standard API endpoint via RunAPI.


## Links

- [<span class="translation_missing" title="translation missing: en.agent_models.hermes_nano_banana.crosslink_agent_label">Crosslink Agent Label</span>](https://runapi.ai/hermes-agent)
- [<span class="translation_missing" title="translation missing: en.agent_models.hermes_nano_banana.crosslink_model_label">Crosslink Model Label</span>](https://runapi.ai/models/nano-banana)
- [Model catalog](https://runapi.ai/models)
- [API docs](https://runapi.ai/docs)
