omnivideo-sdk
v0.1.0
Published
Omni Video SDK — generate video and image content with the Gemini Omni Video series of models (https://omnivideo.net/).
Maintainers
Readme
omnivideo-sdk
Node.js / TypeScript SDK for Omni Video — generate video and image content with the Gemini Omni Video series of models.
Omni Video hosts the Gemini Omni Video family (seedance-2 for text/image → video, gpt-image-2 and nano-banana-2 for text/image → image) behind one simple REST API. This SDK is a thin, dependency-free wrapper around the global fetch.
Install
npm i omnivideo-sdk
# or: pnpm add omnivideo-sdk / yarn add omnivideo-sdkGet an API key
Sign in at https://omnivideo.net/, open the account page, then create a sk-… token.
export OMNIVIDEO_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxQuick start
import { OmniVideo } from "omnivideo-sdk";
const client = new OmniVideo(); // reads OMNIVIDEO_API_KEY
const task = await client.run({
model_id: "seedance-2",
prompt: "a serene zen garden at sunrise, ultra detailed",
aspect_ratio: "16:9",
});
console.log(task.video_url ?? task.image_url);Lower level: create + poll
import { OmniVideo, TaskStatus } from "omnivideo-sdk";
const client = new OmniVideo({ apiKey: "sk-..." });
const created = await client.createTask({
model_id: "gpt-image-2",
prompt: "cyberpunk corgi, neon rim light",
aspect_ratio: "1:1",
});
let task = created;
while (task.task_status === TaskStatus.Queued || task.task_status === TaskStatus.Running) {
await new Promise((r) => setTimeout(r, 3000));
task = await client.getTask(task.task_id);
}
console.log(task.image_url);Models
| model_id | Modality | Output |
| --------------- | ------------------ | ----------- |
| seedance-2 | text/image → video | video_url |
| gpt-image-2 | text/image → image | image_url |
| nano-banana-2 | text/image → image | image_url |
See current models and pricing on omnivideo.net.
API
new OmniVideo({ apiKey?, baseUrl?, fetch?, timeoutMs? })client.createTask({ model_id, prompt, image_urls?, aspect_ratio? }) → Promise<Task>client.getTask(taskId) → Promise<Task>client.run({ ...createTaskInput, pollIntervalMs?, maxWaitMs?, signal? }) → Promise<Task>Task:{ task_id, task_status (1=queued, 2=running, 3=success, 4=failed), image_url?, video_url?, credits? }
Errors throw an OmniVideoError with optional code (business) and status (HTTP).
Links
- Website & account: https://omnivideo.net/
- API docs: https://omnivideo.net/api-docs
License
MIT
