Media (Audio/Video)

Get a Signed Url

If you have a locally saved file and you want to upload it to our system using API, you'll have to follow through 3 simple steps:

Process

  1. Run this endpoint to retrieve an upload link for a placeholder on our storage bucket. You'll have preSignedUrl.

  2. This preSignedUrl is your ticket to which you PUT your local file using curl or any other HTTP client.

  3. Use "Upload your file with the Signed Url or External URL" to upload your file on Speak.

How does this work?

You can find more information about uploading a file using signed URLs here. If you still find this unenlightening, shoot a message to us on success@speakai.co!

Expiry

The link will expire in 2 hours.

get/media/upload/signedurl

Request

  • Base URL: https://api.speakai.co/v1
  • URL: https://api.speakai.co/v1/media/upload/signedurl
  • Auth: API key in header x-speakai-key and API key in header x-access-token

Query parameters

mediaType'audio' | 'video' required

The kind of file you are uploading. It decides the storage prefix, so it has to match the real file: a video signed as audio is stored as audio and can never be analysed as video. Required. The prefix is chosen before any bytes exist, so the server cannot work it out for you: omit it and the request is rejected. Nothing is read from the extension on filename.

filenamestring required

Filename with the extension is required

mimeTypestring

For example audio/mpeg, audio/mp4, audio/wav or video/mp4

Response

Success

Changes

No recorded changes to this operation across all 2 revisions of this API.