The VisionStory AI Image Generation API creates or edits images from text prompts and optional reference media. The synchronous response returns an image URL that you can download or pass directly into an image-to-video workflow.
Beta access. This endpoint is allowlisted during beta. If a request returns
403 / not enabled, contact your VisionStory representative. An active subscription is required.
AI image API endpoints
| Method | Path | What it does |
|---|---|---|
GET | /api/v1/image/models | List image models with sizes and per-image credit cost |
POST | /api/v1/image | Generate an image from a prompt (+ optional references) |
List image generation models
curl -s -H "X-API-Key: $VISIONSTORY_API_KEY" https://openapi.visionstory.ai/api/v1/image/models
Each model reports its aspect ratios, resolutions, reference-image limit, and credit_per_image. Current models: nano-banana (fast, economical), nano-banana-2 (balanced, strong edits), nano-banana-pro (highest quality, supports 2K). Drive your integration from this endpoint rather than hardcoding.
Generate or edit an AI image
Send a model_id (from the models endpoint) and a prompt. Optionally add up to 4 refs (reference images) to guide style or subject, or to edit — editing works through instructions in the prompt plus reference images, no mask needed.
curl -s -X POST -H "X-API-Key: $VISIONSTORY_API_KEY" -H "Content-Type: application/json" -d '{"model_id": "nano-banana", "prompt": "A red panda barista in a cozy cafe, warm lighting", "aspect_ratio": "1:1", "resolution": "1K"}' https://openapi.visionstory.ai/api/v1/image
{
"data": {
"url": "https://cdn.visionstory.ai/example.png"
}
}
- Aspect ratio: one of
1:1(default) /2:3/3:2/3:4/4:3/4:5/5:4/9:16/16:9/21:9. - Resolution:
1K(default) or2K. - References: up to 4, each
asset_id/url/inline_data.
Use a generated image in a video
The returned url is a normal image URL — pass it straight into other endpoints, e.g. as first_frame or refs for AI Video:
{
"model_id": "seedance-2.0",
"prompt": "the scene gently comes alive, slow camera push-in",
"first_frame": {
"url": "https://cdn.visionstory.ai/example.png"
}
}
Billing, limits, and storage
- Not stored by default. The image is returned as a URL but not added to your asset library — upload it via
POST /api/v1/assetif you want a reusableasset_id. - Billing: credits per image (see
credit_per_imagefrom the models endpoint), charged only on success. - Concurrency: synchronous generation is capped at a few concurrent requests per key during beta; excess requests are rejected rather than queued.
Related VisionStory API guides
- AI Video — turn a generated image into video.
- API reference — full request schema and error codes.