Image Generation: AI Art with Gemini Models
PocketPaw can generate images using Google’s Gemini models via the google-genai SDK.
Setup
curl -fsSL https://pocketpaw.xyz/install.sh | sh
# Or add the image extra manuallypip install pocketpaw[image]
export POCKETPAW_GOOGLE_API_KEY="your-google-api-key"Configuration
| Setting | Env Variable | Default | Description |
|---|---|---|---|
| API key | POCKETPAW_GOOGLE_API_KEY | - | Google AI API key |
| Model | POCKETPAW_IMAGE_MODEL | gemini-2.0-flash | Model to use for generation |
Usage
User: Generate an image of a cute robot holding a flowerAgent: [uses image_gen tool] → [generated image]The tool returns the generated image which can be displayed in the web dashboard or sent via messaging channels.
Tool Schema
{ "name": "image_gen", "description": "Generate an image from a text description", "input_schema": { "type": "object", "properties": { "prompt": { "type": "string", "description": "Description of the image to generate" } }, "required": ["prompt"] }}Policy Group
Belongs to group:media. Control access with:
export POCKETPAW_TOOLS_ALLOW="group:media"Installation
Requires the image extra:
curl -fsSL https://pocketpaw.xyz/install.sh | sh
# Or add the image extra manuallypip install pocketpaw[image]This installs google-genai as an optional dependency.
Related
OCR Tool
Extract text from images using GPT-4o Vision or pytesseract.
Voice & TTS
Convert text to speech with OpenAI TTS or ElevenLabs.
Tools Overview
Browse all 50+ built-in tools available in PocketPaw.
Was this page helpful?