Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/DecartAI/ai-sdk-provider/llms.txt

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

The Decart provider offers powerful video generation capabilities through the AI SDK’s experimental video generation API. You can create videos from text descriptions, animate images, or control precise motion paths using trajectory-based generation.

Video Generation Capabilities

Decart provides four specialized video models, each optimized for different use cases:

Text-to-Video

Generate videos from text prompts using lucy-pro-t2v

Image-to-Video

Animate images into videos with lucy-pro-i2v and lucy-dev-i2v

Motion Control

Control camera and subject movement with lucy-motion trajectories

Settings

Configure aspect ratio, resolution, and seed settings

Quick Start

Generate a video from a text prompt:
import { decart } from '@decartai/ai-sdk-provider';
import { experimental_generateVideo as generateVideo } from 'ai';
import fs from 'fs';

const { videos } = await generateVideo({
  model: decart.video('lucy-pro-t2v'),
  prompt: 'A man is riding a horse in a field',
});

fs.writeFileSync('video.mp4', videos[0].uint8Array);

Model Selection Guide

Choose the right model based on your use case:
ModelInput TypeUse CaseBest For
lucy-pro-t2vText onlyText-to-video generationCreating videos from descriptions
lucy-pro-i2vImage + textImage animationHigh-quality image-to-video conversion
lucy-dev-i2vImage + textImage animationDevelopment and testing
lucy-motionImage + text + trajectoryMotion controlPrecise camera and subject movement
All video models support 16:9 (landscape) and 9:16 (portrait) aspect ratios.

How It Works

Video generation with Decart follows a job-based asynchronous workflow:
1

Submit Request

Your video generation request is submitted to the Decart API with prompt, image (if applicable), and settings.
2

Job Processing

The API returns a job ID and begins processing your video. The SDK automatically polls the job status every 1.5 seconds.
3

Video Retrieval

When the job completes, the SDK downloads the generated video as an MP4 file and returns it as a Uint8Array.
The default timeout for video generation is 5 minutes. You can customize polling behavior using providerOptions.decart.pollIntervalMs and pollTimeoutMs.

Response Format

All video generation calls return a result object with the following structure:
const { videos } = await generateVideo({
  model: decart.video('lucy-pro-t2v'),
  prompt: 'A sunset over the ocean',
});

// Access the video data
const videoData = videos[0].uint8Array;  // Uint8Array
const mimeType = videos[0].mimeType;     // "video/mp4"
Video generation is computationally intensive and may take several minutes depending on the model and settings.

Next Steps

View All Models

Explore detailed specifications for each video model

See Examples

Browse complete working examples

Build docs developers (and LLMs) love