The Query API is the simplest way to integrate My AskAI into your own product or workflow. Send a single question, receive a single answer — along with the knowledge-base sources that were used to generate it and a confidence indicator. It is stateless: each call is independent and no conversation history is maintained between requests. If you need multi-turn conversations, see the Chat API.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/arainey2022/myaskai-docs/llms.txt
Use this file to discover all available pages before exploring further.
The
question field is capped at 750 characters. Requests that exceed this limit return a 400 error with the message: "This question is too long. Please ensure questions are less than 750 characters."Endpoint
Authorization header. See Introduction → Authentication.
Request Parameters
The question you want to ask your AI agent. Maximum 750 characters.
The unique identifier of the My AskAI agent to query. Find this in your dashboard under Settings → API.
An optional identifier for the end user asking the question. Used for analytics and, when combined with the User Data API, enables personalised responses.
An optional free-form object containing additional context to pass to the agent. For example, you might include the page the user is currently viewing or their account tier.
Example Request
Response Fields
The AI-generated answer to the question, grounded in the content from your agent’s knowledge base.
A qualitative indication of the agent’s confidence in the answer. One of
high, medium, or low.Present and set to
"yes" when the agent was unable to find a relevant answer in its knowledge base. When this field appears, the answer field will contain the agent’s “I don’t know” response.Present and set to
true when a Guidance rule triggered a human-handover recommendation for this question.Example Response
Example: Answer Not Found
Error Codes
| HTTP status | Description |
|---|---|
400 Bad Request | The question or agent_id field is missing, or question exceeds 750 characters. |
401 Unauthorized | The Authorization header is missing or the API key is invalid. |
429 Too Many Requests | You have exceeded the rate limit for this API key. Back off and retry. |
500 Internal Server Error | An unexpected error occurred on our servers. Retry with exponential back-off. |