Get File Summary
Get the AI-generated summary for a file.
GET /api/v1/files/{file_id}/summary
GET /api/v1/files/{file_id}/summaryHeaders
Name
Type
Description
Path Parameters
Name
Type
Description
Responses
{
"file_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"summary": "This document presents the Q4 2024 financial results, highlighting a 15% revenue increase...",
"status": "ready"
}{
"file_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"summary": null,
"status": "processing"
}Example
import requests
file_id = "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
url = f"https://api.knowbase.ai/api/v1/files/{file_id}/summary"
headers = {"Authorization": "Bearer YOUR_API_TOKEN"}
response = requests.get(url, headers=headers)
data = response.json()
if data["status"] == "ready":
print(data["summary"])
else:
print("Summary is still being generated...")Last updated