promptstringआवश्यक
The text prompt to generate an image from.
डिफ़ॉल्ट: "a cat sitting on a windowsill, golden hour lighting, photorealistic"
google/nano-banana-proNano Banana Pro is Google's new state-of-the-art image generation and editing model
model को आज़माएँ
प्लेग्राउंड में इसके इनपुट और परिणाम लोड करने के लिए कोई उदाहरण चुनें।
{
"aspect_ratio": "1:1",
"prompt": "Present a clear, 45° top-down isometric miniature 3D cartoon scene of London, featuring its most iconic landmarks and architectural elements. Use soft, refined textures with realistic PBR materials and gentle, lifelike lighting and shadows. Integrate the current weather conditions directly into the city environment to create an immersive atmospheric mood. Use a clean, minimalistic composition with a soft, solid-colored background. At the top-center, place the title \"London\" in large bold text, a prominent weather icon beneath it, then the date (small text) and temperature (medium text). All text must be centered with consistent spacing, and may subtly overlap the tops of the buildings."
}{
"aspect_ratio": "1:1",
"prompt": "An icon representing a cute dog. The background is white. Make the icons in a colorful and tactile 3D style. No text."
}{
"aspect_ratio": "16:9",
"prompt": "A photo of an everyday scene at a busy cafe serving breakfast. In the foreground is an anime man with blue hair, one of the people is a pencil sketch, another is a claymation person."
}मानवीय पसंद
ब्लाइंड साइड-बाय-साइड वोटों से प्राप्त Elo रेटिंग, अन्य इमेज और वीडियो मॉडलों से तुलना में।
रैंकिंग का स्रोत Artificial Analysis Arena
टेक्स्ट-से-इमेज Arena: लोग एक ही प्रॉम्प्ट से बनी दो छवियों में से बेहतर छवि चुनते हैं, मॉडल नाम देखे बिना।
Nano Banana Pro (Gemini 3 Pro Image) is Google's highest-quality image model: strong reasoning over the prompt, accurate multilingual text in the image, and 1K to 4K output.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Up to 50,000 characters. |
aspect_ratio | 21:9 / 16:9 / 3:2 / 4:3 / 5:4 / 1:1 / 4:5 / 3:4 / 2:3 / 9:16 | 1:1 | Output frame shape. |
output_format | jpeg / png | png | Output file format. |
resolution | 1K / 2K / 4K | 1K | Sets the per-image rate. |
$0.134 per image at 1K or 2K and $0.24 at 4K, Google's list price.
| Request | 1K | 2K | 4K |
|---|---|---|---|
| One image | $0.134 | $0.134 | $0.24 |
Failed runs are not charged.
Other Nano Banana endpoints: google/nano-banana-pro/edit, google/nano-banana-2, google/nano-banana-2/edit, google/nano-banana-2-lite, google/nano-banana-2-lite/edit.
बिल्डिंग शुरू करें
इस model को SandBase Unified Run API के माध्यम से सबमिट करें।
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"model": "google/nano-banana-pro",
"prompt": "a cat sitting on a windowsill, golden hour lighting, photorealistic",
"resolution": "1K",
"aspect_ratio": "1:1",
"output_format": "png"
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
status=$(printf '%s' "$result" | jq -r .status)
case "$status" in completed|failed|timeout) break ;; esac
sleep 2
result=$(curl --fail-with-body --silent \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
"https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"एक SandBase API key बनाएँ और इसे अपने server environment में सेट करें। सभी requests Bearer authentication का उपयोग करती हैं।
export SANDBASE_API_KEY="YOUR_API_KEY"Key को सर्वर पर रखें। इसे browser code में expose न करें या repository में commit न करें।
इस model ID और इसके inputs के साथ /v1/run पर POST करें। ऊपर दिया गया request example submission और polling दोनों शामिल करता है।
Completed, failed या timeout होने तक poll करने के लिए लौटाए गए run ID का उपयोग करें। Output केवल completed होने के बाद पढ़ें।
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Model के image, video या audio field में सार्वजनिक रूप से उपलब्ध फ़ाइल URL पास करें। समर्थित formats और limits प्रत्येक Playground input के पास दिखाए गए हैं।
Playground में समर्थित image fields पर upload या replace control का उपयोग करें। Video URL fields hosted driving video स्वीकार करते हैं; इससे video-upload support का संकेत नहीं मिलता।
promptstringआवश्यकThe text prompt to generate an image from.
डिफ़ॉल्ट: "a cat sitting on a windowsill, golden hour lighting, photorealistic"
resolutionstringThe resolution of the image to generate.
डिफ़ॉल्ट: "1K"
संभावित मान: "1K", "2K", "4K"
aspect_ratiostringThe aspect ratio of the generated image.
डिफ़ॉल्ट: "1:1"
संभावित मान: "21:9", "16:9", "3:2", "4:3", "5:4", "1:1", "4:5", "3:4", "2:3", "9:16"
output_formatstringThe format of the generated image.
डिफ़ॉल्ट: "png"
संभावित मान: "jpeg", "png"
{
"model": "google/nano-banana-pro",
"prompt": "a cat sitting on a windowsill, golden hour lighting, photorealistic",
"resolution": "1K",
"aspect_ratio": "1:1",
"output_format": "png"
}पूरा हुआ run अपना परिणाम output में दिखाता है। नीचे दिया गया model का सेव किया हुआ example है, नई generation नहीं।
[
{
"source": "Google AI for Developers",
"source_url": "https://ai.google.dev/gemini-api/docs/image-generation",
"url": "https://static.sandbase.ai/examples/bb9cdb52-fbe4-4e6d-a51d-7d6444b6221a/output/4924b213-a78a-413a-a727-3d330f59b658.jpg"
}
]