Images

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.
  • n is 1 to 10. You are billed per delivered image, but never for more than n.
  • References go in the image / images fields — as a link or a base64 data: 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

HTTPcodeWhat to do
400content_policy_violationThe content policy rejected the prompt — change it.
400invalid_imageThe model rejected the reference — try a different image.
422generation_failedThe model returned no image — retry or rephrase the prompt.

Other codes are in Errors.

Updated September 29, 2026