Api
Image Generation API
Create image generation tasks with POST /api/v1/images.
Create an image task
POST /api/v1/images creates an image-generation task and consumes credits when accepted.
POST https://vidrush-ai.com/api/v1/images
Authorization: Bearer sk-your-api-key
Content-Type: application/jsonRequest body
| Field | Required | Type | Description |
|---|---|---|---|
model | Yes | string | A current model ID from GET /api/v1/models?type=image |
prompt | Yes | string | Non-empty image instruction |
scene | No | string | text-to-image or image-to-image; must be supported by the model |
image_urls | No | string[] | Public HTTP(S) image URLs; required for image-to-image |
options | No | object | Model-specific generation controls |
If scene is omitted it defaults to text-to-image, except a non-empty image_urls array infers image-to-image.
options
| Field | Type | Description |
|---|---|---|
aspect_ratio | string | A supported ratio such as 1:1, 16:9, or 9:16 |
quality | string | A supported quality such as 1K, 2K, or 4K |
Only send values advertised for the selected model and scene. GET /api/v1/models?type=image is the live machine-readable source.
Example
curl -X POST https://vidrush-ai.com/api/v1/images \
-H "Authorization: Bearer $VIDRUSH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "nano-banana-2",
"scene": "text-to-image",
"prompt": "A paper kite crossing a bright summer sky",
"options": { "aspect_ratio": "16:9", "quality": "2K" }
}'Successful response
{
"code": 0,
"message": "ok",
"data": {
"id": "task_123",
"status": "processing",
"costCredits": 8
}
}Use data.id with GET /api/v1/tasks/{taskId}, polling every 5 seconds until a terminal status. On success, read the generated image URLs from data.taskUrls.