Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions advanced/discovery-api/create-topic.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
openapi: POST /chat/topic
---
3 changes: 3 additions & 0 deletions advanced/discovery-api/generate-message.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
openapi: POST /chat/message
---
25 changes: 25 additions & 0 deletions advanced/discovery-api/overview.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: "Overview"
description: "Use the Discovery API to embed Mintlify's AI Chat into your application"
---

<Check>
The Mintlify Discovery API is only available on the Pro plan and above.
</Check>

The Discovery API allows you to embed an AI chat experience grounded in your docs and continually kept up to date into any application of your choosing.
Responses include citations so you can point your users to the right places they need to get help.

## Getting Started

To get started, you'll need to generate a Discovery API key in the [Mintlify Dashboard](https://dashboard.mintlify.com/products/chat/widget):

<Frame>
<img
alt="Create a Discovery API key"
src="/images/generate-discovery-api-key.png"
/>
</Frame>

Now that you have an API key, check out our [example](https://github.com/mintlify/discovery-api-example) for how to use
the API for AI chat. You can also see a deployed version of this example at [chat.mintlify.com](https://chat.mintlify.com).
2 changes: 1 addition & 1 deletion advanced/rest-api/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Introduction
---

<Check>
The Mintlify REST API is only available on the startup plan and above.
The Mintlify REST API is only available on the Pro plan and above.
</Check>

Leverage the external API to programmatically trigger an update when desired.
Expand Down
100 changes: 100 additions & 0 deletions discovery-openapi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"openapi": "3.0.1",
"info": {
"title": "Mintlify Discovery API",
"description": "An API to integrate Mintlify discovery features into your product.",
"version": "1.0.0"
},
"servers": [
{
"url": "https://api-dsc.mintlify.com/v1"
}
],
"security": [
{
"bearerAuth": []
}
],
"paths": {
"/chat/topic": {
"post": {
"summary": "Create a chat topic",
"description": "Creates a topic to manage message history for a given AI chat conversation.",
"responses": {
"200": {
"description": "Topic created successfully",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"topicId": {
"type": "string",
"description": "The id of the created topic."
}
}
}
}
}
}
}
}
},
"/chat/message": {
"post": {
"summary": "Generate a message completion",
"description": "Generate a completion in response to a user query",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": ["topicId", "message"],
"properties": {
"topicId": {
"type": "string",
"description": "The topic ID to associate this message with"
},
"message": {
"type": "string",
"description": "The user message to generate a completion for"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Topic created successfully",
"headers": {
"X-Mintlify-Base-Url": {
"schema": {
"type": "string"
},
"description": "The base URL for the Mintlify documentation"
}
},
"content": {
"text/plain": {
"schema": {
"type": "string",
"description": "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: \n ```\n { \n \tid: string;\n \tlink: string;\n \tchunk_html: string;\n \tmetadata: {\n \t\ttitle?: string\n \t}\n} \n``` \n 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."
}
}
}
}
}
}
}
},
"components": {
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer"
}
}
}
}
Binary file added images/generate-discovery-api-key.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,15 @@
"advanced/rest-api/update-status"
]
},
{
"icon": "magnifying-glass",
"group": "Discovery API",
"pages": [
"advanced/discovery-api/overview",
"advanced/discovery-api/create-topic",
"advanced/discovery-api/generate-message"
]
},
{
"icon": "user-lock",
"group": "User Auth",
Expand Down
Loading