Interface
DecartProvider interface extends the AI SDK’s ProviderV2 and provides methods to instantiate image and video generation models.
Methods
image()
DecartImageModelId
required
The identifier of the image model to use.See Image Models for available model IDs.
ImageModelV2
An image model instance compatible with AI SDK’s
generateImage() function.imageModel()
image(). Creates an image generation model instance.
DecartImageModelId
required
The identifier of the image model to use.
ImageModelV2
An image model instance compatible with AI SDK’s
generateImage() function.video()
DecartVideoModelId
required
The identifier of the video model to use.See Video Models for available model IDs.
Experimental_VideoModelV3
A video model instance compatible with AI SDK’s
experimental_generateVideo() function.videoModel()
video(). Creates a video generation model instance.
DecartVideoModelId
required
The identifier of the video model to use.
Experimental_VideoModelV3
A video model instance compatible with AI SDK’s
experimental_generateVideo() function.Examples
Creating an Image Model
Creating a Video Model
Using Both Methods
Unsupported Methods
The Decart provider does not support language or text embedding models. Calling these methods will throw aNoSuchModelError:
languageModel(modelId: string)- Not supportedtextEmbeddingModel(modelId: string)- Not supported