Images API
Generate images using AI models.
Endpoint
POST https://api.ofox.ai/v1/images/generationsRequest Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | ✅ | Image generation model |
prompt | string | ✅ | Image description text |
n | number | — | Number of images, default 1 |
size | string | — | Image size, e.g. 1024x1024 |
quality | string | — | Image quality: standard or hd |
response_format | string | — | Return format: url or b64_json |
Request Examples
cURL
Terminal
curl https://api.ofox.ai/v1/images/generations \
-H "Authorization: Bearer $OFOX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/dall-e-3",
"prompt": "A cute fox wearing sunglasses and surfing",
"n": 1,
"size": "1024x1024"
}'Response Format
{
"created": 1703123456,
"data": [
{
"url": "https://...",
"revised_prompt": "..."
}
]
}For supported image generation models and pricing, check the Model Catalog .
Last updated on