Skip to main content
POST
Generate an image
Describe the person and scene in prompt or model_text. Add product references with one of outfit_image_ids, outfit_asset_ids, or outfit_image_urls. Saved avatars, presets and poses go in asset_ids. The default model is nano-banana-2, with resolution: "standard" and one output. Generate supports up to three garment references and up to eight outputs, subject to account limits. A successful request returns HTTP 202 with a jobs array. Save each id, then get the job until it finishes. Read the completed media from result.url and its reusable ID from result.id. Use an Idempotency-Key when submitting work that may be retried.

Start from a prompt

Describe a new fashion image.

Use your products

Add garment photos or saved assets.

Choose output settings

Set quality, proportions, and output count.

Run the quickstart

Upload, generate, and retrieve a result with Node.js.

Authorizations

Authorization
string
header
required

Create an API key in Studio → account menu → API Keys. Keep it on your server.

Headers

Idempotency-Key
string

Use a unique key for each intended creation. Retry the same method, path and JSON with the same key to replay its response for 24 hours after completion. Conflicting requests and unfinished or uncertain outcomes return 409. An uncertain receipt is never automatically rerun.

Required string length: 1 - 128
Pattern: ^[!-~]+$

Body

application/json
outfit_image_ids
string<uuid>[]
required

Garment references; choose one outfit source array per request.

Required array length: 1 - 3 elements

Resource ID.

model
string
default:nano-banana-2

Model for this operation. Account and plan limits apply.

resolution
enum<string>
default:standard

Output quality; dimensions depend on the model and aspect ratio.

Available options:
standard,
high
num_images
integer
default:1

Number of outputs. Defaults to 1. Account limits still apply.

Required range: 1 <= x <= 8
Example:

1

seed
integer

Optional seed. It does not guarantee identical results across models or changes.

aspect_ratio
string

Model-dependent output ratio. 3:4 is supported by nano-banana-2 and nano-banana-pro.

Example:

"3:4"

asset_ids
string<uuid>[]

Avatar, preset, pose, set, or style asset IDs. Use at most one preset or set in total.

Resource ID.

outfit_image_urls
string<uri>[]

Garment references; choose one outfit source array per request.

Required array length: 1 - 3 elements
outfit_asset_ids
string<uuid>[]

Garment references; choose one outfit source array per request.

Required array length: 1 - 3 elements

Resource ID.

prompt
string

Composition or extra preset directions.

model_text
string

Describe the avatar when not selecting one from the library.

outfit_text
string

How the selected garment should be worn.

set_text
string

Setting directions when needed.

style
string

Optional style directions.

style_id
string

Optional saved style asset ID.

Response

Accepted; poll each job.

jobs
object[]
required
Minimum array length: 1