omniflash-sdk
v0.1.0
Published
Omni Flash SDK — generate short videos (with synchronized audio) and images via the Gemini Omni Flash family of models (https://omniflash.net/).
Downloads
11
Maintainers
Readme
omniflash-sdk
Node.js / TypeScript SDK for Gemini Omni Flash — generate short video clips (with synchronized audio) and images using Google's Gemini Omni Flash family of models.
Gemini Omni Flash wraps the Omni Flash family (seedance-2 for text/image → video + audio, 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 omniflash-sdk
# or: pnpm add omniflash-sdk / yarn add omniflash-sdkGet an API key
Sign in at Gemini Omni Flash, open the account page, then create a sk-… token.
export OMNIFLASH_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxQuick start
import { OmniFlash } from "omniflash-sdk";
const client = new OmniFlash(); // reads OMNIFLASH_API_KEY
const task = await client.run({
model_id: "seedance-2",
prompt: "a kettle whistles as steam rises, cozy kitchen, warm light",
aspect_ratio: "16:9",
});
console.log(task.video_url);
console.log(task.audio_url); // synchronized audio trackLower level: create + poll
import { OmniFlash, TaskStatus } from "omniflash-sdk";
const client = new OmniFlash({ 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 + audio_url |
| gpt-image-2 | text/image → image | image_url |
| nano-banana-2 | text/image → image | image_url |
See current models and pricing on Gemini Omni Flash.
API
new OmniFlash({ 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?, audio_url?, request_id?, task_type?, model_id?, credits?, created_at? }
Errors throw an OmniFlashError with optional code (business) and status (HTTP).
Links
- Website & account: Gemini Omni Flash
- API docs: https://omniflash.net/api-docs
License
MIT
