Skip to main content
POST
/
api
/
v3
/
openai
/
gpt-image-1.5-plus
/
image-edit
gpt-image-1.5-plus (Image Edit)
curl --request POST \
  --url https://api.example.com/api/v3/openai/gpt-image-1.5-plus/image-edit

API Key Authentication

GPTProto API uses Bearer token authentication. All API requests must include your API key (sk-xxxxx) in the Authorization header.

Getting Your API Key

  1. Sign up for a GPTProto account at https://gptproto.com
  2. Navigate to the API Keys section in your dashboard
  3. Generate a new API key
  4. Copy and securely store your API key For authentication details, please refer to the Authentication section.

Initiate Request

curl --location --request POST "https://gptproto.com/api/v3/openai/gpt-image-1.5-plus/image-edit" \
--header "Authorization: GPTPROTO_API_KEY" \
--header "Content-Type: application/json" \
--data-raw '{
    "image": [
        "https://tos.gptproto.com/resource/cat.png"
    ],
    "prompt": "Girl holding cat",
    "quality": "medium",
    "size": "1024x1024",
    "background": "auto",
    "enable_sync_mode": false,
    "response_format": "url"
}'

Response Example

{
    "data": {
        "id": "7ba2419*******",
        "model": "gpt-image-1.5-plus",
        "outputs": [],
        "urls": {
            "get": "https://gptproto.com/api/v3/predictions/7ba2419*******/result"
        },
        "hasNsfwContents": [],
        "status": "created",
        "createdAt": "2025-12-17 15:05:05",
        "executionTime": 0,
        "timings": {
            "inference": 0
        }
    },
    "message": "success",
    "code": 200
}

Query Result

If the request that generated your content includes the parameter enable_sync_mode set to true (some models do not support this parameter, but you still need to query the result by id), you must call the Query Result endpoint to retrieve the final output.

How to obtain the id

After submitting your prediction request, the response will contain the id you need.
You can find it in either:
  • data.id – the unique identifier of the prediction
  • data.urls[0].get – a ready-to-use GET URL that already embeds the id
Use this id (or the complete URL) to poll the endpoint shown above and retrieve the final result.
curl -X GET "https://gptproto.com/api/v3/predictions/{id}/result" \
  -H "Authorization: GPTPROTO_API_KEY" \
  -H "Content-Type: application/json"

Parameters

Core Parameters

ParameterTypeRequiredDefaultRangeDescription
modelstring✅ Yes--The model to use for image editing
promptstring✅ Yes--A text description of the desired image(s). The maximum length is 32000 characters.
imagestring or file❌ No--Each image should be a png, webp, or jpg file less than 50MB. You can provide up to 16 images.

Advanced Parameters

ParameterTypeRequiredDefaultRangeDescription
maskfile❌ No--An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where image should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as image.
ninteger❌ No11-10The number of images to generate. Must be between 1 and 10.
sizestring❌ No1024x1024256x256
512x512
1024x1024
1536x1024
1024x1536
The size of the generated images.
qualitystring❌ Nomediumhigh
medium
low
The quality of the generated images.
backgroundstring❌ Noautotransparent
opaque
auto
Allows to set transparency for the background of the generated image(s). When auto is used, the model will automatically determine the best background for the image.
enable_sync_modeboolean❌ Nofalsetrue
false
Whether to enable synchronous mode for image generation.
response_formatstring❌ Nourlurl
b64_json
The format in which the generated images are returned.

Error Codes

Common Error Codes

Error CodeError NameDescription
401UnauthorizedAPI key is missing or invalid
403ForbiddenYour API key doesn’t have permission to access this resource, or insufficient balance for the requested operation
429Too Many RequestsYou’ve exceeded your rate limit
500Internal server errorAn internal server error occurred
503Content policy violationContent blocked due to safety concerns (actual status code is 400)