Skip to main content

Interface

The DecartProvider interface extends the AI SDK’s ProviderV2 and provides methods to instantiate image and video generation models.

Methods

image()

Creates an image generation model instance.
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()

Alias for 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()

Creates a video generation model instance.
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()

Alias for 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 a NoSuchModelError:
  • languageModel(modelId: string) - Not supported
  • textEmbeddingModel(modelId: string) - Not supported