Files

Start a video or sound upload

The first of three steps for a video or a sound: this answers with a URL. PUT the file's bytes there with exactly upload_headers within the hour, then complete the upload. Up to 1 GB of video (MP4, MOV, WebM) or 500 MB of audio (MP3, WAV, M4A), and up to 4 hours long. Needs credit on your balance. A workspace can upload 5 GB a day, with 10 uploads in flight at once.

Needs an API key with the generations:write scope.

post/v1/uploads

Request

  • Base URL: https://api.tryleap.ai
  • URL: https://api.tryleap.ai/v1/uploads
  • Auth: one of:
    • API key in header x-api-key
    • HTTP bearer

Request body

content_type'video/mp4' | 'video/quicktime' | 'video/webm' | 'audio/mpeg' | 'audio/mp3' | 'audio/wav' | 'audio/x-wav' | 'audio/wave' | 'audio/mp4' | 'audio/x-m4a' required

The file's type: MP4, MOV or WebM video; MP3, WAV or M4A audio.

bytesinteger required

The file's exact size in bytes.

filenamestring

A name to keep with the file, such as interview.mp4.

Response

Where and how to send the bytes.

idstring required

The upload's ID, file_.... Completing it makes a file with the same ID.

object'upload' required
content_typestring required

The type you declared.

bytesinteger required

The size you declared, in bytes.

filenamestring nullable required

The name you gave, if any.

upload_urlstring required

Where to send the file's bytes.

upload_method'PUT' required

The method to send them with.

upload_headersobject required

Headers to send with the bytes, exactly as given.

expires_atstring date-time required

When upload_url stops working, an hour after it was made.

Changes

No recorded changes to this operation across all 1 revision of this API.