gpt-image
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGPT-Image-2
GPT-Image-2
Generate and edit images with OpenAI's GPT-Image-2 via inference.sh CLI.
通过inference.sh CLI使用OpenAI的GPT-Image-2生成和编辑图片。
Quick Start
快速开始
Requires inference.sh CLI (). Install instructionsbelt
bash
belt login
belt app run openai/gpt-image-2 --input '{"prompt": "a cat astronaut floating in space"}'需要inference.sh CLI()。安装说明belt
bash
belt login
belt app run openai/gpt-image-2 --input '{"prompt": "a cat astronaut floating in space"}'Capabilities
功能特性
GPT-Image-2 supports text-to-image generation, image editing with reference images, and mask-based inpainting — all through a single model.
| Feature | Description |
|---|---|
| Text-to-Image | Generate images from text prompts |
| Image Editing | Edit images using reference images |
| Inpainting | Mask-based editing of specific regions |
| Batch Generation | Generate up to 10 images at once |
| Multiple Formats | PNG, JPEG, WebP output |
| Flexible Resolution | Any size in 32px increments (256–4096) |
GPT-Image-2支持文本生成图片、基于参考图的图片编辑以及基于蒙版的图像修复——所有功能都通过单一模型实现。
| 特性 | 描述 |
|---|---|
| 文本生成图片 | 通过文本提示生成图片 |
| 图片编辑 | 使用参考图编辑图片 |
| 图像修复 | 对特定区域进行基于蒙版的编辑 |
| 批量生成 | 一次最多生成10张图片 |
| 多种格式 | 输出PNG、JPEG、WebP格式 |
| 灵活分辨率 | 支持32像素增量的任意尺寸(256–4096) |
Examples
示例
Text-to-Image
文本生成图片
bash
belt app run openai/gpt-image-2 --input '{
"prompt": "professional product photo of sneakers on a white background, studio lighting",
"quality": "high"
}'bash
belt app run openai/gpt-image-2 --input '{
"prompt": "professional product photo of sneakers on a white background, studio lighting",
"quality": "high"
}'Multiple Images
生成多张图片
bash
belt app run openai/gpt-image-2 --input '{
"prompt": "minimalist logo design for a coffee shop",
"n": 4,
"quality": "medium"
}'bash
belt app run openai/gpt-image-2 --input '{
"prompt": "minimalist logo design for a coffee shop",
"n": 4,
"quality": "medium"
}'Image Editing with Reference
基于参考图的图片编辑
bash
belt app run openai/gpt-image-2 --input '{
"prompt": "change the background to a beach at sunset",
"images": ["https://your-image.jpg"]
}'bash
belt app run openai/gpt-image-2 --input '{
"prompt": "change the background to a beach at sunset",
"images": ["https://your-image.jpg"]
}'Multi-Image Reference
多参考图编辑
bash
belt app run openai/gpt-image-2 --input '{
"prompt": "combine these two characters into one scene",
"images": ["https://character1.jpg", "https://character2.jpg"]
}'bash
belt app run openai/gpt-image-2 --input '{
"prompt": "combine these two characters into one scene",
"images": ["https://character1.jpg", "https://character2.jpg"]
}'Inpainting with Mask
基于蒙版的图像修复
bash
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"
}'bash
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"
}'Custom Resolution
自定义分辨率
bash
belt app run openai/gpt-image-2 --input '{
"prompt": "wide cinematic landscape, mountains at golden hour",
"width": 1920,
"height": 1080,
"quality": "high"
}'bash
belt app run openai/gpt-image-2 --input '{
"prompt": "wide cinematic landscape, mountains at golden hour",
"width": 1920,
"height": 1080,
"quality": "high"
}'Fast Drafts
快速草稿生成
bash
belt app run openai/gpt-image-2 --input '{
"prompt": "quick concept sketch of a robot",
"quality": "low"
}'bash
belt app run openai/gpt-image-2 --input '{
"prompt": "quick concept sketch of a robot",
"quality": "low"
}'Pricing
定价
| Quality | ~Price per Image |
|---|---|
| Low | $0.006 |
| Medium | $0.024 |
| High | $0.21 |
Larger resolutions cost more. See for full pricing details.
belt app get openai/gpt-image-2| 画质 | 单张图片约价 |
|---|---|
| 低 | $0.006 |
| 中 | $0.024 |
| 高 | $0.21 |
分辨率越高,价格越贵。查看完整定价详情请执行。
belt app get openai/gpt-image-2Parameters
参数
| Parameter | Type | Default | Description |
|---|---|---|---|
| string | required | Text prompt describing the image |
| array | - | Reference image(s) for editing |
| string | - | Mask image for inpainting |
| integer | 1 | Number of images (1–10) |
| string | - | low, medium, or high |
| integer | - | Output width (256–4096, multiples of 32) |
| integer | - | Output height (256–4096, multiples of 32) |
| string | png | png, jpeg, or webp |
| integer | - | Compression level for jpeg/webp (0–100) |
| 参数 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| 字符串 | 必填 | 描述图片的文本提示 |
| 数组 | - | 用于编辑的参考图片 |
| 字符串 | - | 用于图像修复的蒙版图片 |
| 整数 | 1 | 生成图片数量(1–10) |
| 字符串 | - | low、medium或high |
| 整数 | - | 输出宽度(256–4096,32的倍数) |
| 整数 | - | 输出高度(256–4096,32的倍数) |
| 字符串 | png | png、jpeg或webp |
| 整数 | - | jpeg/webp的压缩级别(0–100) |
Related Skills
相关技能
bash
undefinedbash
undefinedFull platform skill (all 250+ apps)
全平台技能(包含250+应用)
npx skills add inference-sh/skills@infsh-cli
npx skills add inference-sh/skills@infsh-cli
All image generation models
所有图像生成模型
npx skills add inference-sh/skills@ai-image-generation
npx skills add inference-sh/skills@ai-image-generation
FLUX models
FLUX模型
npx skills add inference-sh/skills@flux-image
npx skills add inference-sh/skills@flux-image
Pruna P-Image (fast & economical)
Pruna P-Image(快速且经济)
npx skills add inference-sh/skills@p-image
Browse all image apps: `belt app list --category image`npx skills add inference-sh/skills@p-image
浏览所有图像应用:`belt app list --category image`Documentation
文档
- Running Apps - How to run apps via CLI
- Streaming Results - Real-time progress updates