ApiframeApiframe Docs
Image GenerationDALL-E

DALL-E 3

OpenAI's latest image generation model with improved detail, text rendering, and prompt adherence.

Use in Apiframe Studio

POST /v2/images/generatemodel: "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

ParameterTypeDescription
dalleParams.aspect_ratiostringAspect ratio. Values: "1:1" (default), "3:2", "2:3"
dalleParams.stylestringImage style. Values: "vivid" (default), "natural"

Credit cost

Credits per generation
21

Example result

Once the job is COMPLETED, the result object on GET /v2/jobs/:id looks like:

{
  "images": [
    "https://cdn2.apiframe.ai/images/a1b2c3d4-e5f6-7890-abcd-ef1234567890-1.png"
  ]
}

See Result format for field details.

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

On this page