mcpField
G
gpt-image-2

gpt-image-2

github.com/acedatacloudCreative & media17211 installsUpdated today
Repository

About gpt-image-2

An image generation and editing skill that accesses OpenAI gpt-image-2 through AceDataCloud. For creators making visual assets, it supports text-based generation as well as edits using real images, and returns image URLs synchronously.

Key features

  1. 01Generate images from prompts
  2. 02Edit using one or more images
  3. 03Composite logos or QR codes faithfully
  4. 04Support multiple sizes and aspect ratios
  5. 05Return image URLs synchronously

Use cases

  1. 01Place a brand logo into a generated scene
  2. 02Restyle a screenshot or combine product images
  3. 03Create consistent visuals for video segments

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/acedatacloud/skills --skill gpt-image-2

After installing, type/gpt-image-2in Claude Code to confirm it loaded.

Details

From the project README

gpt-image-2 — Image Generation & Editing

OpenAI gpt-image-2 through AceDataCloud. Two endpoints, both synchronous (return image url(s) directly). Its standout is editing: feed real images (logos, QR codes, product shots, screenshots) and it composites/restyles them faithfully — great for on-brand video assets and character consistency.

Setup: See authentication for token setup.

1. Generate (text → image)

curl -X POST https://api.acedata.cloud/openai/images/generations \
  -H "Authorization: Bearer $ACEDATACLOUD_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-image-2","prompt":"a clean dark tech hero background with a glowing API hub, lots of negative space","size":"1792x1024","n":1}'

2. Edit / composite (images + prompt → image) ← the powerful one

Multipart. Pass one or more source images via repeated image[] (local files with @, or URLs). Use it to fuse a real logo/QR into a generated scene, keep a subject consistent across scenes, or restyle a screenshot.

curl -X POST https://api.acedata.cloud/openai/images/edits \
  -H "Authorization: Bearer $ACEDATACLOUD_API_TOKEN" \
  -F "model=gpt-image-2" \
  -F "prompt=Place this logo crisply in the top-left on the tech background; keep the logo's exact colors and shape." \
  -F "image[][email protected]" \
  -F "image[][email protected]" \
  -F "size=1792x1024" \
  -F "n=1"

Response (both endpoints): {"data":[{"url":"https://...png"}]} → download data[0].url.

Sizes

size is WxH (a preset) or "auto". Common presets:

AspectSizes
16:91792x1024 (HD), 2048x1152, 3840x2160 (4K)
9:161024x1792, 1152x2048, 2160x3840
1:11024x1024, 2048x2048, 2880x2880 (4K)

(Omit size or use "auto" to let the model pick. Custom sizes must have both sides a multiple of 16, each side ≤ 3840, total pixels between 655,360 and 8,294,400, and an aspect ratio ≤ 3:1 — otherwise 400.)

Tips

  • Editing keeps things faithful — to place a logo/QR exactly, pass it as one of the image[] and say "keep its exact colors/shape, do not redraw it".
  • For character/scene consistency across video beats, generate one hero image, then edits it per beat instead of regenerating from scratch.
  • Text in images renders legibly — good for titles/labels you don't want to overlay in HTML.
  • n accepts 1–10 and you are billed per image returned, not per request — n: 4 costs 4×. (response_format: "b64_json" still requires n: 1.)
  • Both endpoints are synchronous by default. For long 4K jobs pass callback_url (optionally with async: true) and poll POST /openai/tasks with {"id": "<task_id>"}.

Comments

Markdown supported