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
https://api.tryleap.ai
/
v1
/
uploads
Start a video or sound upload
curl --request POST \
--url https://api.tryleap.ai/v1/uploads \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"bytes": 123
}'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({bytes: 123})
};
fetch('https://api.tryleap.ai/v1/uploads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.tryleap.ai/v1/uploads"
payload = { "bytes": 123 }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "file_8Vb2Nc5Xm1Qz7Lk4Rt9Wd3Ph",
"object": "upload",
"content_type": "video/mp4",
"bytes": 48213992,
"filename": "interview.mp4",
"upload_url": "https://leap-media.public.blob.vercel-storage.com/media/uploads/file_8Vb2Nc5Xm1Qz7Lk4Rt9Wd3Ph",
"upload_method": "PUT",
"upload_headers": {
"x-api-version": "11",
"x-vercel-blob-access": "private",
"x-content-type": "video/mp4"
},
"expires_at": "2026-10-04T19:20:03.441Z"
}Authorizations
ApiKeyBearer
Your workspace API key, leap_.... Create one at https://app.tryleap.ai/go/api, and keep it on your server.
Body
application/json
Response
Where and how to send the bytes.
Where to send a video's or a sound's bytes before you complete the upload.
When upload_url stops working, an hour after it was made.
Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$⌘I
Start a video or sound upload
curl --request POST \
--url https://api.tryleap.ai/v1/uploads \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"bytes": 123
}'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({bytes: 123})
};
fetch('https://api.tryleap.ai/v1/uploads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.tryleap.ai/v1/uploads"
payload = { "bytes": 123 }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "file_8Vb2Nc5Xm1Qz7Lk4Rt9Wd3Ph",
"object": "upload",
"content_type": "video/mp4",
"bytes": 48213992,
"filename": "interview.mp4",
"upload_url": "https://leap-media.public.blob.vercel-storage.com/media/uploads/file_8Vb2Nc5Xm1Qz7Lk4Rt9Wd3Ph",
"upload_method": "PUT",
"upload_headers": {
"x-api-version": "11",
"x-vercel-blob-access": "private",
"x-content-type": "video/mp4"
},
"expires_at": "2026-10-04T19:20:03.441Z"
}