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/json

Request body

FieldRequiredTypeDescription
modelYesstringA current model ID from GET /api/v1/models?type=image
promptYesstringNon-empty image instruction
sceneNostringtext-to-image or image-to-image; must be supported by the model
image_urlsNostring[]Public HTTP(S) image URLs; required for image-to-image
optionsNoobjectModel-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

FieldTypeDescription
aspect_ratiostringA supported ratio such as 1:1, 16:9, or 9:16
qualitystringA 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.