Loading...
Loading...
通过inference.sh CLI使用OpenAI GPT-Image-2生成和编辑图片。模型:GPT-Image-2。功能:文本生成图片、图片编辑、图像修复、基于蒙版的编辑、多图片参考、批量生成。适用场景:产品原型、营销视觉素材、图片编辑、概念艺术、图像修复、照片处理。触发词:gpt image, gpt-image-2, openai image, chatgpt image, dall-e, dalle, openai image generation, gpt image edit, gpt inpainting, openai dall-e, gpt 4o image
npx skill4agent add infsh-skills/skills gpt-image需要inference.sh CLI()。安装说明belt
belt login
belt app run openai/gpt-image-2 --input '{"prompt": "a cat astronaut floating in space"}'| 特性 | 描述 |
|---|---|
| 文本生成图片 | 通过文本提示生成图片 |
| 图片编辑 | 使用参考图编辑图片 |
| 图像修复 | 对特定区域进行基于蒙版的编辑 |
| 批量生成 | 一次最多生成10张图片 |
| 多种格式 | 输出PNG、JPEG、WebP格式 |
| 灵活分辨率 | 支持32像素增量的任意尺寸(256–4096) |
belt app run openai/gpt-image-2 --input '{
"prompt": "professional product photo of sneakers on a white background, studio lighting",
"quality": "high"
}'belt app run openai/gpt-image-2 --input '{
"prompt": "minimalist logo design for a coffee shop",
"n": 4,
"quality": "medium"
}'belt app run openai/gpt-image-2 --input '{
"prompt": "change the background to a beach at sunset",
"images": ["https://your-image.jpg"]
}'belt app run openai/gpt-image-2 --input '{
"prompt": "combine these two characters into one scene",
"images": ["https://character1.jpg", "https://character2.jpg"]
}'belt app run openai/gpt-image-2 --input '{
"prompt": "replace with a red sports car",
"images": ["https://street-scene.jpg"],
"mask": "https://car-mask.png"
}'belt app run openai/gpt-image-2 --input '{
"prompt": "wide cinematic landscape, mountains at golden hour",
"width": 1920,
"height": 1080,
"quality": "high"
}'belt app run openai/gpt-image-2 --input '{
"prompt": "quick concept sketch of a robot",
"quality": "low"
}'| 画质 | 单张图片约价 |
|---|---|
| 低 | $0.006 |
| 中 | $0.024 |
| 高 | $0.21 |
belt app get openai/gpt-image-2| 参数 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| 字符串 | 必填 | 描述图片的文本提示 |
| 数组 | - | 用于编辑的参考图片 |
| 字符串 | - | 用于图像修复的蒙版图片 |
| 整数 | 1 | 生成图片数量(1–10) |
| 字符串 | - | low、medium或high |
| 整数 | - | 输出宽度(256–4096,32的倍数) |
| 整数 | - | 输出高度(256–4096,32的倍数) |
| 字符串 | png | png、jpeg或webp |
| 整数 | - | jpeg/webp的压缩级别(0–100) |
# 全平台技能(包含250+应用)
npx skills add inference-sh/skills@infsh-cli
# 所有图像生成模型
npx skills add inference-sh/skills@ai-image-generation
# FLUX模型
npx skills add inference-sh/skills@flux-image
# Pruna P-Image(快速且经济)
npx skills add inference-sh/skills@p-imagebelt app list --category image