You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
xAI's Imagine API ships video generation models, but @tanstack/ai-grok has no video adapter — generateVideo() currently supports OpenAI Sora and fal only.
The Imagine API plumbing landed in feat(ai): add imageInputs / videoInputs / audioInputs for image-conditioned generation #624 for the image models (grok-imagine-image, grok-imagine-image-quality): JSON endpoints called directly (the OpenAI SDK's multipart paths are rejected by xAI), aspect-ratio size template, and /v1/images/edits image conditioning. The video adapter can build on the same utilities.
E2E: aimock doesn't mock the Imagine video endpoints, so coverage would follow the same unit-test approach as the image-to-image / image-to-video features (see testing/e2e/src/lib/feature-support.ts).
Problem
xAI's Imagine API ships video generation models, but
@tanstack/ai-grokhas no video adapter —generateVideo()currently supports OpenAI Sora and fal only.Available models (per docs.x.ai/developers/models):
grok-imagine-video— text-to-video, $0.05/secondgrok-imagine-video-1.5-preview— text-to-video (preview), $0.08/secondProposal
Add a
grokVideoadapter following the existing jobs/polling pattern (BaseVideoAdapter, like the OpenAI Sora and fal video adapters):createVideoJob/getVideoStatus/getVideoUrlagainst the Imagine video endpointsimageInputssupport for image-to-video / starting-frame flows, reusing themetadata.roleconventions from image-to-image and image-to-video support #618 (start_frame, etc.)size: '16:9_2k'template →aspect_ratio/resolution)Notes
grok-imagine-image,grok-imagine-image-quality): JSON endpoints called directly (the OpenAI SDK's multipart paths are rejected by xAI), aspect-ratio size template, and/v1/images/editsimage conditioning. The video adapter can build on the same utilities.image-to-image/image-to-videofeatures (seetesting/e2e/src/lib/feature-support.ts).Related: #618, #624.