# How to Ask

Humata allows you to chat with your document via the Ask endpoint. Create a conversation and then ask your documents

{% openapi src="/files/ANwcOfL9PysJBUOoneIJ" path="/v1/ask" method="post" %}
[open-api.yaml](https://360245911-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ8S8wUTipLV0NvvKYznS%2Fuploads%2Fgit-blob-4d955061fc20039380df41606f6cb4a77719b086%2Fopen-api.yaml?alt=media)
{% endopenapi %}

#### Server-Sent Events

The Ask Endpoint returns a stream of [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events). Here is a full example of response to the question "Who is George Washington?":

```
data: { 'content': 'George Washington was ' }
data: { 'content': 'the first ' }
data: { 'content': 'president of the United States[3].' }
data: { 'content': '\n\nReferences - [3]: Page 10 of History of the United States.pdf' }
```

#### References

Each answer from Humata will provide references to the parts of the document that our AI used to answer the question. The format of references is subject to change.

###


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.humata.ai/guides/humata-api/how-to-ask.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
