Edit image
Authorization
Bearer
AuthorizationBearer <token>
In: header
Request Body
multipart/form-data
image*file
The image to edit, as a file or link.
Format
binarymask?file
An extra image whose fully transparent areas mark where to edit. Same size as the image.
Format
binaryprompt*string
Text description of the image you want.
n?string
Number of images, where the model supports it.
size?string
Size of the image, WIDTHxHEIGHT; mapped to the nearest size the model offers.
response_format?string
Format of the returned images: url or b64_json.
user?string
A unique id for your end user; helps detect abuse.
model?string
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://pinerouter.ai/v1/images/edits" \ -F image="cmMtdXBsb2FkLTE2ODc4MzMzNDc3NTEtMjA=/31225951_59371037e9_small.png" \ -F prompt="A cute baby sea otter wearing a beret."{}{
"error": {
"code": "",
"message": "Invalid token (request id: 20261102053704107200635868d9d6m7EOL5JK)",
"type": "api_error"
}
}{
"error": {
"code": "",
"message": "This token has no access to model gpt-5-2 (request id: 20261102053704107200635868d9d6m7EOL5JK)",
"type": "api_error"
}
}{
"error": {
"code": "",
"message": "You have reached the request limit: maximum 60 requests in 1 minutes (request id: 20261102053704107200635868d9d6m7EOL5JK)",
"type": "api_error"
}
}Empty
