Image GenerationDALL-E
DALL-E 3
OpenAI's latest image generation model with improved detail, text rendering, and prompt adherence.
POST /v2/images/generate — model: "dall-e-3"
OpenAI's DALL-E 3 creates realistic images and art from natural language descriptions with significantly improved prompt adherence, detail accuracy, and text rendering compared to earlier versions.
See Image Generation overview for common request fields, response format, and error codes.
Model-specific parameters
| Parameter | Type | Description |
|---|---|---|
dalleParams.aspect_ratio | string | Aspect ratio. Values: "1:1" (default), "3:2", "2:3" |
dalleParams.style | string | Image style. Values: "vivid" (default), "natural" |
Credit cost
| Credits per generation |
|---|
| 12 |
Code examples
curl -X POST https://api.apiframe.ai/v2/images/generate \
-H "X-API-Key: afk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A photorealistic image of an astronaut riding a horse on Mars, with Earth visible in the sky",
"model": "dall-e-3",
"dalleParams": {
"aspect_ratio": "3:2",
"style": "vivid"
}
}'import requests
response = requests.post(
"https://api.apiframe.ai/v2/images/generate",
headers={
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
json={
"prompt": "A photorealistic image of an astronaut riding a horse on Mars, with Earth visible in the sky",
"model": "dall-e-3",
"dalleParams": {
"aspect_ratio": "3:2",
"style": "vivid",
},
},
)
print(response.json())const response = await fetch("https://api.apiframe.ai/v2/images/generate", {
method: "POST",
headers: {
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
prompt: "A photorealistic image of an astronaut riding a horse on Mars, with Earth visible in the sky",
model: "dall-e-3",
dalleParams: { aspect_ratio: "3:2", style: "vivid" },
}),
});
console.log(await response.json());Try it
POST
/v2/images/generateTry it