Generate images from text prompts using DALL-E 3 and GPT Image 1. OpenAI-compatible endpoint.
POST https://api.agilecloud.ai/v1/images/generations
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | No | dall-e-3 or gpt-image-1. Default: dall-e-3 |
| prompt | string | Yes | Text description of the image to generate |
| n | integer | No | Number of images (1–10). Default: 1 |
| size | string | No | 256x256, 512x512, 1024x1024, 1792x1024, 1024x1792. Default: 1024x1024 |
| quality | string | No | standard or hd. Default: standard |
| style | string | No | vivid or natural. Default: vivid |
| response_format | string | No | url or b64_json. Default: url |
curl https://api.agilecloud.ai/v1/images/generations \
-H "Authorization: Bearer $DIRECTAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "dall-e-3",
"prompt": "A futuristic cityscape at sunset with flying cars",
"size": "1024x1024",
"quality": "hd"
}'Response
{
"created": 1719000000,
"data": [
{
"url": "https://...",
"revised_prompt": "A futuristic cityscape at sunset..."
}
]
}from openai import OpenAI
client = OpenAI(
base_url="https://api.agilecloud.ai/v1",
api_key="YOUR_API_KEY",
)
response = client.images.generate(
model="dall-e-3",
prompt="A futuristic cityscape at sunset with flying cars",
size="1024x1024",
quality="hd",
n=1,
)
print(response.data[0].url)| Model | Description | Tiers |
|---|---|---|
| dall-e-3 | High-quality image generation with prompt revision | Pro+ |
| gpt-image-1 | Latest GPT-native image generation | Pro+ |
revised_prompt in the response.b64_json format.