Image Generation

PocketPaw can generate images using Google’s Gemini models via the google-genai SDK.

Setup

Terminal window
curl -fsSL https://pocketpaw.xyz/install.sh | sh
# Or add the image extra manually
pip install pocketpaw[image]
export POCKETCLAW_GOOGLE_API_KEY="your-google-api-key"

Configuration

SettingEnv VariableDefaultDescription
API keyPOCKETCLAW_GOOGLE_API_KEYGoogle AI API key
ModelPOCKETCLAW_IMAGE_MODELgemini-2.0-flashModel to use for generation

Usage

User: Generate an image of a cute robot holding a flower
Agent: [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:

Terminal window
export POCKETCLAW_TOOLS_ALLOW="group:media"

Installation

Requires the image extra:

Terminal window
curl -fsSL https://pocketpaw.xyz/install.sh | sh
# Or add the image extra manually
pip install pocketpaw[image]

This installs google-genai as an optional dependency.