Image generation API
Image Generation
Generate images using 190+ AI models from a single endpoint. All image models use POST /api/generate with different modelKey values.
Endpoint
POST /api/generateRequest body
| Parameter | Type | Required | Description |
|---|---|---|---|
modelKey | string | ✓ | Model identifier (see model families below) |
prompt | string | ✓ | Text description of the image to generate |
aspectRatio | string | Aspect ratio: "1:1", "16:9", "9:16", "4:3", "3:4" | |
inputUrl | string | URL of input image (for image-to-image / edit models) | |
styleRef | string | string[] | Style reference image URL(s) | |
charRef | string | string[] | Character reference image URL(s) | |
refImageUrls | string[] | General reference images | |
imageQuality | string | "Low", "Medium", "High" | |
quality | string | "HD", "1080p", "4K" | |
brandId | string | Brand DNA ID to bake brand guidelines into the prompt |
Response
{
"success": true,
"predictionId": "pred_abc123...",
"status": "processing",
"model": "openai/gpt-image-2/text-to-image",
"creditCost": 5,
"estimatedTime": "~15s"
}Quick example
curl -X POST https://api.oyefilmy.com/api/generate \
-H "Authorization: Bearer of_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"modelKey": "gpt",
"prompt": "A photorealistic portrait of a woman with golden hour lighting, shallow depth of field"
}'Model families
Choose a model family to see all available model keys and their capabilities:
GPT Image
OpenAI GPT Image 1/1.5/2 — text-to-image and image editing
gpt, gpt_2, gpt5, gpt_4o, ...
Seedream
ByteDance Seedream v4/v4.5/v5 — sequential and edit modes
seedream_5_pro_t2i, seedream_5_pro_edit, seedream_v5_lite, seedream_v4_5, ...
Flux
Black Forest Labs FLUX.1/2 — Pro, Flex, Klein, Kontext, LoRA
flux_max, flux_pro, flux_flex, flux_kont_max, ...
Imagen / Google
Google Imagen 3/4 and Gemini native image generation
imagen, imagen_2, imagen_4_fast, imagen_4, ...
Wan Image
Alibaba Wan 2.5/2.6/2.7 — text-to-image and image editing
wan_2_7_t2i, wan_2_7_edit, wan_2_7_pro_t2i, wan_2_6_t2i, ...
Qwen Image
Alibaba Qwen Image — text-to-image and edit modes
qwen_image_2_0_t2i, qwen_image_2_0_edit, qwen_image_t2i_max, qwen_image_t2i_plus
Grok Imagine
xAI Grok Imagine Image — quality and standard variants
grok_imagine_image_quality_t2i, grok_imagine_image_quality_edit, grok_imagine_image_t2i
Microsoft MAI
Microsoft MAI Image 2.5 — Flash and Standard variants
mai_2_5_flash_t2i, mai_2_5_edit, mai_2_5_t2i, mai_2_5_flash_edit
Nano Banana
Google Nano Banana — Lite, Standard, Pro with edit and reference modes
banana_pro_t2i_ultra, banana_pro_edit_ultra, banana_2_lite_t2i, banana_2_ref2img
Youchuan
Youchuan v8.1 — text-to-image, image-to-image, style transfer, background removal
youchuan_v8_1_t2i, youchuan_v8_1_i2i, youchuan_v8_1_style_transfer, youchuan_v8_1_remove_bg
Poll for results
GET /api/generate/status/:predictionId
# Success response:
{
"status": "completed",
"outputUrl": "https://oyefilmy-assets.s3.amazonaws.com/.../output.png",
"outputType": "image",
"completedAt": "2026-07-27T14:00:00.000Z"
}
