Tasks
Text-to-Video
Model API
- Welcome
- Get started
- Understand the API
- Tasks
- Audio Classification
- Automatic Speech Recognition
- Chat
- Depth Estimation
- Document Question Answering
- Feature Extraction
- Fill Mask
- Image Classification
- Image Feature Extraction
- Image Segmentation
- Image-to-Text
- Mask Generation
- Object Detection
- Question Answering
- Sentence Similarity
- Summarization
- Text Classification
- Text Generation
- Image Generation
- Text-to-Speech
- Text-to-Text Generation
- Text-to-Video
- Token Classification
- Translation
- Unconditional Image Generation
- Video Classification
- Visual Question Answering
- Zero Shot Classification
- Zero Shot Image Classification
- Zero Shot Object Detection
Tasks
Text-to-Video
Generate videos from textual descriptions for applications like content creation, entertainment, and education
Send a text prompt to generate a video output (usually in mp4):
import Bytez from "bytez.js";
const sdk = new Bytez("BYTEZ_KEY");
const model = sdk.model("ali-vilab/text-to-video-ms-1.7b");
const { error, output } = await model.run("A cat playing with a rose");
console.log({ error, output });
Instead receiving an video file in JSON format, you opt to stream back the data URL:
import Bytez from "bytez.js";
const sdk = new Bytez("BYTEZ_KEY");
const model = sdk.model("ali-vilab/text-to-video-ms-1.7b");
const text = "A cat playing with a rose"
const stream = true
const readStream = await model.run(text, stream);
// the stream returns the base64 data url
for await (const chunk of readStream) {
console.log(chunk)
}