Azure-image-gen azure-image-gen

Generate a single image via Azure OpenAI Images REST API and return it inline in OpenClaw.

install
source · Clone the upstream repo
git clone https://github.com/neojarvis0704/azure-image-gen
OpenClaw · Install into ~/.openclaw/skills/
git clone --depth=1 https://github.com/neojarvis0704/azure-image-gen ~/.openclaw/skills/neojarvis0704-azure-image-gen-azure-image-gen
manifest: skill.md
safety · automated scan (low risk)
This is a pattern-based risk scan, not a security review. Our crawler flagged:
  • references .env files
Always read a skill's source content before installing. Patterns alone don't mean the skill is malicious — but they warrant attention.
source content

Azure Image Generation (OpenClaw)

This skill generates a single image using Azure OpenAI Images API and returns it for inline display in OpenClaw-supported channels.

How it works

  • OpenClaw executes the script:
    python3 scripts/gen.py "<prompt>"
    
  • The script:
    • Calls Azure OpenAI Images REST API
    • Saves the image using a timestamp-based filename
    • Prints a JSON object containing the absolute file path

Script location

skills/azure-image-gen/scripts/gen.py

Required environment variables

These are loaded from

/home/thomas/.env.azure
by the script:

  • AZURE_OPENAI_ENDPOINT
  • AZURE_OPENAI_API_KEY
  • AZURE_OPENAI_IMAGE_DEPLOYMENT
  • AZURE_OPENAI_API_VERSION

Example:

AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com
AZURE_OPENAI_API_KEY=****
AZURE_OPENAI_IMAGE_DEPLOYMENT=gpt-image-1.5
AZURE_OPENAI_API_VERSION=2025-04-01-preview

Output contract (important)

The script prints exactly one JSON object to stdout:

{
  "ok": true,
  "path": "/home/thomas/.openclaw/workspace/skills/azure-image-gen/out/20260206_101753.png",
  "prompt": "a cyberpunk cat in Hong Kong at night"
}

OpenClaw should treat

path
as a media attachment and send it inline.

Notes

  • No batch generation
  • No gallery / index.html
  • No OpenAI public API usage
  • Azure-only, REST-only