generate-image

Generate and edit images via OpenRouter models to a specified output file.

Updated Mar 29, 2026
One-click install
npx skills add https://github.com/trungkiet2005/ai_code_detection --skill generate-image-trungkiet2005
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: generate-image
Source: https://github.com/trungkiet2005/ai_code_detection/tree/main/.claude/skills/generate-image
Command: npx skills add https://github.com/trungkiet2005/ai_code_detection --skill generate-image-trungkiet2005

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, and includes scripts (resource) components.

What problem does it solve?

Generating high-quality images and editing existing visuals can be time-consuming and require multiple tools. This skill streamlines image creation by leveraging AI models for generation and editing in one workflow.

Core Features & Use Cases

  • AI-powered image generation and editing across multiple models (e.g., Gemini, Flux)
  • Model selection and editing capabilities through a single script
  • API key handling and output management with clear prompts and outputs

Quick Start

Run python scripts/generate_image.py "A serene sunset over mountains" to generate a new image.

Frequently Asked Questions about generate-image

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate AI images from text prompts using a Python script?

To generate AI images from text prompts, run the Python script with your prompt string and specify an output file. The script requires an OpenRouter API key to process the image generation request.

Can I edit existing photos and illustrations with AI using OpenRouter models?

Yes, you can edit existing photos and illustrations with AI using OpenRouter models. The script supports prompt-based image editing for visual assets alongside standard generation capabilities.

Do I need an OPENROUTER_API_KEY to run the AI image generation script?

Yes, you need an OPENROUTER_API_KEY to run the AI image generation script. The key is required to authenticate requests to the multiple OpenRouter models used for artwork creation.

How do I select different AI models like Gemini or Flux for image generation?

You can select different AI models like Gemini or Flux for image generation through the script's model selection feature. This allows you to switch between models to achieve varied artwork styles.

What is the best way to automate batch-like prompt image generation for concept art?

The best way to automate batch-like prompt image generation for concept art is using this script's prompt-based generation capability. It automates AI-driven visual asset creation to reduce manual design workload.

Does AI image generation require the requests library to save results to an output file?

Yes, AI image generation requires the requests library to handle API calls. The script saves the generated image results directly to a user-specified output file upon successful processing.