Skip to main content

gpt-image2

Generate images with GPT Image 2 through a local OpenAI-compatible Images API script, then deliver them through OpenClaw chat channels such as Telegram or QQBot. Use when the user asks to generate, draw, create, or send an image, poster, photo, illustration, wallpaper, avatar, icon, logo, 文生图, 生成图片, 画图, 海报, 照片, 发我图片, or similar visual output requests.

Informações da origem

Repositório
zouchenzhen/openclaw-gpt-image2-skill
Última atividade na origem
30 de abril de 2026 às 17:28
Idioma detectado do SKILL.md
inglês
Estrelas
1
Forks
0

Opções de instalação

Por padrão, está selecionado o prompt que primeiro revisa a origem. Você pode mudar para um comando direto ou baixar uma cópia local.

Revise os arquivos de origem

Leia o SKILL.md e os arquivos complementares exibidos pelo SkillsMP antes de decidir se vai instalar.

Exibindo SKILL.md

SKILL.md
Instruções da origem · Visualização somente leitura
name
gpt-image2
description
Generate images with GPT Image 2 through a local OpenAI-compatible Images API script, then deliver them through OpenClaw chat channels such as Telegram or QQBot. Use when the user asks to generate, draw, create, or send an image, poster, photo, illustration, wallpaper, avatar, icon, logo, 文生图, 生成图片, 画图, 海报, 照片, 发我图片, or similar visual output requests.
# GPT Image 2 ## Overview Use this skill to generate images from chat with `gpt-image-2` through a local PowerShell script: ```powershell scripts/generate_gpt_image2.ps1 ``` The script calls an OpenAI-compatible `/v1/images/generations` endpoint, saves a PNG locally, and optionally sends it through Telegram or emits a QQBot media payload. Do not use or mention nonexistent `image_gen`, `openai-image-gen`, or `nano-banana-pro` tools. Do not send `gpt-image-2` image requests to a chat/completions endpoint. ## Resolve Script Path If the current directory is not this skill folder, resolve the script path from OpenClaw: ```powershell $skillFile = (openclaw skills info gpt-image2 | Select-String 'Path:' | ForEach-Object { ($_ -split 'Path:\s*', 2)[1].Trim() } | Select-Object -First 1) $script = Join-Path (Split-Path -Parent $skillFile) 'scripts/generate_gpt_image2.ps1' ``` ## Channel Workflow Choose the delivery mode from the active channel or from the user's wording. For Telegram delivery, run: ```powershell pwsh -NoProfile -File $script -Prompt "<image prompt>" -SendTelegram -TelegramTarget "<telegram chat id>" -Caption "<short caption>" ``` If `-TelegramTarget` is omitted, the script reads `OPENCLAW_TELEGRAM_TARGET`. If neither exists, report the error instead of pretending the image was sent. For QQBot image replies, run: ```powershell pwsh -NoProfile -File $script -Prompt "<image prompt>" -EmitQQPayload -Caption "<short caption>" ``` Then make the final response exactly the `QQBOT_PAYLOAD:` block printed by the script, with no extra text before or after it. For local generation without sending, run: ```powershell pwsh -NoProfile -File $script -Prompt "<image prompt>" ``` Then return the saved file path. ## Provider Configuration By default the script reads `~/.openclaw/openclaw.json` and uses provider id `cpamc`, which can be changed with `-ProviderId` or `OPENCLAW_IMAGE_PROVIDER`. Use one of these patterns: ```powershell pwsh -NoProfile -File $script -Prompt "<prompt>" -ProviderId "cpamc" pwsh -NoProfile -File $script -Prompt "<prompt>" -ProviderId "openai" pwsh -NoProfile -File $script -Prompt "<prompt>" -BaseUrl "https://api.openai.com/v1" -ApiKeyEnv "OPENAI_API_KEY" ``` Never print API keys, bot tokens, or full private config contents. ## Prompting Expand short user requests into a concrete visual prompt before calling the script. Preserve required subjects, locations, text, style, aspect, and language from the user's request. Use `-Size 1024x1024` unless the user asks for another supported size. ## Failure Handling If the script reports a provider, network, timeout, configuration, or delivery error, include the actionable error. Do not produce an empty answer or a verbal promise without a successful script result.
Ver no GitHub