API reference
Images: direct
No model serves this yet
/v1/images/generationsSynchronous image generation for models that serve this route, in one OpenAI-shaped body. The response carries final image URLs.
#Request parameters
modelstringrequiredAn image model that serves this synchronous route. Task-only models reject it — use /v1/images/tasks.
promptstringrequiredWhat to draw.
nintegeroptionalNumber of images (billing multiplies per image).
sizestringoptionalAspect-ratio preset such as "16:9" — what most image models take; the model card lists the exact values. Some older models also accept WIDTHxHEIGHT.
resolutionstringoptionalOutput resolution tier such as "1K", "2K" or "4K", where the model card lists it — also a pricing-tier dimension.
qualitystringoptionalVendor quality level (e.g. standard / hd) — also a pricing-tier dimension.
response_formatstringoptional"url" (default) or "b64_json" for inline bytes.
Tiered pricing
#Related errors
- 422 unprocessable_entityThe vendor rejected parameter values the gateway forwarded (e.g. unsupported size or duration).
- 401Invalid or missing bearer token. No error.code on this path — match the status.
- 402 insufficient_user_quotaWallet balance cannot cover the pre-reserved estimate.
- 429Per-key throttle. Empty body; wait for Retry-After. A 429 that does carry insufficient_user_quota is a daily spend cap instead.
- 503 model_not_foundUnknown model, or no healthy channel serves it right now.
#Request example
curl https://www.aisplice.store/v1/images/generations \
-H "Authorization: Bearer sk-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "YOUR_SYNC_IMAGE_MODEL",
"prompt": "A cyberpunk skyline at dusk, neon rain",
"size": "1:1"
}'#Response
{
"created": 1720000000,
"data": [{"url": "https://…"}]
}Still stuck?
Send us the request ID or the error message and we will look into it.