Summarize documents

post/summarize

Generate an AI summary of the requested documents.

SecurityBearerAuth
Request
header Parameters
X-Glean-Auth-Type
string

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

X-Scio-Actas
string <email>

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

Request Body schema: application/json
required

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

required
Array of objects or objects or objects (DocumentSpec)

Specifications of documents to summarize

preferredSummaryLength
integer

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

query
string

Optional query that the summary should be about

timestamp
string <date-time>

The ISO 8601 timestamp associated with the client request.

trackingToken
string

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

Responses
200

OK

Response Schema: application/json
object
object (Summary)
trackingToken
string

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

400

Invalid request

401

Not Authorized

429

Too Many Requests

Request samples
application/json
{
  • "timestamp": "2019-08-24T14:15:22Z",
  • "query": "string",
  • "preferredSummaryLength": 0,
  • "documentSpecs": [
    • {
      • "url": "string"
      }
    ],
  • "trackingToken": "string"
}
Response samples
application/json
{
  • "error": {
    • "message": "string"
    },
  • "summary": {
    • "text": "string",
    • "followUpPrompts": [
      • "string"
      ]
    },
  • "trackingToken": "string"
}