Generate Gemini Omni Flash videos through Melter MCP & CLI: inspect the selected text or image mode, upload compatible references, review the credit quote and follow the returned generation ID.
Connect through Melter MCP & CLI, inspect get_model, upload the supported inputs, request a quote and approve a credit limit before generate. Retain the request and generation IDs; use wait_for_generation on the existing ID until completion rather than submitting a paid replacement.

A thread on r/GeminiAI titled "Gemini Omni Flash API access: 5 providers tested, ranked by use case" surfaced six days ago and quickly became the go-to reference for developers evaluating their options. The top comment cut straight to the point: Google AI Studio is the fastest way to start, but you hit rate limits quickly. Developers looking for a production-ready path need a different entry point.
On Melter, Gemini Omni Flash Standard offers 3–10 seconds at 720p from text, a starting image or up to ten reference images. Developer text/image modes offer 4–10 seconds at 720p, 1080p or 4K, with up to seven images in Developer image mode. Both support 16:9 or 9:16, a seed and prompts up to 20,000 characters. There are no audio/video-reference slots or sound toggle in these generation modes.
This tutorial covers Developer text-to-video and image-to-video through Melter MCP. The source’s assertion of live REST testing refers to the original examples, not a Melter paid test.
Prerequisites for the MCP Examples
You will need:
- A runtime supported by your chosen MCP client; the examples use JavaScript.
- A Melter account and an authenticated supported MCP connection.
- A connected client with the callTool interface used below; the source’s requests and axios REST examples have been adapted to this interface.
- Basic familiarity with asynchronous requests, uploaded input keys and generation IDs.
- Time to configure the connection and available credits or an eligible offer; the source’s approximately fifteen-minute estimate is not a guarantee.
Tested on: macOS 14, Ubuntu 22.04, Windows 11 (WSL2)
Pricing reference (sourced from Atlas Cloud pricing, 2026-06-02):
- 720p / 1080p: $0.20 base + $0.10 per second. An 8-second 720p video costs $1.00.
- 4K: $1.00 base + $0.10 per second. An 8-second 4K video costs $1.80.
What We Are Building with the Gemini Omni API
Follow the text or image example using one authenticated MCP client. Inspect and quote the actual settings before Generate, then monitor the returned ID.
Authenticated MCP client → inspect → upload → quote → approve → generate → wait → resultWhat the finished scripts do:
- Inspect the model, upload required media, quote and approve the request, then generate and retain the returned generation ID.
- Call wait_for_generation on that same ID, with a supported waiting interval; continue tracking it if it is still running.
- Read the completed result and output URL. Do not submit a second paid request merely because a network connection was interrupted.
Step 1: Connect Melter MCP & CLI
Connect through Melter MCP & CLI, inspect get_model, upload the supported inputs, request a quote and approve a credit limit before generate. Retain the request and generation IDs; use wait_for_generation on the existing ID until completion rather than submitting a paid replacement.
- Sign in to Melter.
- Open Melter MCP & CLI and choose a supported client.
- Complete authentication in the connection flow. Keep credentials secure and out of creative prompts.
Keep credentials in the connection setup, outside prompts and source code.
{ "mcpServers": { "melter": { "url": "https://www.melter.ai/api/mcp" } } }Verify the connection with a read-only tool call.
await client.callTool({ name: "list_models", arguments: {} });Expected result:
// A successful tool result lists models available through the connection.Keep credentials out of source control and logs. The examples assume an authenticated client; do not print secret values to check the connection.
Step 2: Quote and Submit a Text-to-Video Request
Inspect the Developer text mode, request a quote and approve the maximum credit spend before generating. Keep the returned generation ID.
Use these MCP tools:
get_model → quote → generate → wait_for_generationMelter’s Developer text-to-video model ID is:
omni-flash-t2v-devJavaScript MCP request
// client is authenticated through Melter MCP & CLI.
// Replace example image addresses with your authorized image URLs.
const sourceInputs = {};
const settings = {
"model_id": "omni-flash-t2v-dev",
"duration_s": 8,
"resolution": "1080p",
"ratio": "16:9",
"prompt": "A young woman walks slowly through a rainy Tokyo street at night, neon reflections on wet pavement, cinematic slow motion, realistic lighting, 4K, film grain"
};
const data = (result) => {
const block = result.content.find((item) => item.type === "text");
if (result.isError || !block) throw new Error("MCP request failed");
return JSON.parse(block.text);
};
await client.callTool({ name: "get_model", arguments: { model_id: settings.model_id } });
settings.inputs = {};
for (const [slot, value] of Object.entries(sourceInputs)) {
const keys = [];
for (const url of Array.isArray(value) ? value : [value]) {
const uploaded = data(await client.callTool({ name: "upload_from_url", arguments: { url, kind: "image" } }));
keys.push(uploaded.key);
}
settings.inputs[slot] = Array.isArray(value) ? keys : keys[0];
}
const quote = data(await client.callTool({ name: "quote", arguments: settings }));
// Show quote.credits and set approvedCredits to the user's approved maximum.
const requestId = crypto.randomUUID();
const generation = data(await client.callTool({
name: "generate",
arguments: { ...settings, max_credits: approvedCredits, request_id: requestId }
}));
const generationId = generation.generation_id;
// Retain requestId and generationId to recover after a network interruption.
const status = await client.callTool({
name: "wait_for_generation",
arguments: { id: generationId, seconds: 45 }
});
// If still running, wait on this same ID. Do not submit another paid request.Alternative: Reuse the Same Approved Settings
// Alternative client orchestration uses the same settings and full prompt above.
// Reuse the saved requestId when recovering a submission; do not generate twice.
const existingJob = await client.callTool({ name: "wait_for_generation", arguments: { id: generationId, seconds: 45 } });Expected output:
// Save generation.generation_id from the successful tool result.The generation ID identifies the submitted job. A successful submission is not a completed video. Wait on the same ID; do not run both alternatives as separate paid requests.
Step 3: Follow the Existing Generation
Use wait_for_generation with the ID already returned by generate. It returns current status and the completed result when available.
Generation is asynchronous and elapsed time varies. A local timeout does not establish failure or authorize a new paid request.
await client.callTool({ name: "wait_for_generation", arguments: { id: generationId, seconds: 45 } });Inspect the status returned by the tool. If the job is still running, retain its ID and wait again. If it failed, inspect the error before approving any replacement.
JavaScript: Wait for Status
const status = await client.callTool({
name: "wait_for_generation",
arguments: { id: generationId, seconds: 45 }
});
// If still running, wait on this same ID. Do not submit another paid request.Continue Waiting after an Interruption
// Use the saved generationId after reconnecting.
const status = await client.callTool({
name: "wait_for_generation",
arguments: { id: generationId, seconds: 45 }
});
// If still running, wait on this same ID. Do not submit another paid request.Expected output:
// Inspect the returned status and output fields.
// A running job is still the same generation; wait again on its ID.Use the bounded wait tool rather than a tight polling loop. Save the generation ID before waiting, and resume that ID after network interruptions.
Find completed outputs in Assets and download files you need to keep. The source’s 48-hour storage statement is not a Melter retention rule.
Step 4: Image-to-Video with the Gemini Omni Flash API
Upload an authorized reference image through Melter’s supported upload flow to obtain an input key.
Developer image mode uses a different model ID and an images input array. Inspect its schema before submitting.
omni-flash-i2v-devDeveloper image mode accepts up to seven reference images. Follow the upload flow’s current file validation. References guide appearance but do not guarantee identity through every frame.

Step 4a: Upload an Authorized Image
// Local files: use the MCP local upload-page flow.
// Public authorized image URLs: upload_from_url returns an input key.
const uploaded = data(await client.callTool({ name: "upload_from_url", arguments: { url: authorizedImageUrl, kind: "image" } }));
const imageKey = uploaded.key;Step 4b: Quote the Image-to-Video Request
// client is authenticated through Melter MCP & CLI.
// Replace example image addresses with your authorized image URLs.
const sourceInputs = {
"images": [
"https://your-authorized-host.example/reference.jpg"
]
};
const settings = {
"model_id": "omni-flash-i2v-dev",
"duration_s": 8,
"resolution": "1080p",
"ratio": "16:9",
"prompt": "The character walks forward slowly, natural lighting, cinematic depth of field"
};
const data = (result) => {
const block = result.content.find((item) => item.type === "text");
if (result.isError || !block) throw new Error("MCP request failed");
return JSON.parse(block.text);
};
await client.callTool({ name: "get_model", arguments: { model_id: settings.model_id } });
settings.inputs = {};
for (const [slot, value] of Object.entries(sourceInputs)) {
const keys = [];
for (const url of Array.isArray(value) ? value : [value]) {
const uploaded = data(await client.callTool({ name: "upload_from_url", arguments: { url, kind: "image" } }));
keys.push(uploaded.key);
}
settings.inputs[slot] = Array.isArray(value) ? keys : keys[0];
}
const quote = data(await client.callTool({ name: "quote", arguments: settings }));
// Show quote.credits and set approvedCredits to the user's approved maximum.
const requestId = crypto.randomUUID();
const generation = data(await client.callTool({
name: "generate",
arguments: { ...settings, max_credits: approvedCredits, request_id: requestId }
}));
const generationId = generation.generation_id;
// Retain requestId and generationId to recover after a network interruption.
const status = await client.callTool({
name: "wait_for_generation",
arguments: { id: generationId, seconds: 45 }
});
// If still running, wait on this same ID. Do not submit another paid request.For best results with Gemini Omni Flash Image-to-Video, use a clean, well-lit reference image with a neutral or simple background. The model preserves facial and clothing details more consistently when the subject is clearly separated from the background. Images with complex patterns or heavy post-processing tend to produce inconsistent output across frames.
Follow the selected model and uploader’s validation errors. Do not assume that every source-provider size or format limit is identical on Melter.
Step 5: Inspect the Schema before Switching Models
MCP provides a common discovery and request flow, but models have different inputs and settings. Reinspect and requote each selected model; do not change only its ID.
// Discover alternatives without submitting a generation.
await client.callTool({ name: "get_model", arguments: { model_id: "seedance-2.0" } });
// Rebuild compatible settings, quote and obtain approval before a new request.Compare a small, explicitly approved set of requests with compatible settings. Each additional generation has its own credit cost.
Gemini Omni Flash API Troubleshooting
Here are the five most common issues when using the Gemini Omni Flash API and how to resolve them.
| Problem | Symptom | Solution |
|---|---|---|
| 401 Unauthorized | {"error": "Invalid API key"} | Reconnect through the authenticated Melter MCP connection |
| 400 Bad Request | {"error": "Invalid prompt"} | Inspect the actual validation error and correct unsupported settings or inputs |
Task stuck in processing | No completed status after 6 minutes | Resume the existing generation ID and inspect status; do not pay for an automatic replacement |
| Video URL returns 404 | URL no longer accessible | Check the completed result in Assets; the source expiry is not Melter policy |
| 429 Too Many Requests | Rate limit exceeded | Back off status reads and resume the same ID; retain request IDs to avoid duplicate submissions |
Use the returned error details and Melter Help. Keep the generation ID when asking for help.
Next Steps
The supported text and image request flows can be orchestrated by an agent, with an approved budget and actual schemas for every stage.
Extend this project:
- For Seedance 2.0 References, supply one to nine images. Audio references from the source workflow are not accepted by this Melter mode.
- For batch work, set an explicit spending limit, approve each request and retain generation IDs while collecting results asynchronously.
- Build the cost estimator around the quote tool for the exact model and settings. The source formula 0.20 + duration × 0.10 is not Melter pricing.
Related resources:
- Browse the model catalogue for available generation modes.
- Open Pricing for plans and credits; use a generation quote for the exact request.
- Use MCP & CLI for the supported connection and tool workflow.
Frequently Asked Questions
What is the Gemini Omni Flash API?
On Melter, Gemini Omni Flash Standard offers 3–10 seconds at 720p from text, a starting image or up to ten reference images. Developer text/image modes offer 4–10 seconds at 720p, 1080p or 4K, with up to seven images in Developer image mode. Both support 16:9 or 9:16, a seed and prompts up to 20,000 characters. There are no audio/video-reference slots or sound toggle in these generation modes.
How much does the Gemini Omni Flash API cost?
On Atlas Cloud, Gemini Omni Flash is priced at $0.20 base plus $0.10 per second for 720p and 1080p output. A standard 8-second clip at 1080p costs $1.00. For 4K output, the base fee is $1.00 plus $0.10 per second, making an 8-second 4K clip $1.80. All pricing is pay-as-you-go with no minimum spend (Atlas Cloud pricing, 2026-06-02).
How Does Melter MCP Access Differ from the Source Tutorial?
Connect through Melter MCP & CLI, inspect get_model, upload the supported inputs, request a quote and approve a credit limit before generate. Retain the request and generation IDs; use wait_for_generation on the existing ID until completion rather than submitting a paid replacement. The source’s rate limits, approval policy, SDKs and catalogue size are not Melter guarantees.
How long does Gemini Omni Flash take to generate a video?
Completion time varies. Wait on the existing generation ID and resume it after a timeout or connection interruption. Do not automatically submit another paid job at a six-minute boundary.
Can I use the Gemini Omni Flash API for free?
Check the actual offers and credit balance on your Melter account. A source-provider signup promotion does not create a Melter free-generation entitlement.