curl --location --request POST 'https://api.openai.com/v1/images/edits' \
--header 'Authorization: Bearer ' \
--form 'image=@"cmMtdXBsb2FkLTE2ODc4MzMzNDc3NTEtMjA=/31225951_59371037e9_small.png"' \
--form 'prompt="A cute baby sea otter wearing a beret."' \
--form 'n="2"' \
--form 'size="1024x1024"' \
--form 'response_format="url"' \
--form 'user=""'
{
"created": 1589478378,
"data": [
{
"url": "https://..."
},
{
"url": "https://..."
}
]
}
image
ย should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions asย image
.256x256
,ย 512x512
, orย 1024x1024
.url
ย orย b64_json
.