### Install Python dependencies Source: https://docs.humata.ai/guides/readme.md Run this command to install all required Python packages listed in requirements.txt. ```bash pip3 install -r requirements.txt ``` -------------------------------- ### Query documentation via HTTP GET Source: https://docs.humata.ai/guides/llms.txt Perform a GET request to the documentation index with an ask parameter and an optional goal parameter to receive a direct answer. ```http GET https://docs.humata.ai/guides/readme/website-import.md?ask=&goal= ``` -------------------------------- ### GET /guides/readme/website-import.md Source: https://docs.humata.ai/guides/llms.txt Performs a natural language query against the documentation index to retrieve answers and relevant excerpts. ```APIDOC ## GET /guides/readme/website-import.md ### Description Perform an HTTP GET request on the documentation index with the `ask` parameter, and the optional `goal` parameter to retrieve a direct answer and relevant excerpts. ### Method GET ### Endpoint https://docs.humata.ai/guides/readme/website-import.md ### Parameters #### Query Parameters - **ask** (string) - Required - The immediate question to ask, written in natural language. - **goal** (string) - Optional - Describes the broader end goal to tailor the answer. ### Request Example GET https://docs.humata.ai/guides/readme/website-import.md?ask=How+do+I+import+a+website?&goal=Setup+my+knowledge+base ``` -------------------------------- ### Handle Server-Sent Events from Ask Endpoint Source: https://docs.humata.ai/guides/humata-api/how-to-ask.md Example of the streaming response format returned by the Ask endpoint when querying a document. ```text 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' } ``` -------------------------------- ### GET /v1/insights/download Source: https://docs.humata.ai/guides/humata-api/how-to-download-data.md Initiates a request to download user data from the Humata platform. ```APIDOC ## GET /v1/insights/download ### Description Initiates a request to retrieve and download your data from Humata. ### Method GET ### Endpoint /v1/insights/download ``` -------------------------------- ### GET /v1/pdf/{pdf-id} Source: https://docs.humata.ai/guides/humata-api/how-to-get-pdf.md Fetches the information of an already created PDF. This is typically used to poll the status of the PDF until it reaches a 'SUCCESS' state. ```APIDOC ## GET /v1/pdf/{pdf-id} ### Description Fetch the information of an already created PDF. Typically this is useful to poll until `pdf.read_status == 'SUCCESS'` (and not `pdf.read_status == 'FAILED'`) before asking questions against the PDF. ### Method GET ### Endpoint /v1/pdf/{pdf-id} ### Parameters #### Path Parameters - **pdf-id** (string) - Required - The unique identifier of the PDF. ``` -------------------------------- ### POST /v1/users Source: https://docs.humata.ai/guides/humata-api/how-to-create-new-users.md Creates a new user in the system. ```APIDOC ## POST /v1/users ### Description Creates a new user account. ### Method POST ### Endpoint /v1/users ``` -------------------------------- ### POST /v1/users/token Source: https://docs.humata.ai/guides/humata-api/how-to-create-new-users.md Generates an authentication token for a user. ```APIDOC ## POST /v1/users/token ### Description Generates an authentication token for the specified user. ### Method POST ### Endpoint /v1/users/token ``` -------------------------------- ### POST /v1/ask Source: https://docs.humata.ai/guides/humata-api/how-to-ask.md Sends a question to the Humata Ask endpoint to initiate a conversation and receive a streaming response based on the provided documents. ```APIDOC ## POST /v1/ask ### Description Allows you to chat with your document by sending a question to the Ask endpoint. The response is returned as a stream of server-sent events. ### Method POST ### Endpoint /v1/ask ### Response #### Success Response (200) - **data** (string) - A stream of server-sent events containing the answer content and references. #### Response Example 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' } ``` -------------------------------- ### POST /v2/import-url Source: https://docs.humata.ai/guides/humata-api/how-to-import-document.md Imports a document into Humata by providing a URL to the document. ```APIDOC ## POST /v2/import-url ### Description Imports a new document into Humata by passing a publicly available URL or a signed URL. The document is downloaded and processed on the Humata server. ### Method POST ### Endpoint /v2/import-url ``` -------------------------------- ### POST /v1/conversations Source: https://docs.humata.ai/guides/humata-api/how-to-create-conversations.md Creates a new conversation associated with a set of documents. This is a prerequisite step before asking questions. ```APIDOC ## POST /v1/conversations ### Description Creates a conversation with a set of documents. A conversation must be created before asking questions to documents. ### Method POST ### Endpoint /v1/conversations ``` -------------------------------- ### Validate OpenAPI specification Source: https://docs.humata.ai/guides/readme.md Execute the validation script to ensure the OpenAPI specification is correctly formatted. ```bash python3 validate-openapi.py ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.