Guides · By AnyCap Team
How to add image generation to an AI agent
Image generation depends on the tools available in your agent session.
Codex, for example, supports image-generation workflows in supported environments. Use AnyCap when you want its model catalog and a consistent CLI across Claude Code, Cursor, and Codex. This guide covers installation, authentication, model discovery, and your first generated image.
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.
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
Install the AnyCap skill
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.
# 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 -yInstall the AnyCap CLI
curl -fsSL https://anycap.ai/install.sh | shOr: npm install -g @anycap/cli
Log in
Opens a browser for authentication. One login covers every capability - image generation, video, music, and understanding.
anycap loginDiscover available 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.
anycap image modelsGenerate your first image
The CLI saves the image to the path passed with -o and prints JSON with local_path, so the agent can open, inspect, or reuse the file in the next step.
anycap image generate --model seedream-5 --mode text-to-image --prompt "A small olive-green desk lamp on an off-white background, soft studio light, no text" --param aspect_ratio=16:9 --param resolution=2k --param format=png -o claude-code-launch-visual.png
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 pageOr specify a model
Create a logo concept using nano-banana-proThe 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. Pricing varies by model — see the pricing page for per-generation rates.
CLI version and updating · 0.6.5
Current release checked October 21, 2026: 0.6.5. Use the update command for your installation method, then verify the version and login in the same environment that runs your agent.
Direct binary installation
anycap updatenpm installation
npm install -g @anycap/cli@latestanycap --version
anycap statusVersion 0.6.5 retries transient downloads, recovers an expired video link by querying the same task, and saves multiple image outputs to numbered files. After a video download failure, resume the existing task instead of generating again.
anycap video tasks wait <task-id> -o result.mp4Dated examples retain the CLI version, output and charge from the original run. Updating the CLI does not revalidate an old result. Check the live model schema and current pricing before a new billed task.