POST
/
rest
/
api
/
v1
/
summarize
from glean.api_client import Glean
import os


with Glean(
    api_token=os.getenv("GLEAN_API_TOKEN", ""),
    instance=os.getenv("GLEAN_INSTANCE", ""),
) as glean:

    res = glean.client.documents.summarize(document_specs=[
        {},
    ])

    # Handle response
    print(res)
{
  "error": {
    "message": "<string>"
  },
  "summary": {
    "text": "<string>",
    "followUpPrompts": [
      "<string>"
    ]
  },
  "trackingToken": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Includes request params such as the query and specs of the documents to summarize.

Summary of the document

Response

200
application/json

OK

The response is of type object.