Javascript

A shared tag with AI prompts and code snippets

From workspace: Google Gemini

Team: Nano Banana

Total snippets: 2

Google Gemini

Javascript

2 snippets

Image editing (text-and-image-to-image) JavaScript

import { GoogleGenAI, Modality } from "@google/genai"; import * as fs from "node:fs"; async function main() { const ai = new GoogleGenAI({}); const imagePath = "path/to/cat_image.png"; const imageData = fs.readFileSync(imagePath); const...

Image generation (text-to-image) Javascript

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...