English · 中文
OpenCode + Agnes Image 2.1 Flash = Free article illustration generation, zero cost
Powered by DeepSeek · Driven by Agnes AI API
OpenAgnes-Image is a skill designed for OpenCode. It calls the free Agnes AI image generation API (Agnes-Image-2.1-Flash) to create high-quality illustrations, covers, and visual assets — all through natural language in OpenCode.
Completely free. No credit card required. No trial credits needed.
- 🧠 Self-planning agent — The built-in free model (e.g.
DeepSeek V4 Flash Free) understands your request, plans parameters, and optimizes prompts autonomously - 🎨 Professional generation — Agnes
Image-2.1-Flashhandles the actual image generation, supporting up to 4K output - 💬 Natural interaction — Describe what you want in everyday language; the agent guides you on style, color, composition
- 📁 Auto-save — Generated images are saved to your project root automatically
- 🔄 Audit & iterate — Post-generation audit with up to 3 refinement cycles
| Stage | Service | Cost |
|---|---|---|
| Requirement understanding & planning | OpenCode built-in free model | Free, no API key needed |
| Image generation | Agnes Image-2.1-Flash API |
Free, indefinitely open |
Agnes AI has been offering its core multimodal API to developers worldwide for free since June 1, 2026.
Clone the repository to your local machine:
git clone https://github.com/VirtualTests1/OpenAgnes-Image.gitOr download the ZIP archive from GitHub.
Then place the OpenAgnes-Image folder into OpenCode's skills directory.
Or simply tell OpenCode:
请读取 https://github.com/VirtualTests1/OpenAgnes-Image 这个仓库,安装 openagnes-image 技能,并完成所有相关配置。
OpenCode will automatically clone the repository, install the skill, and complete the setup for you.
- Go to Agnes API Platform
- Register and log in
- Navigate to API Keys in the left menu
- Click Create New Key, name it, and copy the generated key (e.g.,
sk-xxx...)
⚠️ Agnes Agent Platform and API Platform are separate registrations. You must register on the API Platform (platform.agnes-ai.com).
- Navigate to the
OpenAgnes-Imageskill directory (whereSKILL.mdlives) - Find
.env.exampleand rename it to.env - Open
.envand replace你的API密钥with your actual Agnes API Key
AGNES_API_KEY=sk-your-key-here
- Place the
OpenAgnes-Imagefolder in OpenCode's skills directory:- Global:
~/.config/opencode/skills/OpenAgnes-Image/ - Project-level:
.opencode/skills/OpenAgnes-Image/
- Global:
- Restart OpenCode or type
/reload
Generate an article illustration about "AI assistant helping a designer complete creative work"
The skill activates automatically and walks you through:
- Style selection (Real Photo / Anime / Watercolor / Cyberpunk…)
- Color tone (Warm / Cool / Vivid…)
- Aspect ratio (16:9 / 1:1 / 9:16 / 4:3…)
- Generation → audit → delivery
Supported ratios: 1:1 3:4 4:3 16:9 9:16 2:3 3:2 21:9
The agent adapts to your request's complexity:
| Request type | Example | Behavior |
|---|---|---|
| Simple (≥4 params clear) | "Cyberpunk city night, portrait wallpaper" | Extract → generate directly |
| Guided (2-3 params clear) | "Seaside sunset for article" | Ask only missing params |
| Structured (<20 chars) | "Generate a nice image" | Broad → narrow → generate |
| Autonomy | "You decide" | Full creative authority |
OpenAgnes-Image/
├── SKILL.md # Skill definition (core logic)
├── README.md # English documentation
├── README.zh.md # Chinese documentation
├── .env.example # API key template
├── .gitignore
├── scripts/
│ ├── generate.py # Agnes API caller
│ ├── preferences.py # User preference cache
│ └── ab_generate.py # A/B prompt variant generator
├── references/
│ ├── styles.md # 12 style templates + prompt rules
│ ├── scenes.md # 18 scene-to-style mappings
│ ├── quality-bank.md # Quality vocabulary bank
│ └── ratios.md # Aspect ratio / size reference
└── docs/images/ # Showcase images
- OpenCode (any version)
- Agnes API Key from Agnes API Platform
- Network access to
apihub.agnes-ai.com
- This skill is a community project, not affiliated with the official OpenCode team
- Agnes API is currently free; check official announcements for future policy changes
- Generation speed depends on network and API service status (typically seconds to tens of seconds)
MIT




