Image Generation Models

Nano Banana 2.1 Image Generation

Generate and edit ecommerce images with Nano Banana 2.1, with improved text layout and consistency across editing rounds. The model is fixed by this API, so provider must not be supplied in the request.

post/api/skill-api/v1/skills/banana-2-1-image-generation/run

Request

  • Base URL: https://api.nexscope.ai
  • URL: https://api.nexscope.ai/api/skill-api/v1/skills/banana-2-1-image-generation/run
  • Auth: HTTP bearer

Headers

X-Nexscope-Http-Status'legacy' | 'semantic'

Use semantic for HTTP error statuses on run and task-result requests. Without this header v1 retains legacy status behavior. The JSON envelope is unchanged; code 0 means success or acceptance, not asynchronous completion.

Request body

imageUrlsstring[]

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.

promptstring required

Generation prompt describing the target image, scene, composition, style, and constraints. Maximum 5000 characters.

outputNuminteger

Number of images to generate. Valid range: 1 to 10; defaults to 1.

resolution'1K' | '2K' | '4K'

Output resolution. Supported values: 1K, 2K, or 4K; defaults to 1K.

aspectRatio'1:1' | '16:9' | '9:16' | '3:4' | '4:3' | '3:2' | '2:3' | '4:5' | '5:4' | '21:9'

Output aspect ratio. Supported values: 1:1, 16:9, 9:16, 3:4, 4:3, 3:2, 2:3, 4:5, 5:4, 21:9.

Example request

{
  "imageUrls": [],
  "prompt": "Keep the product consistent and generate a clean white-background ecommerce hero image.",
  "outputNum": 1,
  "resolution": "1K",
  "aspectRatio": "1:1"
}

Response

Successful response.

codeinteger required

0 means accepted or successful; nonzero is a platform error.

msgstring nullable required
tsstring required

Epoch milliseconds.

timestring required

Server local time: yyyy-MM-dd HH:mm:ss.

coststring required

Elapsed milliseconds, never credits; -1 outside web requests.

traceIdstring nullable required

Changes

No recorded changes to this operation across all 1 revision of this API.