POST
/
assistant
/
{domain}
/
message
Assistant message
curl --request POST \
  --url https://api-dsc.mintlify.com/v1/assistant/{domain}/message \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "fp": "<string>",
  "threadId": null,
  "messages": [
    {
      "id": "foobar",
      "role": "user",
      "content": "how do i get started",
      "parts": [
        {
          "type": "text",
          "text": "How do I get started"
        }
      ]
    }
  ],
  "retrievalPageSize": 5,
  "filter": null
}'
{}

Limitations de débit

L’API de l’Assistant a les limites suivantes :
  • 10 000 utilisations par clé et par mois
  • 10 000 requêtes par organisation Mintlify et par heure
  • 10 000 requêtes par adresse IP et par jour

Utilisation recommandée

Pour de meilleurs résultats, utilisez le hook useChat d’ai-sdk pour envoyer des requêtes et traiter les réponses. Vous pouvez définir fp, threadId et filter dans le champ body du paramètre d’options passé au hook.

Authorizations

Authorization
string
header
required

The Authorization header expects a Bearer token. See the Assistant API Key documentation for details on how to get your API key.

Path Parameters

domain
string
required

The domain identifier from your domain.mintlify.app URL. Can be found in the top left of your dashboard.

Body

application/json
fp
string
required

Browser fingerprint or arbitrary string identifier. There may be future functionality which allows you to get the messages for a given fingerprint

messages
object[]
required

Array of messages in the conversation. On the frontend, you will likely want to use the handleSubmit function from the @ai-sdk package's useChat hook to append user messages and handle streaming responses, rather than manually defining the objects in this array as they have so many parameters.

threadId
string

An optional identifier used to maintain conversation continuity across multiple messages. When provided, it allows the system to associate follow-up messages with the same conversation thread. The threadId is returned in the response as event.threadId when event.type === 'finish'.

retrievalPageSize
number
default:5

Number of retrieval results to return

filter
object

Optional filter criteria for the search

Response

200 - application/json

Message generated successfully

Response object that streams formatted data stream parts with the specified status, headers, and content. This matches what is expected from the AI SDK as documented at ai-sdk.dev/docs/ai-sdk-ui/streaming-data. Instead of writing your own parser, it is recommended to use the useChat hook from ai-sdk as documented here.