Skip to main content

imagegen

Generate or edit images via BlockRun's image API. Trigger when the user asks to generate, create, draw, make an image — or to edit, modify, change, or retouch an existing image.

소스 정보

저장소
BlockRunAI/XClawRouter
최근 소스 활동
2026년 5월 8일 10:20
감지된 SKILL.md 언어
영어
스타
1
포크
1

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
imagegen
description
Generate or edit images via BlockRun's image API. Trigger when the user asks to generate, create, draw, make an image — or to edit, modify, change, or retouch an existing image.
triggers
["okx image","okx image generation","xclawrouter image","generate image via okx","okx ai art","okx dall-e","okx flux","okx nano banana","okx cogview","okx grok imagine","edit image via okx","inpainting via okx","okx onchainos image","okx agentic wallet image"]
metadata
{"openclaw":{"emoji":"🖼️","requires":{"config":"[Truncated]"}}}
# Image Generation & Editing Generate or edit images through XClawRouter. Payment is automatic via x402. **Shortcuts:** - Slash: `/imagegen <prompt> [--model=<alias>] [--size=1024x1024] [--n=1]` - Partner tool: `blockrun_image_generation` (LLM-callable) / `blockrun_image_edit` (inpainting) --- ## Generate an Image POST to `http://localhost:8402/v1/images/generations`: ```json { "model": "google/nano-banana", "prompt": "a golden retriever surfing on a wave", "size": "1024x1024", "n": 1 } ``` Response: ```json { "created": 1741460000, "data": [{ "url": "http://localhost:8402/images/abc123.png" }] } ``` Display inline: `![generated image](http://localhost:8402/images/abc123.png)` ### Model Selection | Alias | Full ID | Price | Sizes | Best for | | ------------------ | ---------------------------- | ------------ | ------------------------------- | ----------------------------------- | | `nano-banana` | `google/nano-banana` | $0.05 | 1024×1024, 1216×832, 1024×1792 | Default — fast, cheap, good quality | | `banana-pro` | `google/nano-banana-pro` | $0.10–$0.15 | up to 4096×4096 | High-res, large format | | `dalle` | `openai/dall-e-3` | $0.04–$0.08 | 1024×1024, 1792×1024, 1024×1792 | Photorealistic, complex scenes | | `gpt-image` | `openai/gpt-image-1` | $0.02–$0.04 | 1024×1024, 1536×1024, 1024×1536 | Budget option; supports editing | | `flux` | `black-forest/flux-1.1-pro` | $0.04 | 1024×1024, 1216×832, 832×1216 | Artistic styles, fewer restrictions | | `grok-imagine` | `xai/grok-imagine-image` | $0.02 | 1024×1024 | xAI Grok image style | | `grok-imagine-pro` | `xai/grok-imagine-image-pro` | $0.07 | 1024×1024 | Grok high-quality | | `cogview` | `zai/cogview-4` | $0.015–$0.02 | 512×512 to 1440×1440 | Cheapest — Zhipu CogView | **Choosing a model:** - Default → `nano-banana` - "high res" / "large" → `banana-pro` - "photorealistic" / "dall-e" → `dalle` - "budget" / "cheap" → `cogview` - "editable" / "inpainting" → `gpt-image` (only edit-capable model) - "artistic" / flexible content → `flux` - "grok style" → `grok-imagine` or `grok-imagine-pro` **Choosing a size:** - Default: `1024x1024` - Portrait: `1024x1792` - Landscape: `1792x1024` (dall-e-3) or `1216x832` (nano-banana / flux) - High-res: `2048x2048` or `4096x4096` with `banana-pro` only --- ## Edit an Existing Image POST to `http://localhost:8402/v1/images/image2image`: ```json { "model": "openai/gpt-image-1", "prompt": "make the background a snowy mountain landscape", "image": "https://example.com/photo.jpg", "size": "1024x1024", "n": 1 } ``` XClawRouter automatically downloads URLs and reads local file paths — pass them directly, no manual base64 conversion needed. Optional `mask` field: a second image (URL or path) that marks which areas to edit (white = edit, black = keep). Response is identical to generation: ```json { "created": 1741460000, "data": [{ "url": "http://localhost:8402/images/xyz456.png", "revised_prompt": "..." }] } ``` **Supported models for editing:** `openai/gpt-image-1` only ($0.02) --- ## Example Interactions **User:** Draw me a cyberpunk city at night → POST to `/v1/images/generations`, model `nano-banana`, prompt as given. **User:** Generate a high-res portrait of a samurai → POST to `/v1/images/generations`, model `banana-pro`, size `1024x1792`. **User:** Edit this photo to add a sunset background: https://example.com/portrait.jpg → POST to `/v1/images/image2image`, model `gpt-image`, image = the URL, prompt = "add a warm sunset background". **User:** Change the background in my image to a beach (attaches local file) → POST to `/v1/images/image2image`, image = the local file path, prompt describes the change. --- ## Notes - Payment is automatic via x402 — deducted from the user's BlockRun wallet - If the call fails with a payment error, tell the user to fund their wallet at [blockrun.ai](https://blockrun.ai) - Google models may return base64 internally — XClawRouter uploads automatically and returns a hosted URL - DALL-E 3 enforces OpenAI content policy; use `flux` or `nano-banana` for more flexibility - Image editing is only available with `gpt-image-1`; generation supports all 5 models
GitHub에서 보기