OpenAI Image API
This platform provides endpoints compatible with the OpenAI Image API for the current image model gpt-image-2.
As of 2026-04-28, the official OpenAI model page lists gpt-image-2 as the default state-of-the-art image generation model. On ReachAPI, the request and response schema stays aligned with the native OpenAI interface. The main integration difference is replacing the base domain.
Need task polling, callback delivery, or final image URLs in data[].url? Use the GPT Image 2 Async Image API with model: "gpt-image-2-async".
Endpoint Mapping
| Capability | OpenAI native | ReachAPI |
|---|---|---|
| Image generation | https://api.openai.com/v1/images/generations | https://direct.reachapi.ai/v1/images/generations |
| Image editing | https://api.openai.com/v1/images/edits | https://direct.reachapi.ai/v1/images/edits |
Authentication
Use your ReachAPI key:
Authorization: Bearer YOUR_REACH_API_KEYFor image generation requests, also send:
Content-Type: application/jsonImage edits follow the native OpenAI multipart/form-data contract. Use curl -F, SDK upload helpers, or FormData; do not hardcode the multipart boundary yourself.
Compatibility Notes
- Recommended model:
gpt-image-2 - Request fields and response objects follow the official OpenAI Image API documentation
POST /v1/images/editsuses the native OpenAI image edit request shape withmultipart/form-data- Edit request fields keep the official names such as
image,mask,prompt, andmodel - The official
gpt-image-2model page currently lists image generation and image editing support, and notes that streaming is not supported
Minimal Examples
Generate an Image
curl -X POST "https://direct.reachapi.ai/v1/images/generations" \
-H "Authorization: Bearer YOUR_REACH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2",
"prompt": "A precise editorial product shot of a cobalt blue mechanical keyboard on a slate desk"
}'Edit an Image
curl -X POST "https://direct.reachapi.ai/v1/images/edits" \
-H "Authorization: Bearer YOUR_REACH_API_KEY" \
-F "model=gpt-image-2" \
-F "prompt=Replace the background with a clean studio backdrop and improve the lighting" \
-F "image=@/path/to/source.png"Official References
- Model page: GPT Image 2
- Guide: Image generation
- API reference: Create image
- API reference: Create image edit
For the complete parameter list such as background, moderation, output_format, output_compression, size, quality, mask, input_fidelity, and response fields, follow the official OpenAI documentation above. For image edits, use the native official multipart/form-data request shape.