Image Generation

Generate images from text prompts using state-of-the-art image models.

Endpoint

POST/v1/images/generations

Request body

modelstringrequired
ID of the image model. See supported models below.
promptstringrequired
Text description of the desired image.
ninteger
Number of images to generate. Default: 1
sizestring
Image size. Depends on the model. Common: 1024x1024, 1792x1024
qualitystring
Image quality: standard or hd. Model-dependent.
stylestring
Image style. Model-dependent.
response_formatstring
url or b64_json. Default: url

Example request

curl https://api.aetherapi.dev/v1/images/generations \
  -H "Authorization: Bearer sk-aetherapi-..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2",
    "prompt": "A futuristic cityscape at sunset with flying cars",
    "n": 1,
    "size": "1024x1024"
  }'

Example response

{
  "created": 1677652288,
  "data": [
    {
      "url": "https://cdn.aetherapi.dev/images/abc123.png",
      "revised_prompt": "A futuristic cityscape at sunset with flying cars..."
    }
  ]
}

Supported image models

The list changes as providers ship new models. For the current set, call GET /v1/models and keep the models whose supported_endpoints include /v1/images/generations, or browse the model catalogue.