How to Ask

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

Ask in a Conversation

post

Ask a question in a conversation. Response is streamed via server-sent events.

Authorizations
Body
conversationIdstring · uuidRequired
modelstring · enumRequiredPossible values:
questionstringRequired
selectedAnswerApproachstring · enumOptionalPossible values:
Responses
200
Successfully answered the question.
text/event-stream
Responsestring
post
POST /api/v1/ask HTTP/1.1
Host: app.humata.ai
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 126

{
  "conversationId": "7290fd6b-fe15-4fd3-865e-8010bd8e8a38",
  "model": "gpt-4-turbo-preview",
  "question": "Who is George Washington?"
}
data: { 'content': 'George Washington was the first ' }
data: { 'content': 'president of the United States[3].\n\nReferences - [3]: Page 10 of History of the United States.pdf' }

Server-Sent Events

The Ask Endpoint returns a stream of 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.

Last updated