Nano Banana 2 Lite
curl --request POST \
--url https://api.snapgen.org/v1/images/generations \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.snapgen.org/v1/images/generations"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.snapgen.org/v1/images/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.snapgen.org/v1/images/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.snapgen.org/v1/images/generations"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.snapgen.org/v1/images/generations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.snapgen.org/v1/images/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyImage Series
Nano Banana 2 Lite
Generate or edit one 1K image with the fixed-price Nano Banana 2 Lite contract.
POST
/
v1
/
images
/
generations
Nano Banana 2 Lite
curl --request POST \
--url https://api.snapgen.org/v1/images/generations \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.snapgen.org/v1/images/generations"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.snapgen.org/v1/images/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.snapgen.org/v1/images/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.snapgen.org/v1/images/generations"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.snapgen.org/v1/images/generations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.snapgen.org/v1/images/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyUse
For image editing, add
nano-banana-2-lite for a single 1K result. This fixed-price route uses the
Lite Ext engine and disables the variable token-billed official fallback.
It does not substitute another model when the selected channel is unavailable.
A request accepts up to 7,000 prompt characters, up to fourteen public image
references and n: 1. Resolution is 1K only. size can be auto, 1:1, 16:9,
9:16, 4:3, 3:4, 3:2, 2:3, 5:4, 4:5 or 21:9.
{
"model": "nano-banana-2-lite",
"prompt": "An original paper-cut illustration of the water cycle with clouds, rain and a river.",
"resolution": "1K",
"size": "16:9",
"n": 1
}
image_urls, such as
["https://your-cdn.example/reference.png"]. official_fallback: true is rejected.
Send a unique Idempotency-Key and Prefer: respond-async, then poll the returned
Task ID. The current launch price is $0.03 per image;
confirm it with the live Catalog.