Embedding Your VidGPT Videos on Any Website
Copy one script tag and every article on your site automatically gets its matching AI video embedded.
Embedding Your VidGPT Videos on Any Website
Once VidGPT has generated videos for your site, you can embed them anywhere with a single <script> tag. Add it once and every page that has a matching video gets a player injected automatically — no per-page work required.
Watch the Video Tutorial
Here's the full embed setup, step by step:
Get the Embed Code
It looks like this:
<script src="https://vidgpt.app/widget.js" data-site-id="your-site-id" defer></script>
When the script loads on a page, it calls VidGPT with that page's URL, and if a matching generated video exists it injects a responsive player right into the article — landscape or portrait, matching whatever aspect ratio you rendered the video in.
Plain HTML Site
Paste the snippet anywhere on the page — it doesn't need to be at the end of <body>, since it loads with defer:
<!DOCTYPE html>
<html>
<head>...</head>
<body>
<!-- your page content -->
<script src="https://vidgpt.app/widget.js" data-site-id="your-site-id" defer></script>
</body>
</html>
The widget fetches lazily and fails silently if no video matches, so it never breaks a page.
WordPress
Option A — Theme Editor (classic themes)footer.php.</body> and click Update File.Single).Next.js
Add the widget once in your root layout so it loads on every page.
App Router (app/layout.tsx)
import Script from "next/script";
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>
{children}
<Script
src="https://vidgpt.app/widget.js"
data-site-id="your-site-id"
strategy="lazyOnload"
/>
</body>
</html>
);
}
Pages Router (pages/_document.tsx)
import { Html, Head, Main, NextScript } from "next/document";
import Script from "next/script";
export default function Document() {
return (
<Html lang="en">
<Head />
<body>
<Main />
<NextScript />
<Script
src="https://vidgpt.app/widget.js"
data-site-id="your-site-id"
strategy="lazyOnload"
/>
</body>
</Html>
);
}
Use Next.js <Script> (not a plain <script> tag) so Next.js manages the loading strategy correctly.
Webflow
Shopify
layout/theme.liquid and paste the snippet just before </body>.Wix
Squarespace
Controlling Placement
By default the player is inserted right before your article body starts. You can override this per script tag:
<script
src="https://vidgpt.app/widget.js"
data-site-id="your-site-id"
data-position="after-first-paragraph"
data-target=".post-content"
data-max-width="720"
data-radius="12"
defer
></script>
data-position—"before-content"(default),"top","after-first-paragraph", or"bottom"data-target— CSS selector for the content container (default: auto-detectsarticle,.post-content,main, etc.)data-max-width— max player width in px (default720)data-radius— player border radius in px (default12)
Default placement, intro text shown above the player, and whether the "More info" backlink appears are all configurable per-site from the Sites dashboard.
Embedding a Single Video
Prefer to place one specific video by hand instead of the auto-matching widget? Open the site's Embed tab and copy the iframe for any finished video:
<iframe
src="https://vidgpt.app/embed/your-video-id"
width="100%"
height="405"
style="border:0;border-radius:12px;aspect-ratio:16/9"
allow="autoplay; fullscreen; picture-in-picture"
allowfullscreen
></iframe>
This same URL (https://vidgpt.app/embed/your-video-id) is a standalone hosted player, so you can also share it directly as a link.
Downloading the Video File
Prefer a local file instead of embedding? Open any completed video from your dashboard and click Export & Download to get an MP4 in the aspect ratio you generated it in (16:9 landscape or 9:16 portrait).
