llm-image-generation

Generate images via an OpenAI-compatible LLM gateway and save them locally.

7|1|Updated May 9, 2026
One-click install
npx skills add https://github.com/black-yt/skills --skill llm-image-generation
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: llm-image-generation
Source: https://github.com/black-yt/skills/tree/main/llm-image-generation
Command: npx skills add https://github.com/black-yt/skills --skill llm-image-generation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you reliably generate images through an OpenAI-compatible LLM gateway without exposing API keys or guessing model setup. It is designed for situations where image requests are slow, configuration is uncertain, or you need a repeatable way to save returned images.

Core Features & Use Cases

  • Environment validation: Checks that LLM_API_KEY and LLM_BASE_URL are configured before making requests.
  • Model selection: Helps choose an image-capable model such as gpt-image-2, gpt-image-1, or dall-e-3.
  • Image generation and saving: Sends /images/generations requests and stores returned images from either base64 or URL responses.
  • Error handling and timing guidance: Accounts for long generation times and common HTTP failures during image creation.
  • Use case: Ask it to create a figure, icon, mockup, or concept image and save the result directly to a local file for later use.

Quick Start

Generate a single image from this prompt using the configured LLM image gateway and save it to a local PNG file.

Frequently Asked Questions about llm-image-generation

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

FAQPage Schema
How do I generate images through an OpenAI-compatible LLM gateway?▼

To generate images through an OpenAI-compatible LLM gateway, configure your LLM_API_KEY and LLM_BASE_URL, select an image-capable model like dall-e-3, and send a prompt to the /images/generations endpoint to receive and save image files locally.

What environment variables do I need for prompt-driven image creation with an LLM gateway?▼

For prompt-driven image creation, you need LLM_API_KEY and LLM_BASE_URL configured in your environment. The Skill validates these variables before making image generation requests to ensure reliable API connectivity.

How do I handle long timeout issues when generating images with gpt-image-2 or dall-e-3?▼

To handle long timeout issues during image generation, the Skill includes built-in timing guidance and error handling for common HTTP failures, accommodating the slow response times typical of models like gpt-image-2 and dall-e-3.

How do I save base64 or URL image responses from an LLM gateway to a local file?▼

You can save base64 or URL image responses by sending a prompt to the configured LLM gateway, which processes the returned image data and stores it directly as a local PNG file for later use.

Can I use this approach to create mockups and concept images through my existing LLM API key?▼

Yes, you can use your existing LLM API key to create mockups, concept images, icons, and figures by sending prompt-driven requests to an OpenAI-compatible gateway and saving the generated results locally.

Why do my image generation requests fail when using an OpenAI-compatible LLM gateway?▼

Image generation requests often fail due to missing LLM_API_KEY or LLM_BASE_URL configurations, selecting a non-image-capable model, or encountering HTTP timeouts. The Skill validates environments and supports long generation times to prevent these issues.