Image Edits

Edit or partially modify an existing image from a prompt, compatible with the OpenAI Images Edits API.

Basics

MethodPOST Endpointhttps://koprouter.kopglobal.com/v1/images/edits AuthenticationAuthorization: Bearer sk-...

Request Parameters

Parameter Type Required Description
model string Yes Image editing model ID
image file Yes Source image to edit
prompt string Yes Text describing the edit
mask file No Mask image limiting the edit region
size string No Output size

Example Request

curl https://koprouter.kopglobal.com/v1/images/edits \
  -H "Authorization: Bearer sk-..." \
  -F "model=MODEL_ID" \
  -F "image=@input.png" \
  -F "prompt=Make the sky orange"

Example Response

{
  "created": 1720000000,
  "data": [
    {
      "url": "https://example.com/edited.png"
    }
  ]
}
This endpoint uploads images via `multipart/form-data` — do not set `Content-Type: application/json`.