Skip to main content
Create an asynchronous image-to-image generation with NanoBanana Pro (top tier) from URLs. Returns 202 Accepted with a job_id — poll GET /jobs/{job_id} until the job is done or failed.
POST /url-generations
NanoBanana Pro supports selectable resolution (1K, 2K, 4K) and the full aspect-ratio set, including auto. It uses the unprefixed endpoint path.

Headers

Authorization
string
required
Bearer <YOUR_API_KEY>. See Authentication.
Idempotency-Key
string
Optional. Replaying the same key returns the original job_id without creating a duplicate job or charging again.

Body

prompt
string
required
Generation prompt. Minimum length 1. Null bytes are stripped.
aspect_ratio
string
required
Output aspect ratio. See Aspect ratios. auto infers the ratio from the first input image.
input_images_urls
string[]
required
1–14 image URLs. Each must start with http:// or https://.
resolution
string
1K, 2K, or 4K. See Resolutions.
callback_url
string | null
Webhook URL called once the job reaches a terminal state. Overrides the account webhook for this request. See Webhooks.
Input image limits — 1–14 images per request, up to 40 MB total across all input images.

Response

Returns 202 Accepted.
job_id
string
UUID of the created job.
status
string
Always queued on creation.
status_url
string
Relative path to poll for status and result.
curl -s -X POST https://bananahub.io/api/v1/url-generations \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "make it look like a watercolor painting",
    "aspect_ratio": "auto",
    "resolution": "2K",
    "input_images_urls": [
      "https://example.com/photo-1.jpg",
      "https://example.com/photo-2.jpg"
    ]
  }'
{
  "job_id": "0193a7f2-1c4a-7e0b-9b3a-2f1d8c6e4a55",
  "status": "queued",
  "status_url": "/api/v1/jobs/0193a7f2-1c4a-7e0b-9b3a-2f1d8c6e4a55"
}
A 422 is returned when an input URL can’t be fetched or the inputs exceed the size limit. See Errors.