v68

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-0170379386.9 KB
Chat

Chat

Have a conversation with Glean AI.

post/rest/api/v1/chat

Query parameters

localestring

The client's preferred locale in rfc5646 format (e.g. en, ja, pt-BR). If omitted, the Accept-Language will be used. If not present or not supported, defaults to the closest match or en.

timezoneOffsetinteger

The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC.

Headers

X-Glean-ActAsstring email

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-Typestring

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

Request body

saveChatboolean

Save the current interaction as a Chat for the user to access and potentially continue later.

chatIdstring

The id of the Chat that context should be retrieved from and messages added to. An empty id starts a new Chat, and the Chat is saved if saveChat is true.

timeoutMillisinteger

Timeout in milliseconds for the request. A 408 error will be returned if handling the request takes longer.

applicationIdstring

The ID of the application this request originates from, used to determine the configuration of underlying chat processes. This should correspond to the ID set during admin setup. If not specified, the default chat experience will be used.

agentIdstring

The ID of the Agent that should process this chat request. Only Agents with trigger set to 'User chat message' are invokable through this API. If not specified, the default chat experience will be used.

streamboolean

If set, response lines will be streamed one-by-one as they become available. Each will be a ChatResponse, formatted as JSON, and separated by a new line. If false, the entire response will be returned at once. Note that if this is set and the model being used does not support streaming, the model's response will not be streamed, but other messages from the endpoint still will be.

Response

OK