Set up your API for Lipsync with Local Folders

Here is a quickstart guide to setting up your API with local folders. Go through the tabs for node.js or python!

Step 1 - Start a new Node.js project with npm init

Install node-fetch and add your API key

  1. Start a new node.js project

  2. Install node-fetch and add your API key

$ npm init -y
$ npm install node-fetch
$ export GOOEY_API_KEY=sk-xxxx 

Step 2 - Setup up your local folders with input files

To use GOOEY.AI lipsync tool you need two types of input files for the project:

  1. Input face

    • This is refered to as input_face in the API

    • Use the following formats - mp4 / mov / png / jpg

    • Ensure the face has clear human features with eyes, nose, lips. Non-human faces will not work

  2. Input audio

    • This is referred to as input_audio

    • Use the following formats only - wav / mp3

For ease of use make sure the folders are all located in the same project. In this example, we have added the input_face and input_audio in the folder lipsync-bulk.

Step 3 - Create your app file

Create your index.js file

Copy the example code below to test your API call.

// save this in index.js

import fetch, { FormData, fileFrom } from 'node-fetch';

const payload = {};

async function gooeyAPI() {
  const formData = new FormData()
  formData.set('json', JSON.stringify(payload))
  // add the path to your input face
  formData.append('input_face', await fileFrom('lipsync-bulk/image.png'))
  // add the path to your input audio
  formData.append('input_audio', await fileFrom('lipsync-bulk/audio_2024-03-26_11-00-36.ogg.wav'))

  const response = await fetch("", {
    method: "POST",
    headers: {
      "Authorization": "Bearer " + process.env["GOOEY_API_KEY"],
    body: formData,

  if (!response.ok) {
    throw new Error(response.status);

  const result = await response.json();
  console.log(response.status, result);


Replace with your file paths

In the code above, replace the file paths as per the location of your local file location.

//this is the code snippet that needs to be replaced 

formData.append('input_face', await fileFrom('lipsync-bulk/image.png'))
formData.append('input_audio', await fileFrom('lipsync-bulk/audio_2024-03-26_11-00-36.ogg.wav'))

Step 4 - Run your app

Test if your app is working correctly


$ node index.js 

If you did everything correctly should get a response like this:

200 {
  id: 'm0rghxk55xfx',
  url: '',
  created_at: '2024-03-26T06:01:57.449762',
  output: {
    output_video: ''

Last updated