The Decart provider for the Vercel AI SDK adds image and video generation to any AI SDK project.Documentation Index
Fetch the complete documentation index at: https://docs.platform.decart.ai/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- A Decart API key
- Node.js 18+
- The
aipackage (npm i ai)
Installation
Setup
Import the default provider instance:DECART_API_KEY environment variable by default.
Set your Decart API key as an environment variable:
createDecart():
API key for authentication. Defaults to the
DECART_API_KEY environment variable.Custom URL prefix for API calls. Defaults to
https://api.decart.ai.Custom headers to include in requests.
Custom fetch implementation for intercepting requests or testing.
Image generation
Generate images withgenerateImage():
Image models
| Model | Description |
|---|---|
lucy-pro-t2i | High-quality text-to-image generation |
Image settings
Aspect ratio of the generated image. Supported values:
16:9 (landscape) and 9:16 (portrait).Seed value for reproducible results.
Unsupported aspect ratios generate a warning and fall back to the default behavior.
Video generation
Generate videos withexperimental_generateVideo():
experimental_generateVideo is an experimental AI SDK API. The function signature may change in future releases.Text-to-video
Video models
| Model | Description |
|---|---|
lucy-pro-t2v | Text-to-video generation |
Video settings
Aspect ratio of the generated video. Supported values:
16:9 (landscape) and 9:16 (portrait).Seed value for reproducible results.
Video resolution. Supported values:
1280x720 (720p) and 854x480 (480p).Provider options
Pass Decart-specific options viaproviderOptions.decart:
Override orientation directly instead of deriving it from
aspectRatio.Next steps
Models overview
Explore all available Decart models.
JavaScript SDK
Use Decart’s native SDK for full API access.
GitHub
View source code and contribute.