Send a Video File From Next.js for Processing Using Symbl AI Video Async API

Vladimir Novick
InstructorVladimir Novick
Share this video with your friends

Social Share Links

Send Tweet
Published 3 years ago
Updated 3 years ago

In this video lesson, you will learn how to send a video for processing to Symbl Async Video API. As a result you will get some parameters that you can use later on to retrieve insights about the video

Vladimir Novick: [0:00] Let's create Submit file for processing a function. This function will take a file, and we'll call Symbl API. We'll use video async API, go into api.symbl.ai/v1/process/video, and passing method as POST, and a bunch of headers.

[0:37] One important header to pass is x-api-key. Here, we need to post our token. A second header is Content-Type. Content-Type will be video/mp4. We'll also need to pass a body, which will be the file. We'll set JSON as true.

[1:03] Now, we need to bring our token. We can use useAuth hook for that. Let's bring this hook from our hooks/index.js. Whenever we receive a response from our Symbl API, we'll need to get rawResult and pass the JSON. Then we can log the JSON result.

[2:00] Let's see if it's working. Let's choose some test mp4 file. Click, Send and Processing. Within the Network tab, we'll see that video is sent. We can look at the headers. We'll see that our x-api-key is the actual token. The Console log, we'll see that we get back ConversationID and JobID.

egghead
egghead
~ 15 seconds ago

Member comments are a way for members to communicate, interact, and ask questions about a lesson.

The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io

Be on-Topic

Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.

Avoid meta-discussion

  • This was great!
  • This was horrible!
  • I didn't like this because it didn't match my skill level.
  • +1 It will likely be deleted as spam.

Code Problems?

Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context

Details and Context

Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!

Markdown supported.
Become a member to join the discussionEnroll Today