New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

@makeaivideo/sdk

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@makeaivideo/sdk

Official TypeScript/JavaScript SDK for MakeAIVideo, the AI video generator API: turn a prompt or script into a finished video (voiceover, AI or stock scenes, captions, music) and post it to TikTok, Instagram Reels, YouTube Shorts and more.

latest
Source
npmnpm
Version
1.1.2
Version published
Maintainers
1
Created
Source

MakeAIVideo SDK for TypeScript and JavaScript

npm version license: MIT types: TypeScript

@makeaivideo/sdk is the official TypeScript and JavaScript SDK for the MakeAIVideo API: it lets your code turn a brief or a script into a finished AI video (script, AI voiceover, AI or stock scenes, captions and music) and post it to connected TikTok, Instagram, YouTube and other social accounts.

MakeAIVideo is an AI video generator for short-form video. The SDK wraps the REST API (SDK guide) and returns MP4s sized for TikTok, Instagram Reels and YouTube Shorts.

  • Typed client for every endpoint: videos, scripts, tools, characters, voices, music, ideas, templates, publishing, webhooks
  • Post or schedule finished videos to TikTok, Instagram, YouTube, Facebook Pages, LinkedIn, X, Threads, Pinterest, Bluesky, Telegram and Discord
  • waitForReady() polling helper that respects the API's poll_after_seconds
  • Automatic retries on rate limits and server errors, typed errors, idempotent creates
  • Webhook signature verification
  • Zero runtime dependencies, ESM and CommonJS, Node 18+

Install

npm install @makeaivideo/sdk

Get an API key (it starts with mav_) in the developer settings. New to the API? Read the quickstart and authentication guide.

Quickstart: brief in, MP4 out

import { MakeAIVideo } from "@makeaivideo/sdk"

const mav = new MakeAIVideo({ apiKey: process.env.MAKEAIVIDEO_API_KEY! })

// 1. See the video tools and the fields each one asks for
const tools = await mav.tools.list() // explainer, listicle, story, ugc, demo, article, spokesperson

// 2. Quote the cost, then create
const quote = await mav.videos.estimate({ tool: "explainer", duration_seconds: 30 })
const { video_id } = await mav.videos.create({
  tool: "explainer",
  fields: { topic: "Why octopuses have three hearts" },
  duration_seconds: 30,
  aspect_ratio: "9:16",
})

// 3. Wait for the render and download it
const video = await mav.videos.waitForReady(video_id, {
  onProgress: (v) => console.log(v.status),
})
console.log(video.download) // MP4 URL

Bring your own script

const script = await mav.videos.script({ topic: "3 facts about the deep sea", target_duration: 30 })
// edit script.script as you like, then shoot it as written:
await mav.videos.create({ script: script.script, mode: "stock-narrated" })

Post the video to social accounts

// Connected accounts (acc_... ids). To add one, send a person to the link from connect().
const { accounts } = await mav.publishing.accounts.list()
const { url } = await mav.publishing.accounts.connect("tiktok") // a PERSON opens this link

// Post now, or pass scheduled_for (ISO 8601) to schedule it
const post = await mav.publishing.publish(video_id, {
  account_ids: ["acc_..."],
  caption: "Why octopuses have three hearts #science",
  idempotency_key: "octopus-2026-10-01",
})
const status = await mav.publishing.posts.get(String(post.id)) // or subscribe to post.published / post.failed

Supported: TikTok, Instagram (as a Reel), YouTube (9:16 as a Short, 16:9 as a regular video), Facebook Pages, LinkedIn, X (videos up to 140 seconds), Threads and Pinterest connect by link; Bluesky, Telegram and Discord connect in the web app. See auto-post.

Webhooks instead of polling

import { verifyWebhookSignature } from "@makeaivideo/sdk"

const hook = await mav.webhooks.create({ url: "https://example.com/hooks/makeaivideo", events: ["video.ready", "video.failed"] })
// store hook.secret, then in your handler (raw body!):
if (!verifyWebhookSignature(rawBody, req.headers["x-makeaivideo-signature"], secret)) throw new Error("bad signature")

See the webhooks guide for events and retries.

Errors

Every failure is a MakeAIVideoError with status, code and requestId. Subclasses: AuthenticationError (401), PermissionError (403, missing key scope), ValidationError (400), InsufficientCreditsError (402), NotFoundError (404), RateLimitError (429), VideoFailedError (render failed while waiting).

API coverage

AreaMethods
Accountme(), credits(), workspace.get/update
Videosvideos.list/create/get/update/delete/generate/cancel/download/estimate/waitForReady, videos.renders.*, videos.regenerateScene, videos.voice.get/set, videos.captions, videos.shareLink
Scriptsvideos.script, videos.scriptify, videos.fetchUrl, ai.enhancePrompt, ideas.generate
Assetstools.list, templates.list, characters.*, voices.list/preview, music.list/generate, uploads.referenceFromUrl, brandKit.get/update
Publishingpublishing.accounts.list/connect, publishing.publish, publishing.posts.list/get
Webhookswebhooks.list/create/get/update/delete/test/deliveries

Full endpoint reference: makeaivideo.ai/docs/api.

What you can make with MakeAIVideo

MakeAIVideo turns almost any starting point into a finished short-form video. Start from a single idea with prompt to video, or bring your own words with script to video and blog to video, which narrates a blog post you paste in. To teach a topic, AI explainer videos add voiceover, scenes, captions and music in one pass.

For a presenter on screen, AI talking avatar videos lip-sync a presenter you pick, or one made from your own reference photo, to a script. AI spokesperson videos suit corporate messaging you want to re-render when details change, and AI UGC video ads put an AI spokesperson on your ad script for Meta and TikTok. Character swap replaces the person in a video you upload while the motion and audio stay as filmed.

From a still image, image to video turns product shots, landscapes and album art into a moving clip, and animate a photo brings portraits, pets and old family photos to life.

Every video is sized for short-form platforms: use the TikTok video generator, the Instagram Reels generator or the AI YouTube Shorts generator, or run a faceless YouTube channel without filming. When a video is ready, auto-post to social media posts or schedules it to TikTok, Instagram, YouTube, Facebook Pages, LinkedIn, X, Threads, Pinterest, Bluesky, Telegram and Discord. Plans and credits are on the MakeAIVideo pricing page, and AI assistants connect through the MakeAIVideo MCP server setup guide.

From code, videos.create() covers the brief-driven tools (explainer, listicle, story, UGC, demo, article and spokesperson) and your own scripts, and publishing.publish() posts the result. The API reference lists exactly what each endpoint accepts.

FAQ

What is MakeAIVideo? An AI video generator that turns a prompt, script, image or talking avatar into a finished short-form video with voiceover, scenes, captions and music, then posts or schedules it to connected social accounts. Learn more.

What is @makeaivideo/sdk? The official, MIT-licensed TypeScript/JavaScript client for the MakeAIVideo REST API (https://app.makeaivideo.ai/api/v1). Node 18+, ESM and CommonJS, zero runtime dependencies.

Can it post videos to TikTok, Instagram or YouTube? Yes. publishing.publish() posts a finished video now or on a schedule to accounts connected to your workspace: TikTok, Instagram, YouTube, Facebook Pages, LinkedIn, X, Threads, Pinterest, Bluesky, Telegram and Discord.

Can I use it from Claude, ChatGPT or Cursor instead of code? Yes: connect the MakeAIVideo MCP server at https://mcp.makeaivideo.ai, or install @makeaivideo/mcp.

How long does a video take? Minutes. Create returns at once with a video_id; poll with waitForReady() or subscribe to the video.ready webhook.

How is it priced? MakeAIVideo is a paid product with monthly plans and a 7-day trial (card required). API calls use the same credits as the app, and videos.estimate() quotes the cost before you create. See pricing.

Where do I get support? Open an issue or email support@makeaivideo.ai.

About MakeAIVideo

MakeAIVideo is an AI video generator that turns a brief, a prompt, your own script, an image or a talking avatar into a finished, captioned short-form video: script, AI voiceover, AI-generated or stock scenes, captions and music, exported as an MP4 ready for TikTok, Instagram Reels and YouTube Shorts. It also does character swap, and posts or schedules videos to connected TikTok, Instagram, YouTube, Facebook Pages, LinkedIn, X, Threads, Pinterest, Bluesky, Telegram and Discord accounts. Operated by MintClips Ltd (UK).

PackageWhat it is
@makeaivideo/sdkTypeScript / JavaScript SDK for the REST API
@makeaivideo/mcpMCP server for Claude, ChatGPT, Cursor and other AI assistants
@makeaivideo/cliCommand line tool: brief in, MP4 out

License

MIT © MakeAIVideo

Keywords

makeaivideo

FAQs

Package last updated on 30 Sep 2026

Related posts