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.
Overview
Decart video models support standard AI SDK video generation settings with some limitations. This page describes the supported and unsupported settings for all video models.
Supported Settings
prompt
Text description to guide video generation.
- Required for
lucy-pro-t2v (text-to-video)
- Optional for image-to-video models (provides additional guidance)
import { experimental_generateVideo } from 'ai';
import { decart } from '@decartai/ai-sdk-provider';
// Text-to-video
const { video } = await experimental_generateVideo({
model: decart.video('lucy-pro-t2v'),
prompt: 'Ocean waves gently rolling onto a sandy beach'
});
// Image-to-video with optional prompt
const { video: guided } = await experimental_generateVideo({
model: decart.video('lucy-pro-i2v'),
image: { type: 'url', url: 'https://example.com/scene.jpg' },
prompt: 'Slow camera zoom in'
});
seed
Random seed for reproducible video generation.Using the same seed with the same inputs will produce the same video.
import { experimental_generateVideo } from 'ai';
import { decart } from '@decartai/ai-sdk-provider';
const { video } = await experimental_generateVideo({
model: decart.video('lucy-pro-t2v'),
prompt: 'A time-lapse of clouds moving',
seed: 12345
});
resolution
Video resolution.Only two resolutions are supported:
"1280x720" - 720p (default)
"640x480" - 480p
Other resolutions will produce a warning and be ignored.
import { experimental_generateVideo } from 'ai';
import { decart } from '@decartai/ai-sdk-provider';
const { video } = await experimental_generateVideo({
model: decart.video('lucy-pro-t2v'),
prompt: 'A landscape scene',
resolution: '1280x720'
});
aspectRatio
Aspect ratio of the generated video.Only two aspect ratios are supported:
"16:9" - Landscape orientation
"9:16" - Portrait orientation
Other aspect ratios will produce a warning and be ignored.
import { experimental_generateVideo } from 'ai';
import { decart } from '@decartai/ai-sdk-provider';
// Landscape
const { video: landscape } = await experimental_generateVideo({
model: decart.video('lucy-pro-t2v'),
prompt: 'Wide panoramic shot',
aspectRatio: '16:9'
});
// Portrait
const { video: portrait } = await experimental_generateVideo({
model: decart.video('lucy-pro-t2v'),
prompt: 'Vertical video for mobile',
aspectRatio: '9:16'
});
image
Source image for image-to-video generation.
- Required for
lucy-pro-i2v, lucy-dev-i2v, and lucy-motion
- Not used for
lucy-pro-t2v
Supports two input types:
- URL reference:
{ type: 'url', url: string }
- Binary data:
{ type: 'binary', data: Uint8Array | string, mediaType: string }
import { experimental_generateVideo } from 'ai';
import { decart } from '@decartai/ai-sdk-provider';
import { readFileSync } from 'fs';
// Using URL
const { video: fromUrl } = await experimental_generateVideo({
model: decart.video('lucy-pro-i2v'),
image: {
type: 'url',
url: 'https://example.com/image.jpg'
}
});
// Using binary data
const imageData = readFileSync('input.jpg');
const { video: fromBinary } = await experimental_generateVideo({
model: decart.video('lucy-pro-i2v'),
image: {
type: 'binary',
data: new Uint8Array(imageData),
mediaType: 'image/jpeg'
}
});
// Using base64 string
const { video: fromBase64 } = await experimental_generateVideo({
model: decart.video('lucy-pro-i2v'),
image: {
type: 'binary',
data: 'base64EncodedImageData...',
mediaType: 'image/jpeg'
}
});
Unsupported Settings
The following settings are not supported and will produce warnings:
fps
Not supported. Frame rate cannot be configured.Specifying this parameter will produce a warning of type unsupported.
duration
Not supported. Video duration cannot be configured.Specifying this parameter will produce a warning of type unsupported.
import { experimental_generateVideo } from 'ai';
import { decart } from '@decartai/ai-sdk-provider';
const result = await experimental_generateVideo({
model: decart.video('lucy-pro-t2v'),
prompt: 'A scene',
fps: 30, // Will produce warning
duration: 5 // Will produce warning
});
if (result.warnings && result.warnings.length > 0) {
result.warnings.forEach(warning => {
console.log(`Warning: ${warning.type} - ${warning.feature}`);
});
}
Provider-Specific Options
Decart video models support additional options via the providerOptions.decart parameter. See Video Provider Options for details.
import { experimental_generateVideo } from 'ai';
import { decart } from '@decartai/ai-sdk-provider';
const { video } = await experimental_generateVideo({
model: decart.video('lucy-pro-t2v'),
prompt: 'A scene',
providerOptions: {
decart: {
orientation: 'landscape',
pollIntervalMs: 2000,
pollTimeoutMs: 600000
}
}
});
Standard Request Options
Custom HTTP headers to include with the request.
const { video } = await experimental_generateVideo({
model: decart.video('lucy-pro-t2v'),
prompt: 'A scene',
headers: {
'X-Custom-Header': 'value'
}
});
abortSignal
AbortSignal to cancel the request.Cancels both the initial submission and polling process.
const controller = new AbortController();
const promise = experimental_generateVideo({
model: decart.video('lucy-pro-t2v'),
prompt: 'A scene',
abortSignal: controller.signal
});
// Cancel after 30 seconds
setTimeout(() => controller.abort(), 30000);
Handling Warnings
When using unsupported settings, the model returns warnings in the response:
import { experimental_generateVideo } from 'ai';
import { decart } from '@decartai/ai-sdk-provider';
const result = await experimental_generateVideo({
model: decart.video('lucy-pro-t2v'),
prompt: 'A scene',
fps: 60, // Unsupported
aspectRatio: '4:3' // Unsupported
});
if (result.warnings && result.warnings.length > 0) {
result.warnings.forEach(warning => {
console.log(`Warning Type: ${warning.type}`);
console.log(`Feature: ${warning.feature}`);
if (warning.details) {
console.log(`Details: ${warning.details}`);
}
});
}