Guides
How to add image generation to an AI agent
AI agents like Claude Code, Cursor, and Codex are powerful at writing and reasoning about code - but they cannot generate images on their own. AnyCap bridges that gap. This guide walks through adding image generation to any AI agent in under five minutes, from installing the skill to generating your first image with models like Seedream 5 and Nano Banana Pro.
What you need
- An AI agent that can run shell commands (Claude Code, Cursor, Codex, etc.)
- Node.js 18+ (for skills.sh and npm install)
- A browser for the one-time login flow
These steps work for any agent that can execute shell commands. The examples use Claude Code, but the same commands work in Cursor, Codex, and other agents.
Install the AnyCap skill
# For Claude Code
npx -y skills add anycap-ai/anycap -a claude-code -y
# For Cursor
npx -y skills add anycap-ai/anycap -a cursor -y
This places the AnyCap SKILL.md into your agent's skills directory. The skill file teaches the agent which image models are available and how to call them.
Install the AnyCap CLI
curl -fsSL https://anycap.ai/install.sh | sh
Or: npm install -g @anycap/cli
Log in
anycap login
Opens a browser for authentication. One login covers every capability - image generation, video, music, and understanding.
Discover available image models
anycap image models
Lists all available image models. Current options include Seedream 5, Seedream 4.5, Nano Banana Pro, and Nano Banana 2 - each with different strengths for photorealism, artistic styles, and speed.
Generate your first image
anycap image generate --model seedream-5 --prompt "a product photo on white background"
The CLI returns the generated image URL. Your agent can download, display, or use the image in subsequent steps.
Use image generation in agent workflows
Once the skill is installed and the CLI is authenticated, your agent can generate images in response to natural-language prompts. Tell your agent:
# Ask your agent naturally
"Generate a hero image for the landing page"
# Or specify a model
"Create a logo concept using nano-banana-pro"
The agent reads the skill file, selects an appropriate model, and calls AnyCap CLI - no manual command construction needed.
FAQ
Which AI agents support AnyCap image generation?
Any agent that can run shell commands supports AnyCap. This includes Claude Code, Cursor, Codex, and Manus. The agent calls the AnyCap CLI directly from the terminal.
What image models are available?
AnyCap provides access to Seedream 5, Seedream 4.5, Nano Banana Pro, and Nano Banana 2. Each model has different strengths — Seedream 5 excels at photorealistic images while Nano Banana Pro handles artistic styles well.
Can the agent choose the right model automatically?
Yes. When the AnyCap skill is installed, your agent learns about each model's strengths. It can select the best model based on the prompt and desired output style without manual intervention.
How much does image generation cost?
AnyCap uses pay-as-you-go pricing with no monthly fee. New users receive $5 in free credit. Pricing varies by model — see the pricing page for per-generation rates.