evolink-nanobanana-2-lite
v1.0.10
Published
EvoLink API examples and agent skill for Nanobanana 2 Lite Image Generation.
Maintainers
Readme
Nanobanana 2 Lite Image Generation NPM Package
NPM package surface: this README is rendered on npm from
README.npm.md. Every API-key link on this page uses npm/package attribution. Installer runtime output still prints its own installer attribution URL after the package runs.
AI Agent? Start here: use
npx skills add Evolink-AI/nanobanana-2-lite-image-generate-api-skillas the primary Agent install command. Usenpxonly as a fallback or direct CLI path.
📑 Menu
- Agent Skill First
- Installation
- Agent Auto-Install
- Getting an API Key
- API Quick Start
- Full First-Run Flow
- API Reference
- Showcase
- Troubleshooting
- Compatibility
- Community
- License
Agent Skill First
This npm package is designed for agents and developers who want a one-line install path. The primary workflow is to install the skill with npx skills add Evolink-AI/nanobanana-2-lite-image-generate-api-skill, let the agent read the installed SKILL.md, and only then call the EvoLink API.
| Skill slug | NPM package | Model ID | Primary env var |
|---|---|---|---|
| nanobanana-2-lite-image | evolink-nanobanana-2-lite | gemini-3.1-flash-lite-image | EVOLINK_API_KEY |
Installation
Install into your agent skills directory. Use npx skills add as the primary Agent install path for Claude Code, Codex, OpenClaw, Hermes, and other agent runtimes. Use npx only as a fallback or direct CLI path.
Agent Install (Recommended)
npx skills add Evolink-AI/nanobanana-2-lite-image-generate-api-skillInstall via npm (Fallback / Direct CLI)
npx evolink-nanobanana-2-lite@latestnpx evolink-nanobanana-2-lite@latest -ynpx evolink-nanobanana-2-lite@latest -y --path ~/.claude/skillsnpx evolink-nanobanana-2-lite@latest "Create a short Nanobanana 2 Lite Image Generation demo"Manual Install
git clone https://github.com/Evolink-AI/nanobanana-2-lite-image-generate-api-skill.git
cd nanobanana-2-lite-image-generate-api-skill
npm install
node bin/cli.js -y --path ~/.claude/skillsAgent Auto-Install
Use the copy-paste prompts in the next section when an agent needs to install the skill by itself.
The prompt blocks below use npm/package API-key attribution because the user is reading them on the npm package page. The installed CLI will print the installer-runtime key URL during setup.
Agent Auto-Install
Claude Code
Install the Nanobanana 2 Lite Image Generation skill by running:
npx skills add Evolink-AI/nanobanana-2-lite-image-generate-api-skill
After installation, open this tracked key URL for the user: https://evolink.ai/dashboard/keys?utm_source=npm&utm_medium=package&utm_campaign=nanobanana-2-lite-image
Ask the user to sign in, create an API key, return to this agent chat, and paste the key.
Set it as EVOLINK_API_KEY for this session, verify it with `curl --fail https://api.evolink.ai/v1/credits -H "Authorization: Bearer $EVOLINK_API_KEY"`, then read the installed nanobanana-2-lite-image/SKILL.md.
After verification succeeds, tell the user: "The skill is ready. You can ask: Use Nanobanana 2 Lite Image Generation to create a blue ceramic cup on a white table."
If `npx skills` is unavailable, use this fallback: `npx evolink-nanobanana-2-lite@latest -y --path ~/.claude/skills`.Codex
Install the Nanobanana 2 Lite Image Generation skill by running:
npx skills add Evolink-AI/nanobanana-2-lite-image-generate-api-skill
After installation, open this tracked key URL for the user: https://evolink.ai/dashboard/keys?utm_source=npm&utm_medium=package&utm_campaign=nanobanana-2-lite-image
Ask the user to sign in, create an API key, return to this agent chat, and paste the key.
Set it as EVOLINK_API_KEY for this session, verify it with `curl --fail https://api.evolink.ai/v1/credits -H "Authorization: Bearer $EVOLINK_API_KEY"`, then read the installed nanobanana-2-lite-image/SKILL.md.
After verification succeeds, tell the user: "The skill is ready. You can ask: Use Nanobanana 2 Lite Image Generation to create a blue ceramic cup on a white table."
If `npx skills` is unavailable, use this fallback: `npx evolink-nanobanana-2-lite@latest -y --path ~/.codex/skills`.OpenClaw
Install the Nanobanana 2 Lite Image Generation skill by running:
npx skills add Evolink-AI/nanobanana-2-lite-image-generate-api-skill
After installation, open this tracked key URL for the user: https://evolink.ai/dashboard/keys?utm_source=npm&utm_medium=package&utm_campaign=nanobanana-2-lite-image
Ask the user to sign in, create an API key, return to this agent chat, and paste the key.
Set it as EVOLINK_API_KEY for this session, verify it with `curl --fail https://api.evolink.ai/v1/credits -H "Authorization: Bearer $EVOLINK_API_KEY"`, then read the installed nanobanana-2-lite-image/SKILL.md.
After verification succeeds, tell the user: "The skill is ready. You can ask: Use Nanobanana 2 Lite Image Generation to create a blue ceramic cup on a white table."
If `npx skills` is unavailable, use this fallback: `npx evolink-nanobanana-2-lite@latest -y --path ~/.openclaw/skills`.One-Liner
EVOLINK_API_KEY=your_key_here npx evolink-nanobanana-2-lite@latest "Create a blue ceramic cup on a white table"Getting an API Key
- Open EvoLink API Keys.
- Sign in or create an EvoLink account if prompted on that page.
- Create a new API key.
- Export the key as
EVOLINK_API_KEY. - Run a dry run before spending credits on a real generation.
API Quick Start
Use the same API key with the image generation endpoint.
export EVOLINK_API_KEY="your_key_here"
curl --request POST \
--url https://api.evolink.ai/v1/images/generations \
--header "Authorization: Bearer ${EVOLINK_API_KEY}" \
--header "Content-Type: application/json" \
--header "X-EvoLink-Source: skill" \
--header "X-EvoLink-Skill: nanobanana-2-lite-image" \
--header "X-EvoLink-Package: evolink-nanobanana-2-lite" \
--header "X-EvoLink-Campaign: nanobanana-2-lite-image" \
--header "X-EvoLink-Touchpoint: first_run" \
--data '{
"model": "gemini-3.1-flash-lite-image",
"prompt": "Create a short demo with Nanobanana 2 Lite Image Generation"
}'Example response:
{
"id": "task_example",
"status": "pending"
}Full First-Run Flow
- Create a task with
POST /v1/images/generations. - Store the returned task ID.
- Poll
GET /v1/tasks/{task_id}until the task iscompleted, or passcallback_url. - Save the final media URL from
resultsorresult_databefore it expires.
API Reference
What Is Nanobanana 2 Lite Image Generation?
Nanobanana 2 Lite Image Generation is an EvoLink image generation endpoint for text-to-image, image-to-image, and image editing workflows through the gemini-3.1-flash-lite-image model.
Endpoints
| Purpose | Method | Path |
|---|---|---|
| Create task | POST | /v1/images/generations |
| Query task | GET | /v1/tasks/{task_id} |
Request Parameters
| Parameter | Type | Required | Notes |
|---|---|---|---|
| model | string | yes | Use gemini-3.1-flash-lite-image. |
| prompt | string | yes | Prompt describing the image to generate or how to edit input images. Maximum 2000 tokens. |
| size | string | no | Aspect ratio. Defaults to auto; supported values include 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 21:9, and more. |
| quality | string | no | Image quality. Default and supported value: 1K. |
| image_urls | string array | no | Reference images for image-to-image or editing. Up to 14 images, each under 20MB, using .jpeg, .jpg, .png, or .webp. |
| model_params | object | no | Model extension parameters. |
| callback_url | string | no | HTTPS callback URL for task completion, failure, or cancellation. |
Pricing and Billing
EvoLink returns usage details in the task creation response. The official example uses billing_rule: "per_call" and credits_reserved: 8.7; check the returned usage object and the EvoLink dashboard for the current account-specific charge before high-volume use.
Documentation
- Read the API reference
- Read the task lifecycle guide
- Read the response schema
- Read error handling guidance
- Read callback and webhook guidance
- Read pricing and billing notes
🖼️ Showcase
| Example | Result |
|---|---|
| First successful API call | Polls until completed and prints the final URL / text / file. |
| Agent skill install | Installs SKILL.md, _meta.json, scripts/, and references. |
| Dry run | Prints the request payload without spending API credits. |
Troubleshooting
| Issue | Fix |
|---|---|
| EVOLINK_API_KEY is missing | Export EVOLINK_API_KEY before running the script. |
| Skill installed but agent cannot see it | Re-run with the correct --path for Claude Code, Codex, OpenClaw, or Hermes. |
| jq or curl is missing | Install the missing binary, then rerun the npx command. |
| API returns 401 or 403 | Verify the EvoLink key and account access. |
| Polling times out | Keep the task ID, inspect the dashboard, and avoid blind resubmission. |
Compatibility
| Agent | Install command |
|---|---|
| Claude Code | npx skills add Evolink-AI/nanobanana-2-lite-image-generate-api-skill |
| Codex | npx skills add Evolink-AI/nanobanana-2-lite-image-generate-api-skill |
| OpenClaw | npx skills add Evolink-AI/nanobanana-2-lite-image-generate-api-skill |
| Hermes | npx skills add Evolink-AI/nanobanana-2-lite-image-generate-api-skill |
Community
- Read the official EvoLink Nanobanana 2 Lite API docs
- View this repository on GitHub
- Open the EvoLink API key page
License
MIT
