Text to Image

nano-banana-2

Draft model pending operator verification

POST /v1/images/generationsAsync generationFixed Credit pricing

Quick start

Submit a request with this public model ID. The API immediately returns a normalized job; poll GET /v1/jobs/{jobId} while its status is queued or running.

curl -X POST "https://api.artany.ai/v1/images/generations" \
  -H "Authorization: Bearer $ARTANY_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: unique-request-id" \
  -d '{"model":"nano-banana-2","prompt":"A small blue paper kite","size":"auto","resolution":"1K","count":1}'

Request

Headers

HeaderRequiredDescription
AuthorizationYesBearer token for an Artany API key.
Content-TypeYesMust be application/json.
Idempotency-KeyRecommended8–128 characters. Reusing it with an identical request prevents duplicate jobs and charges.

Body

{
  "model": "nano-banana-2",
  "prompt": "A small blue paper kite",
  "size": "auto",
  "resolution": "1K",
  "count": 1
}

Request Parameters

Only fields in this model’s public request contract are shown. Defaults are applied before validation and quoting.

modelstringrequireddefault: "nano-banana-2"

Stable public model ID for this request.

promptstringrequired

Text description of the image to generate.

Length: 1–12000

sizestringdefault: "auto"

Output image aspect ratio. For image-to-image, the returned image determines the aspect ratio; specify it explicitly when possible.

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

auto1:13:22:34:33:416:99:165:44:521:91:44:11:88:1
  • For text-to-image, auto defaults to 1:1 or 16:9.
resolutionstringdefault: "1K"

Output image resolution tier. A higher tier affects price.

Allowed: 0.5K, 1K, 2K, 4K

0.5K1K2K4K
  • 0.5K, 1K, 2K, and 4K correspond approximately to 512, 1024, 2048, and 4096 pixels.

Note:Resolution tiers have different prices. 4K costs more than 1K.

countintegerdefault: 1

Number of images to generate in this request.

Range: 1–1

Note:Send a JSON number, not a quoted string.

image_urlsarray

Reference images for image-to-image generation. Accepts public http(s) URLs or complete Base64 Data URIs.

Items: 0–14

  • Each image must be no larger than 10MB; jpeg, png, and webp are supported.
  • Up to 14 reference images are allowed.

Note:Base64 input must include the complete Data URI prefix, such as data:image/jpeg;base64,.

Response and task status

A successful asynchronous submission returns HTTP 202 with a supplier-neutral job.

{
  "id": "job_…",
  "object": "generation.job",
  "model": "nano-banana-2",
  "status": "queued",
  "progress": 0,
  "output": null,
  "error": null,
  "billing": {
    "estimated_credits": "…",
    "frozen_credits": "…",
    "charged_credits": "0",
    "state": "frozen",
    "price_version": "2026-07-18.picverse-parity"
  },
  "created_at": "2026-07-21T00:00:00.000Z",
  "completed_at": null
}
  • queued / running: continue polling.
  • succeeded: retrieve media URLs from output; billing has settled.
  • failed / canceled: inspect error; frozen Credits are released.

Pricing

The price shown for a matching configuration is the fixed amount settled on successful completion. Price version: 2026-07-18.picverse-parity.

resolutionCredits
0.5K6
1K6
2K9
4K12