Upload an image
curl --request POST \
--url https://api.presenton.ai/api/v3/images/upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file'import requests
url = "https://api.presenton.ai/api/v3/images/upload"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.presenton.ai/api/v3/images/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"user": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"path": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_uploaded": false,
"extras": {},
"url": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Files and Images
Upload image (Cloud)
Upload an image and return the identifier used by presentation workflows.
POST
/
api
/
v3
/
images
/
upload
Upload an image
curl --request POST \
--url https://api.presenton.ai/api/v3/images/upload \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file'import requests
url = "https://api.presenton.ai/api/v3/images/upload"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.presenton.ai/api/v3/images/upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"user": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"path": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_uploaded": false,
"extras": {},
"url": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
multipart/form-data
Was this page helpful?