Skip to main content
POST
Generate image with Nano Banana 2.1

Nano Banana 2.1 on BudgetPixel

More examples, prompts and pricing.

Authorizations

Authorization
string
header
required

API key as a bearer token: Authorization: Bearer bpx_live_xxx

Body

application/json
prompt
string
required

Text description of the image to generate, or of the edit to apply to the reference images. Write @handle to cast a character: a BudgetPixel AI influencer or one of your own (GET /v1/characters).

aspect_ratio
enum<string>
default:auto

Output aspect ratio. "auto" (default) follows the first reference image when editing and gives a square image for text-to-image.

Available options:
auto,
1:1,
16:9,
9:16,
4:3,
3:4,
3:2,
2:3,
5:4,
4:5,
21:9,
1:4,
4:1,
1:8,
8:1

Ground the image in live Google Search results (weather, scores, recent events, current facts). Off by default. Adds 10 credits per image.

Let the model look up web images as visual context before rendering. Off by default. Runs a web search too, so it adds 20 credits per image in total, with or without google_search.

num_images
integer
default:1

Number of images to generate. Each image is billed at its size's price, plus search grounding if enabled.

Required range: 1 <= x <= 4
output_format
enum<string>

File format of the result: png or jpeg, always at full resolution (16:9 at 4K is 5504x3072 either way; the PNG is about 20 MB, the JPEG a few MB). Omit it to get the file as the model produced it, which is a PNG or a near-lossless JPEG.

Available options:
png,
jpeg
reference_images
string[]

Optional reference images (up to 9) for image editing and multi-reference composition. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-image. Reference images cost nothing extra.

Maximum array length: 9
size
enum<string>
default:1K

Output resolution tier. Sets the price: 1K = 45, 2K = 70, 4K = 150 credits per image.

Available options:
1K,
2K,
4K

Response

Job accepted.

characters
object[]

The characters the prompt cast with @handle mentions. Absent when none.

id
string

Opaque job id — use it to poll status.

Example:

"img_a1b2c3d4e5f6"

message
string
model
string
status
enum<string>

Lifecycle state. succeeded/failed/timeout are terminal.

Available options:
pending,
starting,
processing,
completing,
succeeded,
failed,
timeout