Skip to main content

Vanilla JavaScript

HTML Boilerplate

React with TypeScript

Error Handling Pattern

Status Monitoring

Image-to-Video

Image-to-video requirements:
  • SDK version 1.0.0+
  • Max size: 25MB
  • Supported formats: JPEG, PNG, WebP, GIF, BMP, HEIC, HEIF, AVIF
  • Images are resized to 1280x704 (landscape) or 704x1280 (portrait)

Working with the Simulate API

The Simulate API requires SDK version 1.0.0 or higher.

Example Application: Slack GIF Bot

This example shows a Slack bot that generates GIFs using the Simulate API. Users can mention the bot with a prompt like @ody gif A cat sleeping and it will generate and upload a GIF.
Key features of this example:
  • Uses the Simulate API for asynchronous video generation
  • Supports image-to-video by passing a base64-encoded image
  • Polls getSimulateStatus() until the video is ready
  • Handles errors gracefully with user feedback