Upload Files V1
curl --request POST \
--url https://api.presenton.ai/api/v3/files/upload \
--header 'Authorization: <authorization>' \
--header 'Content-Type: multipart/form-data' \
--form 'files=<string>'import requests
url = "https://api.presenton.ai/api/v3/files/upload"
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
headers = {
"Authorization": "<authorization>",
"Content-Type": "multipart/form-data"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const form = new FormData();
form.append('files', '<string>');
const options = {method: 'POST', headers: {Authorization: '<authorization>'}};
options.body = form;
fetch('https://api.presenton.ai/api/v3/files/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
"<string>"
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Files
Upload Files V1
Upload files to be used later.
Create an API Key from your account to access this endpoint. Authorization: Bearer sk-presenton-xxxxxxxx
POST
/
api
/
v3
/
files
/
upload
Upload Files V1
curl --request POST \
--url https://api.presenton.ai/api/v3/files/upload \
--header 'Authorization: <authorization>' \
--header 'Content-Type: multipart/form-data' \
--form 'files=<string>'import requests
url = "https://api.presenton.ai/api/v3/files/upload"
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
headers = {
"Authorization": "<authorization>",
"Content-Type": "multipart/form-data"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const form = new FormData();
form.append('files', '<string>');
const options = {method: 'POST', headers: {Authorization: '<authorization>'}};
options.body = form;
fetch('https://api.presenton.ai/api/v3/files/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
"<string>"
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Was this page helpful?
⌘I