Files
Complete an upload
After the PUT, makes the upload a file with the same ID, ready to pass in a model’s input. Send a JSON body, even an empty one ({}). The file’s type and length are read from its bytes.
Needs an API key with the generations:write scope.
POST
https://api.tryleap.ai
/
v1
/
uploads
/
{id}
/
complete
Complete an upload
curl --request POST \
--url https://api.tryleap.ai/v1/uploads/{id}/complete \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"filename": "<string>"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({filename: '<string>'})
};
fetch('https://api.tryleap.ai/v1/uploads/{id}/complete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.tryleap.ai/v1/uploads/{id}/complete"
payload = { "filename": "<string>" }
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": "file",
"content_type": "video/mp4",
"bytes": 48213992,
"width": 1920,
"height": 1080,
"duration": 312.4,
"filename": "interview.mp4",
"url": "https://api.tryleap.ai/files/eyJrIjoibWVkaWEvb3V0cHV0cy9nZW5fN0hxMm1WeDlMcjRLcDhUbjNXYzZZYjFEIn0",
"created_at": "2026-10-04T18:21:17.902Z"
}
Authorizations
ApiKeyBearer
Your workspace API key, leap_.... Create one at https://app.tryleap.ai/go/api, and keep it on your server.
Response
The stored file.
A photo, video or sound stored in your workspace, to pass as a model input.
When it was stored.
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
Complete an upload
curl --request POST \
--url https://api.tryleap.ai/v1/uploads/{id}/complete \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"filename": "<string>"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({filename: '<string>'})
};
fetch('https://api.tryleap.ai/v1/uploads/{id}/complete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.tryleap.ai/v1/uploads/{id}/complete"
payload = { "filename": "<string>" }
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": "file",
"content_type": "video/mp4",
"bytes": 48213992,
"width": 1920,
"height": 1080,
"duration": 312.4,
"filename": "interview.mp4",
"url": "https://api.tryleap.ai/files/eyJrIjoibWVkaWEvb3V0cHV0cy9nZW5fN0hxMm1WeDlMcjRLcDhUbjNXYzZZYjFEIn0",
"created_at": "2026-10-04T18:21:17.902Z"
}