一键导入
polym-eval-generate-gpt-image
Generate or edit images with GPT Image via ByteDance AIDP. Use for gpt-image-1 text-to-image, multi-image edits, and masks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate or edit images with GPT Image via ByteDance AIDP. Use for gpt-image-1 text-to-image, multi-image edits, and masks.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Research BytePlus products, APIs, SDKs, setup, quotas, regions, pricing, and troubleshooting using the bundled official documentation index, then verify claims on live docs. Use for requests for BytePlus documentation or official links.
Batch-generate Seedance 2.0 Mini videos via the BytePlus console BFF (Mini has no public API). Covers T2V, image/video reference (I2V/R2V), first/last frame, and human portraits. Triggers: "seedance mini", "dreamina mini", "用 mini 出视频".
Generate textured 3D models (GLB + PBR) from an image and/or text prompt via Volcengine Ark Seed3D (doubao-seed3d). Submits the async task, polls to completion, and downloads the .glb. Domestic Volcengine Ark only, not BytePlus overseas.
Generate videos with BytePlus Seedance. Use for Seedance text-to-video, image-to-video, camera control, and draft video workflows.
Generate images with BytePlus Seedream 4.x/4.5. Use for Seedream text-to-image, AI art, product images, and batch image generation.
Creates polished explainer videos from docs, URLs, PDFs, screenshots, or text. Use for product demos, announcement reels, repo videos, and requests like "make an explainer video" or "turn this repo into a video".
| name | polym-eval-generate-gpt-image |
| description | Generate or edit images with GPT Image via ByteDance AIDP. Use for gpt-image-1 text-to-image, multi-image edits, and masks. |
Generate or edit images using gpt-image-1 via ByteDance AIDP.
| Mode | Description | Endpoint |
|---|---|---|
generate (default) | Text-to-image | /images/generations |
edit | Edit/composite reference images with a prompt | /images/edits |
Read the .env file and verify AIDP_API_KEY is set. If missing, ask the user for the key before proceeding.
# Text-to-image
python skills/polym-eval-generate-gpt-image/scripts/generate.py \
--prompt "A serene mountain landscape at sunset"
# Image editing
python skills/polym-eval-generate-gpt-image/scripts/generate.py \
--mode edit \
--prompt "给水獭穿上宇航员服装" \
--images photo.jpg
# Image editing with mask
python skills/polym-eval-generate-gpt-image/scripts/generate.py \
--mode edit \
--prompt "Replace background with a beach" \
--images photo.jpg --mask mask.png
# .env
AIDP_API_KEY=your_aidp_key
# Optional overrides
GPT_IMAGE_MODEL=gpt-image-1 # default model
| Model ID | Status | Notes |
|---|---|---|
gpt-image-1 | ✅ Available (~21s) | Default |
gpt-image-2 | ❌ Not yet available | Server error on AIDP |
| Flag | Default | Description |
|---|---|---|
--prompt / -p | required | Text prompt |
--mode | generate | generate or edit |
--model / -m | gpt-image-1 | Model ID |
--size / -s | 1024x1024 | 1024x1024, 1536x1024, 1024x1536, auto |
--quality / -q | low | low, medium, high, auto |
--images / -i | — | Reference image paths/URLs (edit mode, required) |
--mask | — | Mask image path (edit mode, optional) |
--output / -o | generated/{timestamp}.png | Output file path |
--n | 1 | Number of images to generate |
POST https://aidp.bytedance.net/api/modelhub/online/v2/crawl/openai/images/generations?ak={ak}
Headers: Content-Type: application/json, api-key: {ak}
{
"model": "gpt-image-1",
"prompt": "A cute cat",
"n": 1,
"size": "1024x1024",
"quality": "low"
}
POST https://aidp.bytedance.net/gpt/openapi/online/v2/crawl/openai/images/edits?ak={ak}
Headers: api-key: {ak} (multipart/form-data, no Content-Type header)
Form fields: image[] (one or more files), prompt, model, quality, size, n, mask (optional)
{
"created": 1745742988,
"data": [{"b64_json": "<base64 encoded image>"}],
"usage": {"total_tokens": 284, "input_tokens": 12, "output_tokens": 272}
}
from generate import generate_image, edit_image
# Generate
result = generate_image(
prompt="A beautiful sunset",
output_file="generated/sunset.png",
model="gpt-image-1",
size="1024x1024",
quality="low",
)
# Edit
result = edit_image(
prompt="给水獭穿上宇航员服装",
image_paths=["photo.jpg"],
output_file="generated/edited.png",
model="gpt-image-1",
quality="high",
mask_path=None,
)
# Returns: {"gen_success": bool, "gen_image_path": str, "gen_url": str}
Pillow
requests
python-dotenv
no model permission: gpt-image-1The AIDP AK does not have permission for this model. Apply on the ModelHub platform.
gpt-image-2 server errorgpt-image-2 is not yet available on AIDP. Use gpt-image-1.
Provide a more specific prompt. For targeted edits, use a --mask image to indicate the region to modify.