curl https://api.portkey.ai/v1/images/generations \
-H "Content-Type: application/json" \
-H "x-portkey-api-key: $PORTKEY_API_KEY" \
-H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \
-d '{
"model": "dall-e-3",
"prompt": "A cute baby sea otter",
"n": 1,
"size": "1024x1024"
}'{
"created": 123,
"data": [
{
"b64_json": "<string>",
"url": "<string>",
"revised_prompt": "<string>"
}
]
}Create Image
POST
/
images
/
generations
curl https://api.portkey.ai/v1/images/generations \
-H "Content-Type: application/json" \
-H "x-portkey-api-key: $PORTKEY_API_KEY" \
-H "x-portkey-virtual-key: $PORTKEY_PROVIDER_VIRTUAL_KEY" \
-d '{
"model": "dall-e-3",
"prompt": "A cute baby sea otter",
"n": 1,
"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
application/json
The style of the generated images. Must be one of vivid or natural. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. This param is only supported for dall-e-3.
Available options:
vivid, natural Example:
"vivid"
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?

