curl https://api.portkey.ai/v1/images/edits \
-H "x-portkey-api-key: $PORTKEY_API_KEY" \
-H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \
-F image="@otter.png" \
-F mask="@mask.png" \
-F prompt="A cute baby sea otter wearing a beret" \
-F n=2 \
-F size="1024x1024"{
"created": 123,
"data": [
{
"b64_json": "<string>",
"url": "<string>",
"revised_prompt": "<string>"
}
]
}Create Image Edit
POST
/
images
/
edits
curl https://api.portkey.ai/v1/images/edits \
-H "x-portkey-api-key: $PORTKEY_API_KEY" \
-H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \
-F image="@otter.png" \
-F mask="@mask.png" \
-F prompt="A cute baby sea otter wearing a beret" \
-F n=2 \
-F size="1024x1024"{
"created": 123,
"data": [
{
"b64_json": "<string>",
"url": "<string>",
"revised_prompt": "<string>"
}
]
}Portkey is now PRISMA AIRS AI Gateway. See it in action.
Contact Us
Authorizations
Portkey-Key & Virtual-KeyPortkey-Key & Provider-Auth & Provider-NamePortkey-Key & ConfigPortkey-Key & Provider-Auth & Provider-Name & Custom-Host
Body
multipart/form-data
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.
Example:
"user-1234"
Last modified on August 6, 2026
Was this page helpful?

