Image GenerationDALL-E
DALL-E 2
OpenAI's classic image generation model for creating realistic images from text descriptions.
POST /v2/images/generate — model: "dall-e-2"
OpenAI's classic DALL-E 2 creates realistic images and art from natural language descriptions. Based on CLIP latents, it offers 4x greater resolution than the original DALL-E.
See Image Generation overview for common request fields, response format, and error codes.
Model-specific parameters
DALL-E 2 has no model-specific parameters — only the common prompt field is required.
Credit cost
| Credits per generation |
|---|
| 2 |
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": "An oil painting of a seascape at sunset with dramatic clouds",
"model": "dall-e-2"
}'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": "An oil painting of a seascape at sunset with dramatic clouds",
"model": "dall-e-2",
},
)
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: "An oil painting of a seascape at sunset with dramatic clouds",
model: "dall-e-2",
}),
});
console.log(await response.json());Try it
POST
/v2/images/generateTry it