Quickstart

Follow the next steps to generate your first video using Colossyan's API.

  1. Grab your token as described in the Authentication page.

  2. Send your first request

const token = "<paste-your-token-here>";
const api = "https://app.colossyan.com/api/v1";

const job = {
  videoCreative: {
    settings: {
      name: "My first video",
      videoSize: {
        width: 1920,
        height: 1080
      }
    },
    scenes: [
      {
        tracks: [
          {
            type: "actor",
            position: { x: 420, y: 0 },
            size: { width: 1080, height: 1080 },
            actor: "karen",
            text: "This is my first video generated with Colossyan! Amazing!",
            speakerId: "aquXcfLbkxpW4BBI5qKm"
          }
        ]
      }
    ]
  }
};

const response = await fetch(`${api}/video-generation-jobs`, {
  method: "POST",
  headers: {
    Authorization: `Bearer ${token}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify(job),
});

const result = await response.json();
console.log(result); // { id, videoId }
  1. If you successfully sent the request, you should have received two things in return.

    1. An id that you can use to delete or request status updates on the job

    2. A videoId that you'll be able to query the generated video with once it's ready.

  2. Navigate to the workspace where you have created your API key. You should see the video generate. Once it's ready, it should look exactly like this

  1. Congratulations! 🎉 You just generated your first video using our API!

Last updated

Was this helpful?