image-gen
यह क्या करती है
यह स्किल आपके लिखे विवरण से OpenRouter के ज़रिए Google के Nano Banana image मॉडल से तस्वीर बनाती है। यह किसी भी व्यक्ति के लिए है जो AI से चित्र, diagram या दृश्य बनवाना चाहता है।
कब इस्तेमाल करें
- ✓जब आप अपने AI से कोई चित्र बनवाना, illustrate करवाना या render करवाना चाहें।
- ✓जब आप एक छोटे विवरण से diagram या दृश्य बनवाना चाहें।
- ✓जब आप विवरण के साथ एक या अधिक इनपुट तस्वीरों से नई तस्वीर चाहें।
Skill का लिंक
https://github.com/EverMind-AI/Raven/blob/main/demos/skill_retrieval/skills/image-gen/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे लिए एक पेड़ के नीचे किताब पढ़ती एक प्यारी कार्टून लोमड़ी का चित्र बनाइए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट आपका विवरण OpenRouter के ज़रिए image मॉडल को भेजता है, तस्वीर के output का अनुरोध करता है, और लौटी हुई तस्वीर को फ़ाइल में सहेजता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
image-gen — Nano Banana via OpenRouter
Generates one or more images from a text prompt (and optionally one or more input images) by calling Google's Nano Banana family on OpenRouter:
google/gemini-2.5-flash-image— original (Nano Banana)google/gemini-3.1-flash-image-preview— latest (Nano Banana 2)
OpenRouter speaks the OpenAI-compatible chat-completions API for these models, with two extras:
- The request must include
"modalities": ["image", "text"]so the server knows to return image bytes, not just a description. - The response carries images in a top-level
message.imagesarray (NOT incontent— that field still holds optional commentary text).
Quick recipe
import os, base64, json, urllib.request
KEY = os.environ["OPENROUTER_API_KEY"]
MODEL = "google/gemini-2.5-flash-image" # or 3.1 for "Nano Banana 2"
def generate_image(prompt: str, out_path: str = "out.png") -> str:
req = urllib.request.Request(
"https://openrouter.ai/api/v1/chat/completions",
data=json.dumps({
"model": MODEL,
"messages": [{"role": "user", "content": prompt}],
"modalities": ["image", "text"],
}).encode(),
headers={
"Authorization": f"Bearer {KEY}",
"Content-Type": "application/json",
},
method="POST",
)
with urllib.request.urlopen(req, timeout=120) as resp:
data = json.loads(resp.read())
msg = data["choices"][0]["message"]
# ``message.images[i].image_url.url`` is a data URI:
# "data:image/png;base64,<base64-bytes>"
url = msg["images"][0]["image_url"]["url"]
b64 = url.split(",", 1)[1]
with open(out_path, "wb") as f:
f.write(base64.b64decode(b64))
text_note = msg.get("content") or ""
return f"Wrote {out_path} ({len(b64)//1024} KB). Model said: {text_note[:200]!r}"
Request shape (full)
{
"model": "google/gemini-2.5-flash-image",
"messages": [
{"role": "user", "content": "A red circle on white background"}
],
"modalities": ["image", "text"]
}
For image input + image output (edit / vary / extend), use the standard
multipart content form OpenAI clients accept. The image part can be either
a remote URL or a base64 data URI:
{
"role": "user",
"content": [
{"type": "text", "text": "Make this watercolor style"},
{"type": "image_url",
"image_url": {"url": "data:image/png;base64,iVBORw0KGgo..."}}
]
}
Response shape
{
"choices": [{
"message": {
"role": "assistant",
"content": "optional text commentary",
"images": [
{
"type": "image_url",
"image_url": {
"url": "data:image/png;base64,<bytes>"
}
}
]
}
}],
"usage": {
"prompt_tokens": 8,
"completion_tokens": 1295,
"total_tokens": 1303,
"cost": 0.0383,
"completion_tokens_details": {"image_tokens": 1290}
}
}
Cost (observed)
~$0.04 per 1024×1024 PNG at the time of writing (1290 image tokens × $0.00003/tok via the v2.5 flash-image model). Burst test: 10 images ≈ $0.40. Budget gates accordingly when looping in agent code.
When to use this skill
Trigger keywords / patterns you should recognize:
- "generate / create / make / draw / render / illustrate (an image / a picture / a logo / ...)"
- "show me what X looks like"
- "design a banner / poster / icon for ..."
- "make it watercolor / cyberpunk / pencil sketch / pixel art" (edit existing)
- "vary this image" / "more like this but with ..."
Don't use this skill for:
- Charts / plots from data → prefer a Python plotting skill (matplotlib / plotly) rather than a generative image. Charts need accurate numbers; Nano Banana will hallucinate axes.
- Diagrams with precise structure (UML, DAGs) → use mermaid / graphviz instead.
Troubleshooting
- Empty
imagesarray: you forgot"modalities": ["image", "text"]. OpenRouter falls back to text-only without it. - HTTP 403 with "not available in your region": OpenRouter blocks
Anthropic + some Google models from China-mainland IPs. Set
HTTPS_PROXYto a proxy that exits via a non-blocked region. - Response includes
refusal: prompt was content-filtered. Rewrite the prompt; don't retry the same string. - PNG opens to blank / corrupt: you wrote the data URI verbatim
अक्सर पूछे जाने वाले सवाल
कौन से मॉडल इस्तेमाल होते हैं?
यह Google का Gemini 2.5 Flash Image मॉडल और नया Gemini 3.1 Flash Image preview इस्तेमाल करती है।
क्या इसके लिए अकाउंट चाहिए?
हाँ। इसके लिए environment में OpenRouter API key सेट होनी चाहिए।
क्या यह मेरी अपनी तस्वीरें इस्तेमाल कर सकती है?
हाँ। यह टेक्स्ट prompt के साथ एक या अधिक इनपुट तस्वीरें ले सकती है।
जानकारी
लेखक का मूल विवरण
Generate images via Nano Banana (Gemini 2.5/3.1 Flash Image) on OpenRouter. Use when the user asks to draw, illustrate, render or generate any kind of picture/diagram/scene.
repo: EverMind-AI/Raven
लोकप्रियता
- GitHub स्टार
- 6.0k
- रैंकिंग में स्थान
- #14472
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
deck-to-pptx
6.0kयह आपके एजेंट को python-pptx से असली PowerPoint .pptx फ़ाइल बनाना सिखाती है, जिसमें icons, charts, formulas और इस सेटअप के टूल शामिल हैं।
ppt-script-authoring
6.0kयह आपके एजेंट को स्पष्ट कहानी वाला स्लाइड डेक डिज़ाइन करना और उसे अपने लेआउट के साथ python-pptx प्रोग्राम के रूप में बनाना सिखाती है।
multi-agent-coding
6.0kयह आपके एजेंट को कोडिंग काम सही कोडिंग एजेंट को सौंपने देती है, हर काम के लिए नया एजेंट शुरू करती है और परिणाम फ़ाइलों से आगे भेजती है।
raven-self-config
6.0kयह आपके एजेंट को Raven ऐप की अपनी settings देखने और बदलने देती है, जैसे agents और chat apps जोड़ना, और कोई क्षमता क्यों गायब है यह समझाती है।
मिलती-जुलती skills
gifgrep
394kयह आपके एजेंट को GIF लाइब्रेरी में खोजने, नतीजों का पूर्वावलोकन करने, GIF डाउनलोड करने, और उससे एक फ़्रेम या फ़्रेम्स की शीट निकालने देती है।
meme-maker
394kयह आपके एजेंट को मीम टेम्पलेट चुनने, अपने कैप्शन जोड़ने और मीम को SVG या PNG इमेज के रूप में बनाने देती है।
ios-icon-gen
280kआपके एजेंट को iOS ऐप्स के लिए icons बनाने देता है। यह Apple symbols या दूसरे स्रोतों के आइकन इस्तेमाल करके सही files बनाता है।