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
Response
200 - application/json
Response serializer for file retrieve results.