Humata Docs
  • Getting started
    • Create an account
    • Account settings
      • Plan information
      • Pay-As-You-Go Spending Controls
    • How to set up single sign on
    • How to setup Multi-Factor Authentication
    • How to upload
      • How to move files
    • Website Import
    • Managing permissions and access
    • How to "Ask All"
    • Chat Settings
    • Custom Prompts
    • White Labeling
  • Humata API
    • How to get your API Key
    • How to Import Document
    • How to GET Pdf
    • How to Create Conversations
    • How to Ask
    • How to Download Data
    • How to Create New Users
    • FAQ
Powered by GitBook
On this page
  1. Humata API

How to Ask

PreviousHow to Create ConversationsNextHow to Download Data

Last updated 4 days ago

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

Server-Sent Events

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.

The Ask Endpoint returns a stream of . Here is a full example of response to the question "Who is George Washington?":

server-sent events
  • POSTAsk in a Conversation

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
401
Unauthorized access, invalid API key.
application/json
429
Rate limit exceeded.
application/json
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' }