Skip to main content
POST
/
api
/
v2
/
generate
Video Generation
curl --request POST \
  --url https://api.example.com/api/v2/generate \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "prompt": "<string>",
  "image_url": "<string>",
  "duration": 123,
  "aspect_ratio": "<string>",
  "negative_prompt": "<string>"
}
'
Video generation is always asynchronous. You’ll receive a generation ID immediately, then poll for the result. Processing typically takes 20–180 seconds depending on the model.

Request

Authorization
string
required
Authorization: Bearer nb_YOUR_API_KEY
model
string
required
Video model slug. See Video Models.
prompt
string
required
Text description of the video to generate.
image_url
string
Starting image URL for image-to-video generation. When provided, the video animates from this image.
duration
integer
default:"5"
Video duration in seconds. Supported values: 5 or 10 (model-dependent).
aspect_ratio
string
default:"16:9"
Output aspect ratio: 16:9, 9:16, 1:1
negative_prompt
string
Elements to avoid in the video.

Request Example

curl -X POST https://neuralbox.top/api/v2/generate \
  -H "Authorization: Bearer nb_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling-v2.1",
    "prompt": "A time-lapse of a blooming flower, macro photography, soft natural light",
    "duration": 5,
    "aspect_ratio": "16:9"
  }'

Initial Response (Pending)

{
  "id": 18500,
  "status": "pending",
  "model_slug": "kling-v2.1",
  "processing_ms": null,
  "created_at": "2026-03-08T12:05:00Z"
}

Completed Response

{
  "id": 18500,
  "status": "completed",
  "model_slug": "kling-v2.1",
  "result_url": "https://storage.neuralbox.top/generations/18500.mp4",
  "tokens_spent": 26,
  "result_metadata": { "duration": 5, "width": 1920, "height": 1080 },
  "created_at": "2026-03-08T12:05:00Z",
  "completed_at": "2026-03-08T12:05:55Z"
}

Model Comparison

ModelTokensSpeedBest For
luma-flash215–93Fast (~20–30s)Quick prototypes
kling-v2.126–94Medium (~45–90s)Versatile, high quality
minimax-video88Medium (~60s)Character consistency
luma-ray242–180Medium (~60–120s)Cinematic quality
mj-video-480p / mj-video-720p50–320Slow (~90s)Artistic style
Token cost depends on duration and resolution. Use Calculate Price for exact cost.