A shared folder with AI prompts and code snippets
From workspace: Google Gemini
Team: Nano Banana
Total snippets: 5
5 snippets
curl -s -X POST "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-image-preview:generateContent" \ -H "x-goog-api-key: $GEMINI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "contents": [{ "parts":...
package main import ( "context" "fmt" "os" "google.golang.org/genai" ) func main() { ctx := context.Background() client, err := genai.NewClient(ctx, nil) if err != nil { log.Fatal(err) } result, _ :=...
import { GoogleGenAI, Modality } from "@google/genai"; import * as fs from "node:fs"; async function main() { const ai = new GoogleGenAI({}); const prompt = "Create a picture of a nano banana dish in a fancy restaurant with a Gemini...
The following code demonstrates how to generate an image based on a descriptive prompt.
from google import genai from google.genai import types from PIL import Image from io import BytesIO client = genai.Client() prompt = ( "Create a picture of a nano banana dish in a fancy restaurant with a Gemini theme" ) response =...
Gemini can generate and process images conversationally. You can prompt Gemini with text, images, or a combination of both allowing you to create, edit, and iterate on visuals with unprecedented control:
Text-to-Image: Generate high-quality images from simple or complex text descriptions. Image + Text-to-Image (Editing): Provide an image and use text prompts to add, remove, or modify elements, change the style, or adjust the color...