Skip to main content

Documentation Index

Fetch the complete documentation index at: https://usenaive.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

Video is the creation primitive for moving content. Naive exposes video generation models behind a consistent async interface — text-to-video for scripted content and image-to-video for animating stills. All jobs go through the unified jobs system with credits billed on completion.

CLI First

# Generate video and wait for completion
naive video generate --model fal-ai/kling-video/v3/pro/text-to-video "A golden retriever running on a beach at sunset" --duration 5 --aspect-ratio 16:9 --wait

# See available models
naive video models

Tools

ToolTypeDescriptionCost
generate_videoCoreGenerate video from text or image (async)Dynamic (model/duration-dependent)
video_modelsCoreList all available video generation modelsFree
video_statusCoreCheck status of a video generation jobFree

Generating Video

The generate_video tool submits an async video generation job. A model is required — there is no default. The input object supports all model-specific parameters.
curl -X POST https://api.usenaive.ai/v1/video/generate \
  -H "Authorization: Bearer nv_sk_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "fal-ai/kling-video/v3/pro/text-to-video",
    "input": {
      "prompt": "A golden retriever running on a beach at sunset, cinematic slow motion",
      "duration": "5",
      "aspect_ratio": "16:9"
    }
  }'
Response (202):
{
  "job_id": "job-uuid",
  "status": "queued",
  "type": "video_generation",
  "model": "fal-ai/kling-video/v3/pro/text-to-video",
  "estimated_seconds": 60,
  "estimated_credits": 3.5,
  "hint": "Poll GET /v1/jobs/job-uuid or GET /v1/video/job-uuid. Credits charged on completion only."
}

Parameters

ParamTypeRequiredDefaultDescription
promptstringYesText description of the video
durationstringNo"5"Video length: "5" or "10" seconds (Kling models)
aspect_ratiostringNo"16:9"Output ratio: "16:9", "9:16", "1:1"
image_urlstringNoSource image for image-to-video models
cfg_scalenumberNo0.5Guidance strength 0–1 (higher = more literal)
negative_promptstringNoWhat to avoid in the video
generate_audiobooleanNotrueEnable native audio (Kling v3 only)

Polling for Completion

Video generation takes 30-120 seconds. Poll the job:
curl https://api.usenaive.ai/v1/video/job-uuid \
  -H "Authorization: Bearer nv_sk_your_key"
Response (completed):
{
  "status": "completed",
  "result": {
    "video": {
      "url": "https://fal.media/files/.../video.mp4",
      "content_type": "video/mp4",
      "file_size": 4521987
    }
  },
  "credits_used": 3.5
}
Poll every 15-30 seconds. The progress field (0-100) shows generation percentage when available.

Cost

Video pricing is dynamic — based on the model’s per-second cost, converted to credits at $0.50/credit. Preview costs:
curl "https://api.usenaive.ai/v1/video/pricing?model=fal-ai/kling-video/v3/pro/text-to-video&duration=5" \
  -H "Authorization: Bearer nv_sk_your_key"
{
  "model": "fal-ai/kling-video/v3/pro/text-to-video",
  "duration": 5,
  "estimated_credits": 3.5,
  "fal_unit_price_usd": 0.07,
  "credit_value_usd": 0.50
}

Available Models

Use GET /v1/video/models for the full dynamically-fetched list. Common models:
ModelModeBest For
fal-ai/kling-video/v3/pro/text-to-videotext-to-videoHighest quality, native audio
fal-ai/kling-video/v3/pro/image-to-videoimage-to-videoAnimate still images
fal-ai/kling-video/v3/standard/text-to-videotext-to-videoGood quality, faster
fal-ai/minimax-video/video-01-livetext-to-videoFast generation
fal-ai/wan/v2.7/text-to-videotext-to-videoHigh resolution options

Text-to-Video vs Image-to-Video

Generate entirely from a text prompt:
{
  "model": "fal-ai/kling-video/v3/pro/text-to-video",
  "input": {
    "prompt": "A timelapse of a flower blooming in a garden",
    "duration": "5",
    "aspect_ratio": "16:9"
  }
}
Best for: product demos, abstract animations, scripted content.

Error Handling

ErrorCauseRecovery
insufficient_creditsNot enough credits for generationPreview cost with /v1/video/pricing, then top up
provider_errorAI model provider rejected the requestCheck model parameters against /v1/video/models
invalid_modelModel ID not recognizedUse GET /v1/video/models for valid IDs

Typical Workflow

Agent receives task: "Create a product demo video"

    ├─ GET /v1/video/models                    → List available models
    │   → 8 models available

    ├─ GET /v1/video/pricing?model=...&dur=5   → Preview cost
    │   → estimated_credits: 3.5

    ├─ POST /v1/video/generate                 → Submit generation job
    │   { model: "fal-ai/kling-video/v3/pro/text-to-video",
    │     input: { prompt: "Product showcase...", duration: "5" } }
    │   → job_id: job-uuid

    ├─ GET /v1/video/job-uuid                  → Poll every 15-30s
    │   → status: processing, progress: 65%

    ├─ GET /v1/video/job-uuid                  → Poll again
    │   → status: completed, video URL ready

    └─ POST /v1/email/send                     → Share with team
        { body: "Video ready: https://fal.media/..." }