API Reference
- Introduction
- Authentication
- Headers
- Errors
- Supported Providers
- SDKs
- API Details
Chat Completions
Portkey Endpoints
Embeddings
Other APIs
Completions
Moderations
Fine-tuning
Assistants
- Assistants
- Threads
- Messages
- Runs
- Run Steps
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>"
}
]
}
Body
application/json
Response
200 - application/json
OK
The response is of type object
.
Was this page helpful?
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>"
}
]
}