Upload Files And Queue Embedding
curl --request POST \
--url https://new.scispot.io/files/store-and-embed \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form files=sample-report.pdf \
--form isGlobal=false \
--form 'fileSource=AI Lab Drive'const form = new FormData();
form.append('files', 'sample-report.pdf');
form.append('isGlobal', 'false');
form.append('fileSource', 'AI Lab Drive');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://new.scispot.io/files/store-and-embed', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://new.scispot.io/files/store-and-embed"
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\nsample-report.pdf\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"isGlobal\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fileSource\"\r\n\r\nAI Lab Drive\r\n-----011000010111000001101001--"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)[
{
"fileName": "example.pdf",
"fileId": "<uuid>",
"ticketId": "<uuid>",
"status": "success",
"message": "File uploaded successfully and queued for processing"
}
]
Files API
Upload Files And Queue Embedding
Upload files the same way as /files/store, and also embed file content into MongoDB.
Embedding makes the files available to AI Lab Drive and enables frontend content previews
for supported types such as HTML, XLSX, DOCX, and PDF. Requires Authorization: Bearer token.
isGlobal is interpreted as a string boolean and fileSource defaults to AI Lab Drive.
Supported file extensions for embedding: pdf, docx, xlsx, xls, csv, pptx, md, txt, html, htm, json, jsonl, jpg, jpeg, png, gif, heic, heif, prism, eds, skax, edt, tif, tiff, g2i, zip, cs, c, asc, kfx2, msg, emf, cbz, pse.
POST
https://new.scispot.io
/
files
/
store-and-embed
Upload Files And Queue Embedding
curl --request POST \
--url https://new.scispot.io/files/store-and-embed \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form files=sample-report.pdf \
--form isGlobal=false \
--form 'fileSource=AI Lab Drive'const form = new FormData();
form.append('files', 'sample-report.pdf');
form.append('isGlobal', 'false');
form.append('fileSource', 'AI Lab Drive');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://new.scispot.io/files/store-and-embed', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://new.scispot.io/files/store-and-embed"
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\nsample-report.pdf\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"isGlobal\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fileSource\"\r\n\r\nAI Lab Drive\r\n-----011000010111000001101001--"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)[
{
"fileName": "example.pdf",
"fileId": "<uuid>",
"ticketId": "<uuid>",
"status": "success",
"message": "File uploaded successfully and queued for processing"
}
]
Authorizations
Body
multipart/form-data
⌘I
