curl -X POST https://api.mintlify.com/discovery/v2/assistant/your-domain/message \
-H "Authorization: Bearer mint_dsc_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"fp": "anonymous",
"messages": [
{
"id": "msg1",
"role": "user",
"parts": [
{
"type": "text",
"text": "How do I get started?"
}
]
}
],
"retrievalPageSize": 5
}'
{
"type": "streaming",
"description": "Streaming response compatible with AI SDK v5. Use the useChat hook from @ai-sdk/react to handle the response stream."
}
Embed the assistant, trained on your docs, into any application
curl -X POST https://api.mintlify.com/discovery/v2/assistant/your-domain/message \
-H "Authorization: Bearer mint_dsc_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"fp": "anonymous",
"messages": [
{
"id": "msg1",
"role": "user",
"parts": [
{
"type": "text",
"text": "How do I get started?"
}
]
}
],
"retrievalPageSize": 5
}'
{
"type": "streaming",
"description": "Streaming response compatible with AI SDK v5. Use the useChat hook from @ai-sdk/react to handle the response stream."
}
Generates a response message from the assistant for the specified domain. Compatible with AI SDK v5+. This endpoint enables you to embed Mintlify’s AI assistant into your product, support portal, or internal tools.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Mintlify/docs/llms.txt
Use this file to discover all available pages before exploring further.
mint_dsc_). Generate one on the API keys page in your dashboard.
The assistant API key is a public token that you can reference in frontend code.
domain.mintlify.app URL. Can be found at the end of your dashboard URL. For example, dashboard.mintlify.com/organization/domain has a domain identifier of domain.anonymous for anonymous users or provide a unique user identifier.Show Message object
system, assistant, user.threadId is returned in the response as event.threadId when event.type === 'finish'.Show Context object
useChat hook from Vercel’s AI SDK is the recommended way to integrate the assistant API into your application.
curl -X POST https://api.mintlify.com/discovery/v2/assistant/your-domain/message \
-H "Authorization: Bearer mint_dsc_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"fp": "anonymous",
"messages": [
{
"id": "msg1",
"role": "user",
"parts": [
{
"type": "text",
"text": "How do I get started?"
}
]
}
],
"retrievalPageSize": 5
}'
{
"type": "streaming",
"description": "Streaming response compatible with AI SDK v5. Use the useChat hook from @ai-sdk/react to handle the response stream."
}