- Add skills: bugbot-review, ffmpeg, media-creation, video-editing - Add mcp/servers.json with example remote MCP config - Add opencode/oh-my-opencode.json with example agent config - Update README to document new directories - Make workspace templates generic (remove personal email)
2.1 KiB
2.1 KiB
OpenAI GPT Image API (Latest)
Sources: OpenAI API reference for Images and GPT Image 1.5 (Jan 1, 2026). Credentials redacted.
Latest Model
gpt-image-1.5is the current GPT Image model and is supported by the Images API for generations.
Which API to Use
- Images API supports GPT Image models (
gpt-image-1.5,gpt-image-1,gpt-image-1-mini) for Generations. - Images API Edits only supports
gpt-image-1anddall-e-2(notgpt-image-1.5).
Auth and Base URL
- Base URL:
https://api.openai.com/v1 - Header:
Authorization: Bearer ${OPENAI_API_KEY}(placeholder; replaced at deploy time)
Image API: Generate
Endpoint:
POST https://api.openai.com/v1/images/generations
Request shape:
{
"model": "gpt-image-1.5",
"prompt": "<text prompt>",
"n": 1,
"size": "1024x1024",
"quality": "high",
"background": "transparent"
}
Output:
- GPT image models return base64 image data in
data[0].b64_json.
Notes:
sizefor GPT image models supports1024x1024,1536x1024,1024x1536, orauto.qualitysupportslow,medium,high, orautofor GPT image models.backgroundcan betransparent,opaque, orauto(transparent requirespngorwebp).output_formatsupportspng,jpeg,webpfor GPT image models; GPT image models always return base64 (not URLs).ncan be 1-10 for GPT image models.
Image API: Edit (Inpainting / Variants)
Endpoint:
POST https://api.openai.com/v1/images/edits
Typical multipart fields:
model=gpt-image-1image[]=@input.png(one or more images)mask=@mask.png(optional; defines the area to replace)prompt=...
Edits endpoint accepts image inputs and optional masks; response returns base64 output.
Notes:
- For GPT image models, each input image must be
png,webp, orjpgand under 50MB; up to 16 images.
Responses API (Image Generation Tool)
- Use a mainline model that supports the
image_generationtool, and it will call a GPT Image model under the hood.
Security
- Do not store API keys in repo.
- Use environment variables or local config files ignored by Git.