We use cookies. Cookies and browser storage keep you signed in and remember your preferences. With your permission we also measure how the site is used. You can any time. See our cookie policy.

Video widget

AI video generator widget code for your website

Add an AI video generator to your site with one script tag. Visitors describe a scene and the widget generates a short clip and plays it when it is ready.

Published:

Text to video models can turn a sentence into a short clip. A video widget brings that to your page: a visitor describes a scene, the model generates it in the background, and the clip plays in the widget with a download link when it is ready.

How the video widget works

Video takes longer to generate than text or images, so the widget works in two steps:

  1. The visitor submits a prompt. The widget starts a video job and shows that it is working.
  2. The widget checks the job until the video is ready, usually within a few minutes, then plays it and offers a Download link.

The visitor can keep the page open while the job runs. Only the widget that started a job can check it or download its result.

Embed the code

Create a widget in Widgets, choose Video and save. Then copy:

<script src="https://api14.com/widget.js" data-widget="YOUR_WIDGET_ID" async></script>

Place it where the generator should appear. data-target renders it into an existing element, and data-height sets its height (420px by default). The Floating button placement opens it from a corner button instead.

Duration and resolution are set for you

Video models offer different durations and resolutions, and leaving them open makes the cost unpredictable. The widget always asks for the supported duration closest to 5 seconds and the resolution closest to 720p. That keeps clips short and the price per request consistent.

Choose a model and an API key

  • Model: the picker lists the video models with their prices. Models that only edit or upscale an existing video are not suitable, because the widget starts from text.
  • API key: every widget runs under one of your API keys. Pick one, or select Create new API key at the end of the list to make a dedicated key. Its daily spend limit, request rate and allowed models apply to every job the widget starts.

Set expectations on the page

Tell visitors that a clip takes a little while and that results are AI generated. A placeholder such as "A paper boat sailing down a rainy street, cinematic" shows them what a good prompt looks like.

Before you publish

  • Add your domains under Settings, Widget sites.
  • Set a daily spend limit on the widget and on the key.
  • Generate two or three clips in the editor preview to see the timing and quality.

Read the video docs for model details and design your widget on the widgets page.