Video Editing with Picsart Create Editor

Explore a detailed example of how to integrate video editing capabilities of the Picsart Create Editor into your application.

This section presents an insightful example of how to integrate the Picsart Create Editor's video editing capabilities into your web application. The provided code snippet is a comprehensive guide, demonstrating the steps required to embed the editor and utilize its powerful video editing features.

Key aspects of the code example include:

  • SDK Integration: The code shows how to initialize the Picsart Create Editor with essential configurations such as API key, container ID, and mode selection, focusing specifically on video editing.
  • Export Settings Configuration: It outlines the process of setting up export formats and parameters, including resolution and frame rate for the output video.
  • Feature Selection: The example includes a selection of editing tools and functionalities that can be enabled in the editor, like color adjustment, cropping, rotation, trimming, and more, providing users with a comprehensive editing experience.
  • Handling Exports and Errors: The onExport and onError methods are used to handle the video export process and manage any errors that might occur, ensuring a smooth user experience.
  • Fetching Rendered Video: A practical demonstration of how to retrieve the exported video using the jobGuid. The example includes a polling mechanism to check the status of the video rendering and fetch the final video once ready.
  • Customization Options: The script shows how to customize various aspects of the editor, such as theme, text settings, and categories, making it adaptable to different use cases and preferences.
  • Advanced Features: The code snippet also hints at advanced functionalities like subtitle management and audio layer editing, providing insights into the rich capabilities of the Picsart Create Editor for video editing.

By examining this code example, you can gain a clear understanding of how to effectively embed and customize the Picsart Create Editor for video editing purposes in their own web applications. The example serves as a blueprint for creating a versatile and user-friendly video editing tool.

<!DOCTYPE html>
<html lang="en">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Video Example</title>

      html {
        height: 100%;

      body {
        height: 100%;
        padding: 20px 20px 0;
        font-family: Helvetica, Arial, sans-serif;
        display: flex;
        flex-direction: column;
        align-items: flex-end;

      .container {
        background: #ededed;
        width: 100%;
        height: 80%;
        margin-top: 20px;

      .button {
        cursor: pointer;

      iframe {
        border: none;

    <!-- container needed for SDK to be added -->
    <div id="containerId" class="container"></div>

    <script src=""></script>

      // Example of how getting the parameters through an url param - no need to use this part
      const queryString =;
      const urlParams = new URLSearchParams(queryString);
      const videoURL = urlParams.get('videoURL');
      const subtitleURL = urlParams.get('subtitleURL');

      // SDK integration
      const PicsartInstance = new Picsart({
        propertyId: '',
        containerId: 'containerId',
        apiKey: 'Your:_API_KEY',
        mode: 'video',
        exportFormats: ['video/mp4'],
        exportSettings: {
          'video/mp4': {
            fps: 30,
            resolution: '1080p',
        exportType: 'blob',
        theme: 'light',
        usePicsartInventory: true,
        features: {
          pulse: false,
          multiCanvasSupport: false,
          tools: [
        textSettings: {
          fontsFolderView: true,
        categories: {
          layout: {},
          uploads: {
            header: true,
            linkUpload: false,
          background: {
            tabs: ['Color', 'Upload'],
          text: {},
          elements: {},
          uploads: {
            header: true,
            tabs: ['Audio', 'Images'],
          subTitles: {
              uploadDescription: false,
              linkUpload: false,
              uploadButtonLabel: 'Upload subtitle',
              burn: true,

        dataURL: '',

      PicsartInstance.onExport((output) => {
        console.log('JOBID:', output.videoData.taskId);
        getExportedVideoURL(output.videoData.taskId, apiKey);

      PicsartInstance.onError((error) => {
        console.log('ERROR: ', error);
      });{ videoURL, subtitleURL });

      // Example to pull video render
      const getExportedVideoURL = async (jobGuid, apiKey) => {
        const delay = (ms) =>
          new Promise((resolve) => {
            setTimeout(resolve, ms);
        const fetchTask = (jobGuid, apiKey) => {
          const requestOptions = {
            headers: {
              'X-Picsart-API-Key': apiKey,
          return fetch(
          ).then((res) => {
            if (res.status > 199 && res.status < 300) {
              return res.json();
            throw Error('Failed to fetch VideoSdkApi ');
        const getData = (data) =>
 => === jobGuid);
        const getVideoURL = async (jobGuid, apiKey) => {
          try {
            const data = await fetchTask(jobGuid, apiKey);
            const { status, progress, result } = getData(data);
            console.log('status=', status);
            console.log('progress=', progress);
            if (!result) {
              await delay(3000);
              return await getVideoURL(jobGuid, apiKey);
  , '_blank');
          } catch (e) {
              '-----> error while fetching result video url <------',

        await getVideoURL(jobGuid, apiKey);