Retrieve a document
curl --request GET \
--url https://api.lighton.ai/api/v2/files/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.lighton.ai/api/v2/files/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.lighton.ai/api/v2/files/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 123,
"object": "<string>",
"created_at": 123,
"filename": "<string>",
"purpose": "<string>",
"status": "<string>",
"signature": "<string>",
"content": "<string>"
}Files
Retrieve a document
deprecated
Deprecated — this endpoint will be removed in a future release. Use GET /api/v3/files/{id} instead.
Retrieve a single document by its ID.
Only documents that the requesting user is authorized to access will be returned.
GET
/
api
/
v2
/
files
/
{id}
Retrieve a document
curl --request GET \
--url https://api.lighton.ai/api/v2/files/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.lighton.ai/api/v2/files/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.lighton.ai/api/v2/files/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 123,
"object": "<string>",
"created_at": 123,
"filename": "<string>",
"purpose": "<string>",
"status": "<string>",
"signature": "<string>",
"content": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the document to retrieve.
Query Parameters
Include the content of the document in the response.
Response
200 - application/json
Response serializer for file retrieve results.
Unique identifier for the file
Object type, always 'file'
Unix timestamp of when the file was created
Original filename of the file
Purpose of the file, always 'documents'
Processing status of the file
TLSH hash for duplicate detection.
Content of the file (included only when include_content=true)