Skip to main content
The Decart adapter for TanStack AI adds image and video generation to any TanStack project.
Decart is listed as an official community adapter on the TanStack AI docs.

Prerequisites

Installation

Install both the Decart adapter and TanStack AI:

Setup

Set your Decart API key as an environment variable:
Get your API key from platform.decart.ai. See authentication for details. Or pass your API key directly when creating adapters:

Image generation

Generate images with generateImage() and the decartImage() adapter:

With explicit API key

Use createDecartImage() to pass your API key directly:

Video generation

Video generation uses an async job and polling pattern — you submit a job, then poll for the result.
Unlike generateImage(), video generation is asynchronous. You submit a generation job with generateVideo(), then poll its status with getVideoJobStatus() until it completes.

Models

Options

seed
number
Seed value for reproducible results.
resolution
"720p" | "480p"
Output resolution. Defaults to 720p.

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.