POST /api/v1/text-to-video.php

Text to Video

Transform any text prompt into a cinematic, studio-quality video. The pipeline runs your prompt through Nano Banana Pro (image synthesis) then feeds the result into your chosen video model (Seedance 2.5 or MiniMax H3).

Generation Pipeline

Text Prompt
Nano Banana Pro → Image
Video Model (Seedance / MiniMax H3)
MP4 Video URL

Request Body

Parameter Type Required Description
prompt string Required Text description of the video to generate. Max 2000 characters.
video_model string Optional AI video model to use: veo3 (MiniMax H3 Ultra Fast, default) or seedance2.
resolution string Optional Output resolution. MiniMax H3 Ultra Fast (veo3, default): 480P or 768P (default 768P). Seedance: 480p / 720p.
duration integer Optional Duration in seconds (5–15 for MiniMax H3 Ultra Fast; 4–15 for Seedance). Default: 5.
aspect_ratio string Optional Output aspect ratio. Default: 16:9. Options vary by model, see AI Models.
motion_intensity string Optional Camera and subject motion: low, medium (default), high.

Response

200 Success

Video generated successfully. Returns video URL.

4xx/5xx Error

Returns "success": false with an "error" message.

Success Response (200)
{
  "success": true,
  "video_id": "vid_a1b2c3d4e5f6",
  "video_url": "https://cdn.nanobananavideo.com/videos/vid_a1b2c3.mp4",
  "thumbnail_url": "https://cdn.nanobananavideo.com/thumbs/vid_a1b2c3.jpg",
  "credits_used": 7,
  "rate_limit": {
    "count": 1,
    "limit": 30,
    "remaining": 29,
    "reset_in_seconds": 1800,
    "reset_at": "2026-05-05T18:30:00Z"
  }
}

Examples by Model

Seedance 2.5, Duration: 4–15 s · Resolution: 480p / 720p · Aspect: 16:9, 9:16, 1:1, 4:3, 3:4, 21:9, adaptive
Seedance 2.5, cURL
curl https://nanobananavideo.com/api/v1/text-to-video.php \
  -X POST \
  -H "Authorization: Bearer $NB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A street food vendor at a bustling night market, steam rising, colorful lanterns",
    "video_model": "seedance2",
    "resolution": "720p",
    "duration": 8,
    "aspect_ratio": "16:9",
    "motion_intensity": "medium"
  }'

Credit Calculation

Credits are deducted per generation. The cost depends on resolution and duration:

ConditionAdditional Credits
Base cost5 credits
Resolution = 1080p+ 2 credits
Resolution = 4K+ 5 credits
Duration > 5 s+ 1 credit per extra second

Example: 1080p, 8 s = 5 + 2 + 3 = 10 credits