Image Generation
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 POCKETCLAW_GOOGLE_API_KEY="your-google-api-key"Configuration
| Setting | Env Variable | Default | Description |
|---|---|---|---|
| API key | POCKETCLAW_GOOGLE_API_KEY | — | Google AI API key |
| Model | POCKETCLAW_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 POCKETCLAW_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.
Was this page helpful?