gemini-3.1-flash-image API gambar AI

gemini-3.1-flash-image (Nano Banana 2): Buat gambar, edit dengan referensi, dan sempurnakan desain melalui Flatkey. Contoh memakai contents/parts Gemini, bukan badan Images API yang dapat langsung dipertukarkan.

Teks menjadi gambarGambar terpandu referensi
Masukan /M
$0.5/ 1 juta token$0.5/ 1 juta token
Keluaran /M
$3/ 1 juta token$3/ 1 juta token
Penyedia
Google
Penyiapan generator · Playground (edit sebelum mendaftar)

Masukan

InstruksiLihat selengkapnya984 / 10000
Prompt cepat
Gambar referensi
Mulai membuat

Keluaran

Pratinjau
Pratinjau gambar

Dibuat dengan Image 2

Ringkasan permintaan

Titik akhir API
POST /v1beta/models/gemini-3.1-flash-image:generateContent
ID model
gemini-3.1-flash-image
Rasio aspek
16:9
Resolusi
1K

Hanya pratinjau. Masuk untuk mengirim permintaan ini ke Flatkey.

Pratinjau permintaan
{
  "model": "gemini-3.1-flash-image",
  "contents": [
    {
      "role": "user",
      "parts": [
        {
          "text": "Scene: A softly faded historical dock scene shows several workers repairing a large wooden boat at a riverside boatyard. Timber ribs, scaffolding, hand tools, smaller boats, and weathered work clothes fill the wide documentary frame. Restore the wood grain, riverbank structures, faces, and natural color aging without modern objects, readable signs, logos, captions, or watermark.\n\nComposition and restoration: Deliver one 16:9 archival-style still. Preserve the original framing, period-specific construction and restrained tonal range; retain monochrome, sepia or faded color as described. Recover modest detail in faces, clothing and architecture without synthetic sharpening. Keep fine grain and authentic aging consistent across the frame; repair damage without replacing historical features.\n\nAvoid: warped perspective, malformed anatomy, merged objects, inconsistent shadows, excessive sharpening and watermarks. Follow the scene-specific text and branding restrictions above."
        }
      ]
    }
  ],
  "generationConfig": {
    "responseModalities": [
      "TEXT",
      "IMAGE"
    ],
    "imageConfig": {
      "aspectRatio": "16:9",
      "imageSize": "1K"
    }
  }
}

Performa API

gemini-3.1-flash-image Keandalan dan ketersediaan API

Telemetri permintaan Flatkey untuk gemini-3.1-flash-image akan tampil di sini jika trafik produksi sudah mencukupi.

Rata-rata uptime penyedia
94.7%
30 hari terakhir
Latensi
1.79s
30 hari terakhir
Permintaan
281
Jendela 30 hari
Tren inferensi berhasil

Aktivitas API

gemini-3.1-flash-image Penggunaan dan aktivitas permintaan API

Pantau volume permintaan dan aktivitas inferensi berhasil untuk gemini-3.1-flash-image pada periode pelaporan terbaru.

Permintaan
281
Jendela 30 hari
Latensi
1.79s
30 hari terakhir
Waktu aktif
94.7%
30 hari terakhir
Tren inferensi berhasilAktivitas

gemini-3.1-flash-image harga

gemini-3.1-flash-image Harga dan penagihan API

Kartu menampilkan tarif token input dan output Flatkey saat ini. Tarif token bukan harga tetap per gambar: pengaturan, referensi, dan output memengaruhi penggunaan. Harga langsung dan kuota gratis Google tidak otomatis berlaku.

Harga Flatkey

Masukan /M

Model dari katalog langsung
$0.5/ 1 juta token$0.5/ 1 juta token
Masukan /M
$0.5/ 1 juta token$0.5/ 1 juta token
Keluaran /M
$3/ 1 juta token$3/ 1 juta token
Input gambar /M
$0.06/ 1 juta token$0.06/ 1 juta token
Coba prompt
Saldo bersama

Tambah kredit

Tambah kredit

Gunakan saldo dan kunci API Flatkey yang sama untuk model gambar, video, audio, dan teks.

Katalog model
Jenis model
Teks menjadi gambar
API
/v1beta/models/gemini-3.1-flash-image:generateContent
Dasar penagihan
1M tokens
Keluaran
1

gemini-3.1-flash-image generator gambar AI dan API: kemampuan utama

Rute gemini-3.1-flash-image dari Google mendukung teks · gambar. Kategori katalog: Marketing.

Teks menjadi gambar

Jelaskan subjek, komposisi, cahaya, dan teks. Atur kontrol output pada bidang permintaan, bukan hanya prompt.

Gambar referensi

Tambahkan referensi dan jelaskan bagian yang dipertahankan atau diubah. Ikuti batas pada matriks parameter.

Keluaran

Pilih hanya rasio dan ukuran yang tersedia di Playground. Flash, Flash Lite, dan Pro memiliki batas output berbeda.

API

Pertahankan ID tepat dan struktur contents/parts pada contoh. Uji permintaan kecil sebelum pemrosesan batch.

Bandingkan

gemini-3.1-flash-image Perbandingan API: kemampuan dan akses

Bandingkan fakta katalog gemini-3.1-flash-image dengan acuan generasi sebelumnya sebelum mengubah integrasi.

KemampuanGenerasi sebelumnyagemini-3.1-flash-image
PenyediaBelum diverifikasi dalam snapshot katalog iniGoogle
ModalitasBelum diverifikasi dalam snapshot katalog initeks · gambar
KonteksBelum diverifikasi dalam snapshot katalog iniKatalog tidak mencantumkan jendela konteks
Titik akhir APIBelum diverifikasi dalam snapshot katalog ini/v1beta/models/gemini-3.1-flash-image:generateContent
PenagihanBelum diverifikasi dalam snapshot katalog ini$0.5/$3 per 1M tokens

Pilih permintaan yang tepat sebelum integrasi

Periksa alur yang didukung, biaya saat ini, dan kontrak parameter Flatkey.

Estimasi biaya langsung

Dihitung dari konfigurasi saat ini dan tarif katalog jika harga unit tetap tersedia.

Konfigurasi saat ini
1×
Tarif langsung
$0.06
Estimasi permintaan
Harga berdasarkan penggunaan

Biaya akhir mengikuti permintaan dan grup akun; harga token atau bertingkat tidak dapat dijadikan satu angka tetap.

Alur dan Model ID

Gunakan hanya alur yang tersedia. Flatkey mempertahankan satu ID publik dan body memilih jenis input.

Tersedia

Teks ke gambar

Buat gambar baru dari teks.

ID model
gemini-3.1-flash-image
Endpoint
/v1beta/models/gemini-3.1-flash-image:generateContent
Tersedia

Gambar berpanduan referensi

Gunakan referensi untuk edit atau variasi.

ID model
gemini-3.1-flash-image
Endpoint
/v1beta/models/gemini-3.1-flash-image:generateContent

Kompatibilitas parameter

Nilai berasal dari konfigurasi yang sama dengan Playground.

aspect_ratioRasio aspek
Diterima

1:1 · 2:3 · 3:2 · 3:4 · 4:3 · 4:5 · 5:4 · 9:16 · 16:9 · 21:9

Default: 1:1
image_sizeUkuran
Diterima

1K · 2K · 4K

Default: 1K
imageBatas referensi
Diterima

4 file

Endpoint: /v1beta/models/gemini-3.1-flash-image:generateContent

Dari tes pertama ke produksi

Gunakan kontrak yang sama di Playground dan API serta tangani validasi, saldo, status, dan hasil.

Siklus permintaan

  1. 1

    Validasi model, prompt, referensi, dan output.

  2. 2

    Kirim permintaan gambar.

  3. 3

    Baca hasil atau tugas asinkron.

  4. 4

    Simpan file dan metadata.

Pemeriksaan produksi

Validasi parameter

Blokir nilai dan referensi yang tidak didukung.

Autentikasi dan saldo

Tangani kunci, saldo, limit, dan harga grup terpisah.

Input ditolak

Tunjukkan prompt atau aset yang harus diganti.

Gagal atau timeout

Simpan task ID, batasi percobaan, dan jangan anggap timeout berhasil.

Pustaka prompt

Contoh prompt gemini-3.1-flash-image untuk pembuatan gambar

Mulai dengan prompt gemini-3.1-flash-image untuk pembuatan gambar, lalu sesuaikan kolom permintaan yang terlihat di playground.

Interaksi UI game dan pergantian perlengkapan
Interaksi UI game dan pergantian perlengkapan

Dibuat dengan Image 2

Scene: A 16:9 futuristic game loadout frame shows a helmeted rider beside a black-and-orange motorcycle in a rainy industrial hangar. Blue-and-orange interface controls and a circular part-selection panel sit around the vehicle. Keep the rider, motorcycle geometry, wet floor reflections, lighting direction, and selected-part position fixed for a clean equipment swap. No readable words, logos, invented stats, or watermark. Composition and rendering: Deliver one 16:9 game-interface keyframe. Separate the character, held equipment and HUD into clear depth layers; keep slot spacing and icon scale consistent, with the selected item visually dominant. Preserve the scene-specific game art style. Let material edges catch the existing light without letting interface glow obscure the silhouette. Keep all equipment fully inside the frame. Avoid: warped perspective, malformed anatomy, merged objects, inconsistent shadows, excessive sharpening and watermarks. Follow the scene-specific text and branding restrictions above.

Buat serupa
Simulasi siaran TV pertandingan olahraga
Simulasi siaran TV pertandingan olahraga

Scene: A poolside sports broadcast catches a swimmer in a blue cap during freestyle, with one arm entering the water and a sharp splash across the lane. Use a low pool-deck camera, blue water, lane markings, and abstract blue lower-third graphics without readable text. Keep swimmer direction, splash shape, and framing consistent; no real athletes, teams, logos, or watermark. Composition and rendering: Deliver one 16:9 broadcast still at the decisive instant. Use coherent perspective for the playing surface and equipment, readable separation between competitors, and a softer crowd behind the action. Keep the principal subject sharp, with directional blur limited to fast extremities and spray. Preserve the specified broadcast angle and reserve overlay areas clear of the action. Avoid: warped perspective, malformed anatomy, merged objects, inconsistent shadows, excessive sharpening and watermarks. Follow the scene-specific text and branding restrictions above.

Buat serupa
TVC merek dan tampilan e-commerce tanpa jeda
TVC merek dan tampilan e-commerce tanpa jeda

Dibuat dengan Image 2

Scene: A metallic wireless-earbud charging case floats open above a glossy black surface while the two matching earbuds hover above their slots. Purple and cyan rim lights define the rounded metal, black interior, reflections, and empty dark background. Preserve the case, earbuds, hinge, highlights, and three-quarter camera angle. No readable branding, extra products, hands, or watermark. Composition and rendering: Deliver one 16:9 commercial product still. Keep the complete product silhouette inside generous crop-safe margins. Resolve edges, seams and material transitions precisely; shape highlights to describe volume without clipping bright surfaces or crushing dark details. Align reflections with the object and light source. Retain the stated camera angle and existing negative space; add no decorative props. Avoid: warped perspective, malformed anatomy, merged objects, inconsistent shadows, excessive sharpening and watermarks. Follow the scene-specific text and branding restrictions above.

Buat serupa
Karakter sinematik dan pengarahan storyboard
Karakter sinematik dan pengarahan storyboard

Dibuat dengan Image 2

Scene: A cloaked figure crouches on a rain-slick elevated walkway beneath massive futuristic bridges. Cyan fog, magenta tower lights, railings, and wet reflections lead toward the distant city. Hold the figure's silhouette, facing direction, cloak edge, camera height, and neon light placement as a cinematic storyboard keyframe. No readable signs, logos, or watermark. Composition and rendering: Deliver one 16:9 storyboard keyframe, not a collage or an action sequence. Separate foreground, character plane and background through the existing light and atmospheric depth. Keep the stated pose and eyelines readable, and retain environmental landmarks for continuity. Match the described photographic, illustrated or puppet medium; give fabric and surfaces texture appropriate to that medium. Avoid: warped perspective, malformed anatomy, merged objects, inconsistent shadows, excessive sharpening and watermarks. Follow the scene-specific text and branding restrictions above.

Buat serupa
Sketsa komedi dan penceritaan fisik
Sketsa komedi dan penceritaan fisik

Dibuat dengan Image 2

Scene: In a wet green park, a man in a coral-red raincoat and yellow boots struggles with an inverted rainbow umbrella in a gust of wind. His arms brace against the bent canopy while rain streaks through the trees and puddles reflect the bright colors. Keep the umbrella shape, body pose, wind direction, and safe footing clear; no injury, readable text, logos, or watermark. Composition and rendering: Deliver one 16:9 physical-comedy still at the described instant. Make the cause of the gag readable through body balance, grip and object spacing. Separate the reaction from the airborne props; retain believable gravity and contact points. Keep the face and important props sharp, with only restrained directional blur on fast edges. Preserve the stated lighting and room or stage layout. Avoid: warped perspective, malformed anatomy, merged objects, inconsistent shadows, excessive sharpening and watermarks. Follow the scene-specific text and branding restrictions above.

Buat serupa
Pemulihan foto lama dan penghidupan sejarah
Pemulihan foto lama dan penghidupan sejarah

Dibuat dengan Image 2

Scene: A softly faded historical dock scene shows several workers repairing a large wooden boat at a riverside boatyard. Timber ribs, scaffolding, hand tools, smaller boats, and weathered work clothes fill the wide documentary frame. Restore the wood grain, riverbank structures, faces, and natural color aging without modern objects, readable signs, logos, captions, or watermark. Composition and restoration: Deliver one 16:9 archival-style still. Preserve the original framing, period-specific construction and restrained tonal range; retain monochrome, sepia or faded color as described. Recover modest detail in faces, clothing and architecture without synthetic sharpening. Keep fine grain and authentic aging consistent across the frame; repair damage without replacing historical features. Avoid: warped perspective, malformed anatomy, merged objects, inconsistent shadows, excessive sharpening and watermarks. Follow the scene-specific text and branding restrictions above.

Buat serupa

Mengapa API gemini-3.1-flash-image

Mengapa menggunakan gemini-3.1-flash-image melalui Flatkey?

Gunakan satu gateway untuk gemini-3.1-flash-image, kontrol akun, dan seluruh katalog model lainnya.

gemini-3.1-flash-image dalam satu API

Pertahankan model ID dan endpoint gemini-3.1-flash-image secara eksplisit dengan kunci Flatkey yang sama untuk workload lain.

Harga katalog live

Lihat dimensi penagihan gemini-3.1-flash-image sebelum mengirim permintaan, lalu konfirmasi estimasi akhir di akun.

Serah-terima model praktis

Uji prompt gemini-3.1-flash-image di playground publik dan bawa pengaturan yang sama ke integrasi terautentikasi.

Kontrol penggunaan dan rute

Pusatkan kunci, kuota, dan rute gemini-3.1-flash-image tanpa mengubah alur kerja aplikasi terhadap penyedia.

API

gemini-3.1-flash-image API

Empat cara dengan key dan katalog yang sama. Pilih satu untuk melihat contoh yang dapat dijalankan.

Panggil model melalui API yang kompatibel dengan OpenAI. Salin contoh siap jalan untuk model dan bahasa Anda.
Gunakan OpenAI SDK yang sudah Anda kenal, dengan Flatkey sebagai gateway.
Buat gambar dan video dari terminal. Biarkan asisten AI Anda menjalankan alur kerjanya.
Hubungkan agen pemrograman Anda dengan satu perintah, lalu gunakan Flatkey di proyek yang sudah ada.
curl https://router.flatkey.ai/v1beta/models/gemini-3.1-flash-image:generateContent \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-***" \
  -d '{"model":"gemini-3.1-flash-image","contents":[{"role":"user","parts":[{"text":"Buat gambar produk berkualitas tinggi dengan gemini-3.1-flash-image: komposisi bersih, pencahayaan presisi, fokus kuat pada subjek, dan detail realistis."}]}],"generationConfig":{"responseModalities":["TEXT","IMAGE"],"imageConfig":{"aspectRatio":"1:1","imageSize":"1K"}}}'
Dokumentasi

Pertanyaan umum

gemini-3.1-flash-image API
pertanyaan harga, fitur, dan penggunaan

Jawaban tentang harga, kemampuan, endpoint, dan batas katalog gemini-3.1-flash-image.

Untuk apa gemini-3.1-flash-image digunakan?
gemini-3.1-flash-image (Nano Banana 2): Buat gambar, edit dengan referensi, dan sempurnakan desain melalui Flatkey. Contoh memakai contents/parts Gemini, bukan badan Images API yang dapat langsung dipertukarkan.
Bagaimana harga gemini-3.1-flash-image?
Masukan /M: $0.5; Keluaran /M: $3; Input gambar /M: $0.06. Kartu menampilkan tarif token input dan output Flatkey saat ini. Tarif token bukan harga tetap per gambar: pengaturan, referensi, dan output memengaruhi penggunaan. Harga langsung dan kuota gratis Google tidak otomatis berlaku.
Endpoint API mana yang memanggil gemini-3.1-flash-image?
POST /v1beta/models/gemini-3.1-flash-image:generateContent · gemini-3.1-flash-image
Apakah Flatkey menyediakan semua fitur dalam dokumentasi Google?
Tidak. Spesifikasi Google dan kontrak rute Flatkey memiliki cakupan berbeda. Gunakan bidang yang didukung di sini; nama model tidak menjamin pencarian, alat penyedia, atau semua jenis input resmi.