Images
POST /v1/images/generations — image generation from a prompt and references.
POST /v1/images/generations generates images in the OpenAI Images format. It
works only with image models from the catalog.
Request
curl https://ai-seller.vibe-codes.ru/v1/images/generations \
-H "Authorization: Bearer $AISELLER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2.5",
"prompt": "A fox in a neon city, watercolor",
"n": 1,
"size": "1024x1024"
}'
Response
json
{
"created": 1790000000,
"data": [{"b64_json": "iVBORw0KGgo..."}]
}
Specifics
- The response never streams, and generation may take minutes — give your client a generous timeout.
- Images come in
data[].b64_json. If the provider returns a link, the gateway downloads the file itself — the response has no links to the provider's storage. nis 1 to 10. You are billed per delivered image, but never for more thann.- References go in the
image/imagesfields — as a link or a base64data:URL. The request body limit is 70 MiB. - Other parameters (
size,aspect_ratio,resolution,quality,background,output_format,output_compression) are passed to the model as is; which values it supports is up to its provider.
Generation errors
| HTTP | code | What to do |
|---|---|---|
| 400 | content_policy_violation | The content policy rejected the prompt — change it. |
| 400 | invalid_image | The model rejected the reference — try a different image. |
| 422 | generation_failed | The model returned no image — retry or rephrase the prompt. |
Other codes are in Errors.
Updated September 29, 2026