Nano Banana 2.1 Image Generation
Generate and edit ecommerce images with Nano Banana 2.1 and up to 14 references.
CostUsage estimate unavailable
POST ·
https://api.nexscope.ai/api/skill-api/v1/skills/banana-2-1-image-generation/runMCP · nexscope_banana_2_1_image_generationSubscription required. Creative AI APIs are available only to users with an active subscription. Trial credits do not enable API key access. View subscription plans.
Choose an integration method
Image Generation Models
What this API does
Generate ecommerce images with the fixed Nano Banana 2.1 model from reference assets and prompts, with documented asynchronous result retrieval.
Endpoint
https://api.nexscope.ai/api/skill-api/v1/skills/banana-2-1-image-generation/runMCP method
nexscope_banana_2_1_image_generationStep 1 of 3 · Authenticate
Authentication
All run endpoints require a user API key. Send it as a bearer token in the Authorization header.
Authorization: Bearer nk-xxxxxxxxxxxxxxxxxMissing or invalid API keys return an authentication error. Manage keys from .
Step 2 of 3 · Send a request
POST
https://api.nexscope.ai/api/skill-api/v1/skills/banana-2-1-image-generation/runRun an API
Generate and edit ecommerce images with Nano Banana 2.1, with improved text layout and consistency across editing rounds.
Example request
Replace YOUR_API_KEY, then run this command in your terminal.
curl -X POST 'https://api.nexscope.ai/api/skill-api/v1/skills/banana-2-1-image-generation/run' \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"imageUrls": [],
"prompt": "Keep the product consistent and generate a clean white-background ecommerce hero image.",
"outputNum": 1,
"resolution": "1K",
"aspectRatio": "1:1"
}'Step 3 of 3 · Inspect the result
Check the response
Read code for the request status and data for the result. Open the parameter and response reference for the full field definitions.
HTTP status codes
| Code | Description |
|---|---|
| 200 | HTTP request completed. Check JSON code; only 0 indicates business success or acceptance. |
| 400 | Request JSON or required API parameters are invalid. |
| 401 | API key is missing, invalid, or cannot be matched to a user. |
| 5xx | API execution or upstream service failed. |
All categories/ Image Generation Models
POST
https://api.nexscope.ai/api/skill-api/v1/skills/banana-2-1-image-generation/runRun this API
Send a JSON request to execute this API and receive the documented response payload.
Endpoint
| Method | POST |
| Path | https://api.nexscope.ai/api/skill-api/v1/skills/banana-2-1-image-generation/run |
| Auth | Bearer API key |
| Content-Type | application/json |
Request parameters
| Name | Type | Required | Description |
|---|---|---|---|
imageUrls | array | optional | Optional public reference image URLs. Omit this field for text-to-image generation, or provide references for image-to-image generation. When supplied, provide 1 to 14 JPG, PNG, or WEBP images; each image must not exceed 20 MB. Example: [] |
prompt | string | required | Generation prompt describing the target image, scene, composition, style, and constraints. Maximum 5000 characters. Example: Keep the product consistent and generate a clean white-background ecommerce hero image. |
outputNum | integer | optional | Number of images to generate. Valid range: 1 to 10; defaults to 1. Example: 1 |
resolution | string | optional | Output resolution. Available options
Example: 1K |
aspectRatio | string | optional | Output aspect ratio. Available options
Example: 1:1 |
Code example
{
"imageUrls": [],
"prompt": "Keep the product consistent and generate a clean white-background ecommerce hero image.",
"outputNum": 1,
"resolution": "1K",
"aspectRatio": "1:1"
}Response example
Platform response envelope. code 0 indicates success or acceptance; data contains the business result.
{
"data": {
"taskId": "example-task",
"status": "PENDING",
"result": null
},
"code": 0,
"msg": null,
"ts": "0",
"time": "2026-01-01 00:00:00",
"cost": "-1",
"traceId": null
}Response fields
| Name | Type | Required | Description |
|---|---|---|---|
data | any | required | Data value used by this API operation. |
code | integer | required | 0 means accepted or successful; nonzero is a platform error. |
msg | string | null | required | Msg value used by this API operation. |
ts | string | required | Epoch milliseconds. |
time | string | required | Server local time: yyyy-MM-dd HH:mm:ss. |
cost | string | required | Elapsed milliseconds, never credits; -1 outside web requests. |
traceId | string | null | required | Trace id value used by this API operation. |
Any of option 1 — requires taskId, status, result
| Name | Type | Required | Description |
|---|---|---|---|
data | object | required | Data value used by this API operation. |
data.taskId | string | required | Task id value used by this API operation. |
data.result | any | required | Result value used by this API operation. |
data.status | string | required | Status value used by this API operation. Allowed: PENDING, RUNNING, SUCCEEDED, FAILED, TIMEOUT |
Any of option 1
| Name | Type | Required | Description |
|---|---|---|---|
data.result | object | required | Completed generation output retained from the task result. Fields vary by capability; generated resources use Nexscope-hosted URLs and any count represents charged Nexscope credits. This is the business output, not a task creation receipt. |
Any of option 2
| Name | Type | Required | Description |
|---|---|---|---|
data.result | null | required | Result value used by this API operation. |
Any of option 2
| Name | Type | Required | Description |
|---|---|---|---|
data | null | required | Data value used by this API operation. |
Responses
| Code | Description |
|---|---|
| 200 | HTTP request completed. Check JSON code; only 0 indicates business success or acceptance. |
| 400 | Request JSON or required API parameters are invalid. |
| 401 | API key is missing, invalid, or cannot be matched to a user. |
| 5xx | API execution or upstream service failed. |
Data source, freshness, and limitations
Source, freshness, coverage, rate limits, and estimation notes are not specified in this API definition unless they appear in the request or response field documentation above. Do not assume official marketplace data or real-time freshness when it is not explicitly documented.
Step 1 of 2 · Connect your MCP client
MCP
V2 recommendedConnect remote agents through the standard MCP 2025-11-25 Streamable HTTP endpoint. Use OAuth 2.1 Authorization Code with PKCE, or an API key for compatibility.
POST https://api.nexscope.ai/api/skill-api/v2/mcp
MCP-Protocol-Version: 2025-11-25
Content-Type: application/jsonAuthentication
OAuth clients request the mcp:tools scope. The endpoint's 401 response advertises protected-resource metadata for authorization discovery.
Step 2 of 2 · Call the tool
Call a tool
{
"jsonrpc": "2.0",
"id": "tool-call-1",
"method": "tools/call",
"params": {
"name": "nexscope_banana_2_1_image_generation",
"arguments": {
"imageUrls": [],
"prompt": "Keep the product consistent and generate a clean white-background ecommerce hero image.",
"outputNum": 1,
"resolution": "1K",
"aspectRatio": "1:1"
}
}
}Legacy MCP v1
Existing API-key clients can continue using the compatibility endpoint. New integrations should use MCP v2.
GET / POST /api/skill-api/v1/mcpOnline test
Execute the current API with your API key and JSON payload.
Try it
Send a real request with the same contract shown in the reference.
Endpoint
https://api.nexscope.ai/api/skill-api/v1/skills/banana-2-1-image-generation/runTask result endpoint
https://api.nexscope.ai/api/skill-api/v1/skills/banana-2-1-image-generation/tasks/{taskId}MCP method
nexscope_banana_2_1_image_generationcURL
curl -X POST \
https://api.nexscope.ai/api/skill-api/v1/skills/banana-2-1-image-generation/run \
-H "Authorization: Bearer nk-..." \
-H "Content-Type: application/json" \
-d '{ "imageUrls": [], "prompt": "Keep the product consistent and generate a clean white-background ecommerce hero image.", "outputNum": 1, "resolution": "1K", "aspectRatio": "1:1" }'Response
No response yet. Run the request to see the response here.
Task result
Results are checked automatically after Run API. You can also enter a task ID and check it manually; completed resources use Nexscope URLs and show actual charged credits.
Result response
No task result yet. Query the task to see the generated output here.
Related APIs
Nano Banana Image Generation
Generate product images from reference images and a prompt with Nano Banana.
Nano Banana Pro Image Generation
Generate higher-resolution product images with Nano Banana Pro.
Nano Banana 2 Image Generation
Create product images from references and a prompt with Nano Banana 2.
Nano Banana 2 Lite Image Generation
Create product images from references and a prompt with Nano Banana 2 Lite.