Chat API
Generate a message completion
Generate a completion in response to a user query
POST
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
The user message to generate a completion for
The topic ID to associate this message with
Response
200 - text/plain
A text stream in the form <response>||[chunks]
. The chunks are parts of your docs that most closely matched the user query. Each has the following format:
{
id: string;
link: string;
chunk_html: string;
metadata: {
title?: string
}
}
The links are relative links with your docs URL intended as the host. To get an absolute link to your docs, you can use the X-Mintlify-Base-Url
header as the host and construct a fully-qualified URL.
Was this page helpful?