Chat & models
Send chat messages and discover which models your workspace can use.
List models
Section titled “List models”GET /api/ai/models
Returns the models available to your workspace’s plan. Use the returned model
id values with the chat endpoint.
curl https://ai.mixerlead.com/api/ai/models \ -H "Authorization: Bearer $MIXERLEAD_API_KEY"{ "models": [ { "id": "ml-auto", "name": "Auto", "task": "Automatic model selection", "requiresPaid": false }, { "id": "<model-name>", "name": "<model-name>", "task": "Text generation", "requiresPaid": false } ]}Send a chat message
Section titled “Send a chat message”POST /api/chat
Sends a message and returns the assistant’s reply. The response is streamed so you can render tokens as they arrive.
Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
message | string | ✅ | The user message to send. |
model | string | — | A model id from /api/ai/models. Omit for Auto. |
conversationId | string | — | Continue an existing conversation. Omit to start a new one. |
curl -N https://ai.mixerlead.com/api/chat \ -H "Authorization: Bearer $MIXERLEAD_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "message": "Write three LinkedIn angles for our product launch.", "model": "ml-auto" }'const res = await fetch("https://ai.mixerlead.com/api/chat", { method: "POST", headers: { Authorization: `Bearer ${process.env.MIXERLEAD_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ message: "Summarize our Q3 strategy in 5 bullets." }),});
// Stream the response body as it arrives.const reader = res.body.getReader();const decoder = new TextDecoder();for (;;) { const { value, done } = await reader.read(); if (done) break; process.stdout.write(decoder.decode(value));}Grounding
Section titled “Grounding”Chat sent through the API is grounded in your brand profile automatically. To ground answers on your own documents, add sources via the Knowledge API first.
Limits & credits
Section titled “Limits & credits”Chat consumes credits and counts against your
plan’s rate limits. Handle 429 responses with
backoff — see Errors & rate limits.
Related
Section titled “Related” Skills & agents Run templated skills and agents.
Knowledge Add sources for grounded answers.
Errors & rate limits Status codes and retries.