Skip to main content
POST
/
ask-ai-query
Ask a question to AskAI
curl --request POST \
  --url https://myaskai.com/api/1.1/wf/ask-ai-query \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "<string>",
  "api_key": "<string>",
  "query": "<string>"
}
'
{
  "answer": "<string>",
  "references": [
    {
      "content": "<string>",
      "link": "<string>",
      "score": 123,
      "title": "<string>"
    }
  ],
  "suggestedQuestions": [
    "<string>"
  ]
}
With our API you can build your own internal tools or workflows and harness the power of your AI agent wherever you want, however you want. The API is powerful, but very simple. You input a question and get an answer back, along with the references/content used in the answer. See full details of the API below. Alternatively, you can use our pre-built integrations with Slack, Microsoft Teams or Zapier.
If your AskAI doesn’t know the answer, the API will return a field to confirm an answer wasn’t found:"unknown_answer": "yes"
The query field has a 750 character limit. If this is exceeded, you will see an error: {"error":"This question is too long. Please ensure questions are less than 750 characters."}
If human handover guidance is triggered the API response will include: "human_handover": true

Body

application/json
id
string
required

AskAI ID

api_key
string
required

AskAI API Key

query
string
required

Question to AskAI

Response

200 - application/json

Successful response

answer
string

Answer from AskAI

references
object[]
suggestedQuestions
string[]

Array of suggested follow-up questions

unknown_answer
enum<string>

Indicates if the answer is known or not

Available options:
no,
yes