← All articles

Nano Banana API and MCP: how to add image generation to your project

A glowing canvas frame with abstract colored shapes

Nano Banana is a family of image generation models. NeuralSpace offers the following models: Nano Banana, Nano Banana Pro, Nano Banana 2, Nano Banana 2 Lite. They all run through a single public API, and there is a ready MCP server for AI agents. The key is issued on the API keys page.

What Nano Banana can do

Nano Banana generates images from a text description. The base version outputs 1K, Pro and 2 support 1K, 2K and 4K resolutions, and 2 Lite is a lightweight version with 1K output. The models support editing and references through the image_urls parameter.

API endpoint

Send a request to POST /v1/images/generations. Example: {"model": "nano-banana-2", "prompt": "a cat on a windowsill", "resolution": "1K"}. Authorization uses an API key in the x-api-key header. Available model ids: nano-banana, nano-banana-pro, nano-banana-2, nano-banana-2-lite.

A glowing canvas frame with abstract shapes

MCP tools

The NeuralSpace MCP server is available at POST /mcp (Streamable HTTP). To work with Nano Banana, an agent uses the tools: generate_image, list_models, get_balance. This lets Claude Code, Cursor and other MCP clients use the site models directly.

How to connect

Sign up on NeuralSpace, open the API keys page and create an nsk-… key. Then pass it in the request header or in your MCP client settings. Full documentation is on the the /v1/docs page.

FAQ

Which resolutions are available?

Base and Lite output 1K, Pro and 2 support 1K, 2K and 4K.

Can I edit an image?

Yes, pass source images through the image_urls parameter.

How much does a generation cost?

The price depends on the model and resolution; the exact amount is in the docs.