Chat-id routes
Upload documents (chat id)
Upload into a Deep Reader chat.
POST
/
api
/
v2
/
documents
/
Upload documents
curl --request POST \
--url https://api.example.com/api/v2/documents/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form files=@example-file \
--form 'target_language=<string>'import requests
url = "https://api.example.com/api/v2/documents/"
files = { "files": ("example-file", open("example-file", "rb")) }
payload = { "target_language": "<string>" }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('files', '<string>');
form.append('target_language', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.example.com/api/v2/documents/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"documents": [
{
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"status": "<string>",
"progress": 123,
"stage": "<string>",
"page_count": 123,
"file_type": "<string>",
"file_name": "<string>",
"completed_at": "<string>",
"summary": "<string>",
"has_extraction": true,
"has_translation": true,
"has_overrides": true,
"has_warnings": true,
"snippet": "<string>",
"score": 123,
"title": "<string>"
}
],
"skipped": [
{
"file_name": "<string>",
"reason": "<string>"
}
]
}Uploads into a Deep Reader chat. Completing extraction is a single-document page charge. PDF and images only; 64 MB; up to 20 files.
Authorizations
extractApiKeybearerAuthcookieAuth
⌘I
Upload documents
curl --request POST \
--url https://api.example.com/api/v2/documents/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form files=@example-file \
--form 'target_language=<string>'import requests
url = "https://api.example.com/api/v2/documents/"
files = { "files": ("example-file", open("example-file", "rb")) }
payload = { "target_language": "<string>" }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('files', '<string>');
form.append('target_language', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.example.com/api/v2/documents/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"documents": [
{
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"status": "<string>",
"progress": 123,
"stage": "<string>",
"page_count": 123,
"file_type": "<string>",
"file_name": "<string>",
"completed_at": "<string>",
"summary": "<string>",
"has_extraction": true,
"has_translation": true,
"has_overrides": true,
"has_warnings": true,
"snippet": "<string>",
"score": 123,
"title": "<string>"
}
],
"skipped": [
{
"file_name": "<string>",
"reason": "<string>"
}
]
}
