返回顶部
g

grok-imagine-image-proxAI图像生成

Generiert hochwertige Bilder mit xAI Grok/Flux API. Use when user asks for image generation ("mach a Bild von...", "generier PNG...", "Bild erstellen") or image editing ("ändere das Bild", "mach daraus..."). Handles Prompts, styles, aspect ratios, edits, batch generation. Outputs PNG via base64 or file.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.2
安全检测
已通过
1,066
下载量
免费
免费
3
收藏
概述
安装方式
版本历史

grok-imagine-image-pro

Grok Imagine Image Pro

API Key: $XAI_API_KEY (already configured)
Save dir: ~/.openclaw/media/ (resolves to /data/.openclaw/media/ — allowed for Telegram sending)

Available Models

  • - grok-imagine-image — standard quality, faster
  • INLINECODE4 — higher quality (default for generation)

1. Image Generation

CODEBLOCK0

Aspect Ratios

Add "aspect_ratio": "<ratio>" to the JSON body. Supported values:

RatioUse case
INLINECODE6Social media, thumbnails
INLINECODE7 / INLINECODE8
Widescreen, mobile stories |
| 4:3 / 3:4 | Presentations, portraits |
| 3:2 / 2:3 | Photography |
| 2:1 / 1:2 | Banners, headers |
| auto | Model picks best ratio (default) |

Batch Generation

Set "n": <count> (1-10) to generate multiple images in one request.

2. Image Editing / Style Transfer

Edit an existing image by providing a source image plus an edit prompt.
Uses the same /v1/images/generations endpoint with an added image_url field.

Do NOT use /v1/images/edits with multipart — xAI requires JSON.

IMPORTANT: For local files, use Python to build the payload JSON file, then curl with @file.
Inline base64 in curl args causes "Argument list too long" for images >~100KB.

NOTE: This is NOT true image editing — the API generates a new image inspired by the source.
It cannot make pixel-precise edits (e.g. changing only a car's color while keeping everything else identical).

Edit from local file (recommended approach):

CODEBLOCK1

Edit from URL:

CODEBLOCK2

Style Transfer Examples

Use editing with a style prompt, e.g.:

  • - "Render this as an oil painting in impressionist style"
  • "Make this a pencil sketch with detailed shading"
  • "Convert to pop art with bold colors"
  • "Watercolor painting with soft edges"

3. Sending to Telegram

CODEBLOCK3

  • - Always include message field (required even for media-only sends)
  • Allowed media paths: /tmp/, ~/.openclaw/media/, INLINECODE24

Notes

  • - Do NOT pass size parameter — returns 400
  • Aspect ratio: pass aspect_ratio in JSON body (not size)
  • Editing: use image_url field in the generations endpoint (NOT the edits endpoint with multipart)
  • Always use "response_format": "b64_json" — URL format returns temporary URLs that often 403
  • For large images: build payload with Python → save to /tmp/ → curl with @file syntax
  • Max 10 images per request
  • Images are subject to content moderation
  • Editing is style-transfer/reimagination, NOT pixel-precise inpainting

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 grok-imagine-image-pro-1776420050 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 grok-imagine-image-pro-1776420050 技能

通过命令行安装

skillhub install grok-imagine-image-pro-1776420050

下载

⬇ 下载 grok-imagine-image-pro v1.0.2(免费)

文件大小: 2.87 KB | 发布时间: 2026-4-17 19:14

v1.0.2 最新 2026-4-17 19:14
Fix: TIMESTAMP bug in Python f-strings. Fix: consistent paths with expanduser. Added editing limitation note.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部