# Query API

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](https://support.myaskai.com/features/channels).

{% openapi src="<https://3477336559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fhu0WRsaCQQRKP3KeuIOQ%2Fuploads%2FtqCpGMU8gCq8pgWJDP8i%2Fquery.yaml?alt=media&token=c57b5d66-a76f-43c1-ae85-d875dc710457>" path="/ask-ai-query" method="post" %}
[query.yaml](https://3477336559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fhu0WRsaCQQRKP3KeuIOQ%2Fuploads%2FtqCpGMU8gCq8pgWJDP8i%2Fquery.yaml?alt=media\&token=c57b5d66-a76f-43c1-ae85-d875dc710457)
{% endopenapi %}

{% hint style="info" %}
If your AskAI doesn't know the answer, the API will return a field to confirm an answer wasn't found:`"unknown_answer": "yes"`
{% endhint %}

{% hint style="info" %}
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."}`
{% endhint %}

{% hint style="info" %}
If human handover [guidance](https://support.myaskai.com/features/improve/guidance) is triggered the API response will include: `"human_handover": true`
{% endhint %}
