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.0, VEO 3.1 or Sora 2 VIP).
Generation Pipeline
Text Prompt
Nano Banana Pro
→ Image
Video Model
(Seedance / VEO / Sora)
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: seedance2 (default), veo3, or sora2. |
resolution |
string | Optional | Output resolution: 480p (default), 720p, 1080p. Note: sora2 and veo3 support up to 1080p / 4k. |
duration |
integer | Optional | Duration in seconds (3–12 for Seedance; 8 fixed for VEO; 10 or 15 for Sora 2). 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.0 — Duration: 4–15 s · Resolution: 480p / 720p · Aspect: 16:9, 9:16, 1:1, 4:3, 3:4, 21:9, adaptive
Seedance 2.0 — 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:
| Condition | Additional Credits |
|---|---|
| Base cost | 5 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