Guilds AI / Blog

,

AI Video Generation API: Models, Pricing and Integration

Laptop displaying an illustrative AI video generation interface with a mountain video preview and API integration symbols.

An AI video generation API lets your application request generated video clips from a text prompt, a reference image or supported video input. Two current routes worth evaluating are the Gemini Developer API with Gemini Omni 1.2 Flash and Runway Dev, which exposes both Runway’s own models and selected partner models. OpenAI’s Sora Videos API is no longer available. Before selecting an API, check the actual model lifecycle, supported inputs, output format and cost of accepted clips rather than relying on an old list of video generators.

AI video generation APIs compared

The following selected API routes and prices were checked against provider documentation on December 4, 2026. Prices are in US dollars, before tax and other charges. These are documented capabilities, not results from a hands-on benchmark.

API routeExample modelBase output costUseful starting point
Gemini Developer APIGemini Omni 1.2 Flash, 720pAbout $0.0695/s plus input and other billed outputConversational video creation and editing
Runway DevGen-4 Turbo$0.05/sLower-cost clip generation
Runway DevGen-4.5$0.12/sEvaluate higher-tier Runway generation
Runway DevVeo 3.1 Fast, with audio$0.15/sEvaluate generated sound and motion
Runway DevVeo 3.1, with audio$0.40/sEvaluate standard-tier Veo output
OpenAI Videos APISora 2 / Sora 2 ProRetiredMigrate existing integrations

Older video API comparison guides from Fora Soft discuss useful engineering concerns, including asynchronous execution and the expense of repeated attempts. Their July 2026 model and price examples predate major provider changes. Use current official prices rather than copying the older tables. For general integration principles, see our AI API guide.

Gemini API for video generation

Google’s current Gemini Developer API video model is gemini-omni-1.2-flash. It supports text, image and eligible video inputs, and creates video with audio. The model reference lists output durations from three to fifteen seconds at 24 frames per second, with 360p, 720p, 1080p and 4K options. Interpolation and extension have additional duration restrictions. It uses the Interactions API; the older Veo generation calls are not interchangeable with this interface.

The older Veo 3.1 preview models were retired from the Gemini Developer API on October 22, 2026. Google’s developer forum directs teams that specifically need Veo 3.1 to the generally available models on Gemini Enterprise Agent Platform. Confirm separate project eligibility and pricing for that route. Google’s current pricing documentation also says requests to Gemini Omni 1.1 Flash automatically route to 1.2 Flash from December 3, 2026, at the newer model’s rates.

Gemini Omni 1.2 Flash charges $1.50 per million eligible input tokens, $9 per million text output tokens and $12 per million video output tokens. The documented 720p video consumption is 5,792 tokens per second, giving $0.069504 per second. Output rates vary with resolution. A ten-second 720p clip therefore costs about $0.695 for video output alone. No free API tier is listed for this model. For project credentials and billing setup, see our Gemini API key guide.

Runway API and third-party video models

For a comparison of free model access and credential requirements across providers, including Runway’s initial credit purchase, see our free API keys for AI guide.

Runway Dev offers generation through a common developer interface with its own models and selected partner models. Its developer credit costs one cent. At twelve credits per second, Gen-4.5 costs twelve cents per generated second; at five credits per second, Gen-4 Turbo costs five cents. Confirm the supported input type, aspect ratio and duration before sending a request.

For a project that needs generated audio, the Runway pricing table offers Veo 3.1 and Veo 3.1 Fast routes with different prices depending on audio configuration. The table also lists Gemini Omni 1.2 Flash through Runway at seven credits per second for 720p, plus charges for applicable reference images and input video. Third-party models are subject to the particular API route’s own pricing and capabilities, which may not match direct provider access.

Runway documents asynchronous tasks, SDK polling helpers and temporary result URLs. Once a job succeeds, retrieve the output and save authorized assets in your own storage. The returned URLs generally expire within 24 to 48 hours, so they should not become permanent links in your application.

What happened to the OpenAI video generation API?

OpenAI retired its Videos API and Sora 2 model family on September 24, 2026. The official deprecation table lists no direct equivalent replacement. A tutorial that still instructs developers to submit new Sora jobs using the former Videos API is therefore outdated.

If you maintain a legacy integration, inventory references to the removed endpoints and model IDs. Preserve existing assets if permitted by their terms, and replace the generation component with an active route after testing input constraints, media quality, billing and error handling. Do not assume an OpenAI image generation endpoint can generate a video file. The migration requires a new integration rather than a simple model name change.

How to calculate video API costs

For still images rather than video, see our free image generation API guide for quota and credit considerations.

Estimate the generated media you actually expect to pay for, including alternate takes that you reject during review. For a hypothetical campaign with 60 accepted five-second clips, two billed attempts per accepted clip produce 600 billed seconds. The following table applies the rates above to that volume and excludes any reference, text-output, storage, post-processing and delivery fees.

Model / route5s output600s output
Gemini Omni 1.2 Flash, 720p (direct)About $0.35About $41.70
Runway Gen-4 Turbo$0.25$30.00
Runway Gen-4.5$0.60$72.00
Runway Veo 3.1 Fast, audio$0.75$90.00
Runway Veo 3.1, audio$2.00$240.00

These are arithmetic estimates, not prices from completed video jobs. A provider may bill failed attempts differently from successfully generated clips that you choose not to use. The model must also support your intended duration and settings. If you generate two additional takes for every accepted clip instead of one, the volume rises from 600 to 900 seconds, increasing the output portion of the bill by 50%. For a token-based cost framework, see how much AI tokens cost.

How to integrate a video generation API

To edit existing recordings rather than generate new footage, see our Descript API guide for asynchronous import and editing workflows.

Video generation should usually run outside the original HTTP request. A user submits a job, the backend validates it and queues the work, and a worker submits the generation using a server-side credential. Return your internal job identifier to the user immediately. Track the provider identifier and status separately.

StageBackend responsibility
ValidateCheck allowed duration, resolution, prompt and authorized input assets; estimate maximum spend
SubmitReserve a job record and prevent duplicate submissions
MonitorPoll at the documented interval or use authenticated completion events where supported
RetrieveDownload the successful result, validate file metadata and store it securely
ReviewCheck output quality, usage rights and applicable disclosure requirements
ReconcileRecord actual usage, terminal status and cost against the job

Use bounded polling and backoff, not an indefinite loop in a web request handler. If a submission times out before returning an identifier, reconcile the request before retrying; otherwise you may start and pay for the same job twice. Provider-supported idempotency mechanisms can help, but do not assume every endpoint offers them. A local job lock is useful for preventing simultaneous workers from processing the same request.

Treat provider endpoints, credentials and model names as configuration. A small adapter can translate your common request into each provider’s supported fields and map its results to your own job states. Avoid quietly changing providers after a moderation rejection: return an appropriate explanation and preserve the applicable safety and rights requirements. See our AI deployment guide for production release considerations.

Production checks and provider selection

Evaluate the actual application workflow using a small set of authorized test prompts. A fictional product demonstration could ask for a five-second clip of an unbranded ceramic cup on a table, with a slow camera movement and no visible text. Test an original image-to-video example separately. Record whether the generated clip satisfies the intended framing, motion, duration and audio requirements.

Check the real output dimensions and duration rather than assuming the requested settings were applied. Include failure tests for rate limits, expired URLs, invalid inputs, insufficient credits and job cancellation. Evaluate latency, accepted-output cost and repeatability. Confirm that account terms permit the intended commercial use and review required consent, provenance and disclosure obligations before publishing. Never place a permanent secret in client-side code.

For simple hosted generation, direct Gemini access can make sense when conversational editing is central; Runway’s multiple-model interface can be useful when comparing supported generation routes. The lowest published price is not necessarily the lowest cost per usable clip. Choose after evaluating results under comparable conditions. This guide did not run paid generations.

Frequently asked questions

Is there an OpenAI video generation API? The former Sora Videos API retired on September 24, 2026. OpenAI lists no direct replacement in its deprecation table.

Can the Gemini API generate video? Yes. The paid Gemini Developer API supports Gemini Omni 1.2 Flash through the Interactions API. Legacy Veo preview endpoints have been retired.

How much does a video generation API cost? Charges depend on the selected model, resolution, duration, reference inputs and output type. For example, Runway lists Gen-4 Turbo at five cents per generated second.

Can I generate videos for free through an API? Some providers may offer trials or promotions, but availability and commercial terms vary. Gemini Omni 1.2 Flash does not list a free API tier.

Do video APIs return a finished video immediately? Long-running generation is commonly handled as an asynchronous task. Persist job state, monitor completion and retrieve the output using the documented method.