curl --request POST \
  --url https://{domain}-be.glean.com/rest/api/v1/summarize \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "timestamp": "2023-11-07T05:31:56Z",
  "query": "<string>",
  "preferredSummaryLength": 123,
  "documentSpecs": [
    {
      "url": "<string>"
    }
  ],
  "trackingToken": "<string>"
}'
{
  "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.

Headers

X-Scio-Actas
string

Email address of a user on whose behalf the request is intended to be made (should be non-empty only for global tokens).

X-Glean-Auth-Type
string

Auth type being used to access the endpoint (should be non-empty only for global tokens).

Body

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

Summary of the document

documentSpecs
object[]
required

Specifications of documents to summarize

timestamp
string

The ISO 8601 timestamp associated with the client request.

query
string

Optional query that the summary should be about

preferredSummaryLength
integer

Optional length of summary output. If not given, defaults to 500 chars.

trackingToken
string

An opaque token that represents this particular result. To be used for /feedback reporting.

Response

200
application/json
OK
error
object
summary
object
trackingToken
string

An opaque token that represents this summary in this particular query. To be used for /feedback reporting.