Create Asset Direct Upload

​

This endpoint creates a video asset allowing upload of a video from the local file system and ingest media content into the Gumlet system for processing and delivery. Body parameters are the same as the Create Asset body parameters except for the input parameter, which this endpoint does not take. A successful response will be returned with upload_url field. You can make PUT request to that URL to upload video. To upload video using upload_url refer to this.

Body

application/json
  • Gumlet video workspace id.

  • Add additional Audio / Subtitle tracks to Gumlet for transcoding and delivery along with video asset track.

    Properties: 4
  • Create an animated GIF from the video.

    Properties: 5
  • This flag allows Gumlet to transcode and deliver audio-only in the specified format. In this case, video transformation and thumbnails/animated GIFs would not be created. Default: false

  • A CTA is an explicit prompt within the video content encouraging viewers to take a particular action.

    Properties: 8
  • This transformation can be used to crop the video by defining a rectangular area within the dimensions of the output video.

    Properties: 4
  • Attach some textual data with the asset. This field is neither searchable nor filterable.

  • Enable DRM encryption for transcoded videos. Gumlet supports Widevine and FairPlay DRMs.

  • Add this asset to an existing folder by folder_id.

  • Transcode and deliver the asset in the requested format. The options can be one of ABR (HLS + DASH) and MP4.

  • Gumlet allows you to generate subtitles from the audio stream (use ISO 639-1 Language Codes)

    Properties: 2
  • Resize video with the given height. Can be an absolute value in pixels or a percentage value with the % suffix. Specified values greater than the original asset height will be ignored. Applicable only when specified format is MP4.

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/video/assets/upload
import Gumlet from '@gumlet/nodejs-sdk';

const client = new Gumlet({
  apiKey: process.env['API_KEY'], // defaults to the API_KEY env var
});

const videoAsset = await client.videoAssets.upload({
  format: 'ABR',
  collection_id: '646df1c9173a4a2fcac180b4',
  description: 'some description',
  tag: ['ball'],
  profile_id: '646df1c9173a4a2fcac180b7',
  playlist_id: '6597acd5ed6f26a9c5ca9633',
  metadata: { headermeta: 'metavalue' },
  call_to_actions: [
    {
      start_time: 1,
      end_time: 90,
      text: 'some test',
      url: 'https://some-url.com',
      position_from_top: 11,
      position_from_right: 23,
      font_color: '#000001',
      background_color: '#ffffff',
    },
  ],
  folder: '697375fbfa2d1037283140e4',
});

console.log(videoAsset);
{
  "asset_id": "65b169dfe99b77f116c0e4aa",
  "progress": 0,
  "created_at": 1706125793055,
  "updated_at": 1706125793055,
  "status": "upload-pending",
  "tag": [
    "games",
    "field"
  ],
  "source_id": "646df1c9173a4a2fcac180b4",
  "collection_id": "646df1c9173a4a2fcac180b4",
  "input": {
    "transformations": {
      "format": "hls",
      "resolution": [
        "360p",
        "480p",
        "540p",
        "720p",
        "1080p"
      ],
      "audio_codec": [
        "aac"
      ],
      "video_codec": [
        "libx264"
      ],
      "thumbnail": [
        "auto"
      ],
      "thumbnail_format": "png",
      "mp4_access": false,
      "per_title_encoding": false,
      "original_deleted": true
    },
    "profile_id": "646df1c9173a4a2fcac180b7",
    "title": "Sports.",
    "description": "This video provides information about various sports.",
    "metadata": {
      "headermeta": "metavalue"
    },
    "source_url": "646df1c9173a4a2fcac180b4/65b169dfe99b77f116c0e4aa/origin-65b169dfe99b77f116c0e4aa",
    "call_to_actions": [
      {
        "start_time": 1,
        "end_time": 90,
        "text": "Buy here!!",
        "url": "https://some-buy-url-site.com",
        "html_target": "_blank"
      }
    ]
  },
  "output": {
    "format": "hls",
    "status_url": "https://api.gumlet.com/v1/video/assets/65b169dfe99b77f116c0e4aa",
    "playback_url": "https://dev-video.gumlet.io/646df1c9173a4a2fcac180b4/65b169dfe99b77f116c0e4aa/main.m3u8",
    "thumbnail_url": [
      "https://dev-video.gumlet.io/646df1c9173a4a2fcac180b4/65b169dfe99b77f116c0e4aa/thumbnail-1-0.png?v=1706125793055"
    ]
  },
  "upload_url": "https://gumlet-video-user-uploads.s3-accelerate.dualstack.amazonaws.com/gumlet-user-uploads-dev-deletable/646df1c9173a4a2fcac180b4/65b169dfe99b77f116c0e4aa/origin-65b169dfe99b77f116c0e4aa?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA4WNLTXWDAC3AKBPV%2F20240124%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20240124T194953Z&X-Amz-Expires=3600&X-Amz-Signature=b724bd728efd589ec6cb4d0fab17947448c02788823619433720e8fddf0f1155&X-Amz-SignedHeaders=host&x-id=PutObject",
  "playlists": [
    "6597acd5ed6f26a9c5ca9633"
  ]
}