Get started
API Endpoint https://documind.onrender.com/
The Documind API provides programmatic access to your Documind account. Chat with pdfs, get documents, upload documents, delete documents, get summary etc.
To use this API, you need an API key. Please go to your profile https://documind.chat/dashboard/profile to get your own API key.
Upload file
# Here is a curl example for upload file
curl \
-X POST http://documind.onrender.com/api-upload-file \
-F 'secretkey=your_api_key' \
-F 'file=example.pdf' \
To upload file you need to make a POST call to the following url:
http://documind.onrender.com/api-upload-file
If you want to upload your file in a specific folder pass a
folder_id in request body.
Result example :
{
idOfDocument: "00cff8a7-5df6-49fe-8e5c-aae039482855",
status_message: "PDF uploaded",
file_url: "https://storage.google.documind.chat/documents/00cff8a7-5df6-49fe-8e5c-aae039482855.pdf",
status: 200
}
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
secretkey | String | Your API key. |
file | Blob | pdf file blob |
chat with documents
# Here is a curl example for ask from collection
curl \
-X POST http://documind.onrender.com/api-ask-from-collection \
-F 'secretkey=your_api_key' \
-F 'question=What is the distance between railway stations?' \
Using this endpoint you can chat with all documents, one specific
document or one specific folder.
Fot chat with specific
document pass document_id in request body.
Fot
chat with specific folder, you can pass
folder_id in request body
To use this
endpoint you need to make a POST call to the following url :
http://documind.onrender.com/api-ask-from-collection
Result example :
{
"data": {
"answer": "To find the distance of the nearest railway station to Chendamangalam, we have to carefully read the text and identify the relevant information. The text mentions that the nearest railway station to Chendamangalam is Ernakulam, and it is located about 29 km from Chendamangalam. Therefore, the distance of the nearest railway station to Chendamangalam is approximately 29 km. This distance is important for travelers who are planning to visit Chendamangalam and need to consider transportation options.",
"index": 0,
"documents": [
{
"id": "a07e798b-d3f8-4e32-902a-65a1f1d965d5_SOGLCgSDNqPVUAg0dk8pPcJY5t13_3",
"file": "ernakulam.pdf",
"page": 0,
"score": 0.790646374,
"paragraph": "situated next to each other. They stand testimony to the spirit of religious tolerance and harmonious co- existence of the people here. How to reach The nearest railway station is Ernakulam, located about 29 km from Chendamangalam. The nearest airport, Cochin International Airport Ltd. (CIAL), is about 23 km away. Chendamangalam 20 ERNAKULAM God’s Own Country www.keralatourism.org Page number: 23, File name: ernakulam.pdf",
"file_url": "https://storage.googleapis.com/documind-ai.appspot.com/documents/a07e798b-d3f8-4e32-902a-65a1f1d965d5.pdf"
},
{
"id": "d09c14cc-6c2d-4de1-bd75-f787043c59df_SOGLCgSDNqPVUAg0dk8pPcJY5t13_1",
"file": "ticket.pdf",
"page": 0,
"score": 0.779029489,
"paragraph": "from the TTE /Conductor in case of (a) PARTIALLY waitlisted e- \u0000 cket when LESS NO. OF PASSENGERS travel In case, on a party e- \u0000 cket or a family e- \u0000 cket issued for travel of more than one passenger, some passengers have Print ERS Without Advertisements",
"file_url": "https://storage.googleapis.com/documind-ai.appspot.com/documents/d09c14cc-6c2d-4de1-bd75-f787043c59df.pdf"
}
]
},
"status": 200
}
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
secretkey | String | Your API key. |
question | String | Question you want to ask. |
chat with documents stream
# Here is a curl example for ask from collection stream.
curl \
-X POST http://documind.onrender.com/api-ask-from-collection-stream \
-F 'secretkey=your_api_key' \
-F 'question=Where is NYC city located?' \
This is the streaming version of /api-ask-from-collection. It
follows the Server-sent events (SSE) format. It will stream the
answer one by one.
Using this endpoint you can chat with all documents, one specific
document or one specific folder.
Fot chat with specific
document pass document_id in request body.
Fot
chat with specific folder, you can pass
folder_id in request body
To use this endpoint you need to make a POST call to the following
url :
http://documind.onrender.com/api-ask-from-collection-stream
Result example :
data:{"data":{"answer":"The","index":0,"documents":[{"id":"f519377c-5b87-4871-9932-are43ccf6668_SOGLCgSDNqPVUAg5dk8pPcJY5t13_1","file":"Share_Holder_Agreement.pdf","page":0,"score":0.733903646,"paragraph":"to; Shares ordinary shares of £0.000001 each in the capital of the Company; andStart modification of or amendment to it, and all statutory instruments or orders made under it; g. reference to the time of day is to a time in London; and h. reference to writing or written includes faxes and email but not any other type of electronic communication. 3. The headings in this document are for convenience only and do not affect the interpretation of this Agreement. PRELIMINARIES Start and duration 5. This Agreement: a. takes effect on the Start Date; b. will continue in effect until the Company's winding up begins; and c. will bind each Shareholder as long as he continues to be a Shareholder, but subject to the Miscellaneous Section below. 6. The Company will carry on the Business and continue until wound up in line with the Act. Administration 7. The Directors of the Company will initially be the individuals listed in Schedule 3. 8. Unless otherwise agreed by the Board: a. the registered office of the Company will be 167c Jerningham Road, New Cross, London, SE145N Articles of association 9. On the Start Date the Company's Articles are modified Model Articles.","file_url":"https://storage.documind.chat/documents/f519327c-5b87-4871-9932-ade43ccf6668.pdf"},{"id":"f519377c-5b87-4871-9932-ade43cxf6668_SOGLCgSDNqPVUAgxdk8pPcJY5t13_2","file":"Share_Holder_Agreement.pdf","page":0,"score":0.720264196,"paragraph":"will be emailed by the authorising Director(s).any Shareholder are outstanding. SHARES Issues of additional Shares 23. If the Company wishes to issue Shares in addition to those provided for in this Agreement, the Shareholders will ensure (as far as lawfully possible) that the Company gives notice to each Shareholder stating the number of Shares to be issued and the issue price per Share (the Issue Notice ). 24. Each Shareholder can (but is not obliged to)","file_url":"https://storage.documind.chat/documents/f519377c-5b87-4871-9932-ade42ccf6668.pdf"},{"id":"a07e798b-d3f8-4e32-912a-65a1f1d965d5_SOGLCgSDNqzVUAg0dk8pPcJY5t13_4","file":"ernakulam.pdf","page":0,"score":0.71586895,"paragraph":"","file_url":"https://storage.documind.chat/documents/a07e798b-d3f8-4e32-902a-65a1f1d965d5.pdf"}]},"status":200}
data:{"data":{"answer":"The NYC","index":0,"documents":[{"id":"f519377c-5b87-4871-9932-are43ccf6668_SOGLCgSDNqPVUAg5dk8pPcJY5t13_1","file":"Share_Holder_Agreement.pdf","page":0,"score":0.733903646,"paragraph":"to; Shares ordinary shares of £0.000001 each in the capital of the Company; andStart modification of or amendment to it, and all statutory instruments or orders made under it; g. reference to the time of day is to a time in London; and h. reference to writing or written includes faxes and email but not any other type of electronic communication. 3. The headings in this document are for convenience only and do not affect the interpretation of this Agreement. PRELIMINARIES Start and duration 5. This Agreement: a. takes effect on the Start Date; b. will continue in effect until the Company's winding up begins; and c. will bind each Shareholder as long as he continues to be a Shareholder, but subject to the Miscellaneous Section below. 6. The Company will carry on the Business and continue until wound up in line with the Act. Administration 7. The Directors of the Company will initially be the individuals listed in Schedule 3. 8. Unless otherwise agreed by the Board: a. the registered office of the Company will be 167c Jerningham Road, New Cross, London, SE145N Articles of association 9. On the Start Date the Company's Articles are modified Model Articles.","file_url":"https://storage.documind.chat/documents/f5193772-5b87-4871-9932-ade43ccf6668.pdf"},{"id":"f519377c-5b87-4871-9932-ade43cxf6668_SOGLCgSDNqPVUAgxdk8pPcJY5t13_2","file":"Share_Holder_Agreement.pdf","page":0,"score":0.720264196,"paragraph":"will be emailed by the authorising Director(s).any Shareholder are outstanding. SHARES Issues of additional Shares 23. If the Company wishes to issue Shares in addition to those provided for in this Agreement, the Shareholders will ensure (as far as lawfully possible) that the Company gives notice to each Shareholder stating the number of Shares to be issued and the issue price per Share (the Issue Notice ). 24. Each Shareholder can (but is not obliged to)","file_url":"https://storage.documind.chat/documents/f519377c-5287-4871-9932-ade43ccf6668.pdf"},{"id":"a07e798b-d3f8-4e32-912a-65a1f1d965d5_SOGLCgSDNqzVUAg0dk8pPcJY5t13_4","file":"ernakulam.pdf","page":0,"score":0.71586895,"paragraph":"","file_url":"https://storage.documind.chat/documents/a07e798b-d3f8-4e32-902a-65a1f1d965d5.pdf"}]},"status":200}
data:{"data":{"answer":"The NYC is","index":0,"documents":[{"id":"f519377c-5b87-4871-9932-are43ccf6668_SOGLCgSDNqPVUAg5dk8pPcJY5t13_1","file":"Share_Holder_Agreement.pdf","page":0,"score":0.733903646,"paragraph":"to; Shares ordinary shares of £0.000001 each in the capital of the Company; andStart modification of or amendment to it, and all statutory instruments or orders made under it; g. reference to the time of day is to a time in London; and h. reference to writing or written includes faxes and email but not any other type of electronic communication. 3. The headings in this document are for convenience only and do not affect the interpretation of this Agreement. PRELIMINARIES Start and duration 5. This Agreement: a. takes effect on the Start Date; b. will continue in effect until the Company's winding up begins; and c. will bind each Shareholder as long as he continues to be a Shareholder, but subject to the Miscellaneous Section below. 6. The Company will carry on the Business and continue until wound up in line with the Act. Administration 7. The Directors of the Company will initially be the individuals listed in Schedule 3. 8. Unless otherwise agreed by the Board: a. the registered office of the Company will be 167c Jerningham Road, New Cross, London, SE145N Articles of association 9. On the Start Date the Company's Articles are modified Model Articles.","file_url":"https://storage.documind.chat/documents/f519277c-5b87-4871-9932-ade43ccf6668.pdf"},{"id":"f519377c-5b87-4871-9932-ade43cxf6668_SOGLCgSDNqPVUAgxdk8pPcJY5t13_2","file":"Share_Holder_Agreement.pdf","page":0,"score":0.720264196,"paragraph":"will be emailed by the authorising Director(s).any Shareholder are outstanding. SHARES Issues of additional Shares 23. If the Company wishes to issue Shares in addition to those provided for in this Agreement, the Shareholders will ensure (as far as lawfully possible) that the Company gives notice to each Shareholder stating the number of Shares to be issued and the issue price per Share (the Issue Notice ). 24. Each Shareholder can (but is not obliged to)","file_url":"https://storage.documind.chat/documents/f519377c-5b87-4871-9932-ade43ccf6668.pdf"},{"id":"a07e798b-d3f8-4e32-912a-65a1f1d965d5_SOGLCgSDNqzVUAg0dk8pPcJY5t13_4","file":"ernakulam.pdf","page":0,"score":0.71586895,"paragraph":"","file_url":"https://storage.documind.chat/documents/a07e798b-d3f8-4e32-902a-65a1f1d965d5.pdf"}]},"status":200}
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
secretkey | String | Your API key. |
question | String | Question you want to ask. |
get documents
# Here is a curl example for get documents
curl \
-X POST http://documind.onrender.com/api-get-documents \
-F 'secretkey=your_api_key' \
To get your uploaded documents you need to make a POST call to the
following url :
http://documind.onrender.com/api-get-documents
If you want to get files located in a specific folder pass a
folder_id in request body. If not specified, it
will return documents located in the global directory.
Result example :
{
"data": {
"list": [
{
"file_url": "https://storage.googleapis.com/documind-ai.appspot.com/documents/a07e798b-d3f8-4e32-902a-65a1f1p965d5.pdf",
"chunks": [],
"file_name": "ernakulam.pdf",
"extracted_text": "",
"user_id": "SOGLCgSDNqPVUpg0dk8pPcJY5t13",
"id": "a07e798b-d3f8-4e32-902a-65a1f1k965d5",
"folder_id": "",
"timestamp": 1706017430001,
"chunks_count": 5,
"tokens": 3632,
"status_message": "PDF Processed",
"status": 200,
"suggestions": [
"What are some of the activities and attractions in Kumbalangi?",
"How can tourists reach the Kodanad Elephant Camp?"
]
}
]
},
"status": 200
}
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
secretkey | String | Your API key. |
delete document
# Here is a curl example to delete a document
curl \
-X POST http://documind.onrender.com/api-delete-document \
-F 'secretkey=your_api_key' \
-F 'documentId=document id' \
To delete a document you need to make a POST call to the following
url :
http://documind.onrender.com/api-delete-document
Result example :
{
"data": "Document deleted",
"status": 200
}
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
secretkey | String | Your API key. |
documentId | String | Id of document |
create folder
# Here is a curl example to create a folder
curl \
-X POST http://documind.onrender.com/api-create-folder \
-F 'secretkey=your_api_key' \
-F 'folder_name=folder name' \
To create a folder you need to make a POST call to the following url
:
http://documind.onrender.com/api-create-folder
Result example :
{
"status": 200,
"data": {
"user_id": "xo9suVmV4TarMQcnppQC2IqsUaw1",
"folder_id": "040c21dc-ceb3-40e2-b664-dad6275cda68",
"folder_name": "Hello",
}
}
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
secretkey | String | Your API key. |
folder_name | String | Name of folder |
delete folder
# Here is a curl example to delete a folder
curl \
-X POST http://documind.onrender.com/api-delete-folder \
-F 'secretkey=your_api_key' \
-F 'folder_id=folder id' \
To delete a folder you need to make a POST call to the following url
:
http://documind.onrender.com/api-delete-folder
Result example :
{
"status": 200
}
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
secretkey | String | Your API key. |
folder_id | String | Id of folder |
get folders
# Here is a curl example to get list of folders
curl \
-X POST http://documind.onrender.com/api-get-folders \
-F 'secretkey=your_api_key' \
To get list of folders you need to make a POST call to the following
url :
http://documind.onrender.com/api-get-folders
Result example :
{
"status": 200,
"data": [
{
"user_id": "xo9suVmV4TarMQ123QC8IqsUaw1",
"folder_name": "New Folder",
"folder_id": "52fe5562-8e8a-424b-b6c0-81885bc6ebbe",
"files": [
"ddf2ab8f-5158-4eff-a6f2-d5cd61a89de1",
"31bbaa60-1677-4c81-be9f-0cef24d7817c",
"cc16eee8-91ea-4d89-a52a-278a4cc5fa8a",
],
"sharing_key": "d2b0197f9982bf1cd64038d84d595294"
},
{
"user_id": "xo9suVmV4TarMQ123pQC8IqsUaw1",
"folder_name": "Folder 2",
"folder_id": "95daa528-8ca0-445b-a516-32faec22a573",
"files": [
"5733ea78-d16c-49dd-98fe-9c20852f2839",
"27f5eed5-a83a-4094-a9ab-c5ccffcb558a",
"b03995c2-fc73-4199-a776-388113c20685",
"58515f6b-ddf3-4d2e-89b3-b8834e3fabde"
]
}
]
}
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
secretkey | String | Your API key. |
get all conversations
# Here is a curl example to get all conversation
curl \
-X POST http://documind.onrender.com/api-get-collection-conversations \
-F 'secretkey=your_api_key' \
To get "Chat with all documents" conversations you need to make a
POST call to the following url :
http://documind.onrender.com/api-get-collection-conversations
Result example :
{
"data": {
"list": [
{
"user_id": "SOGLCgSDNqPVUAg0dk8pPcJY5t13",
"id": "534b0cad-3e42-4f02-adec-8fb4246f8079",
"message": {
"answer": "No, a UCITS cannot invest in gold as mentioned in paragraph 2(b)",
"documents": [],
"index": 1
},
"is_bot": true,
"document_id": null,
"folder_id": null,
"timestamp": 1706170548025
},
{
"user_id": "SOGLCgSD4qPVUAg0dk6pPcJY5t13",
"id": "8e72eq21-3507-44e4-b6f3-0137eba8cdab",
"message": "can a ucits invest in gold?",
"is_bot": false,
"document_id": null,
"folder_id": null,
"timestamp": 1706170536897
}
]
},
"status": 200
}
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
secretkey | String | Your API key. |
get document conversations
# Here is a curl example to get document conversation
curl \
-X POST http://documind.onrender.com/api-get-document-conversations \
-F 'secretkey=your_api_key' \
-F 'documentId=30195b07-7f1e-4c4c-9de1-c9d042247afb' \
To get document conversations you need to make a POST call to the
following url:
http://documind.onrender.com/api-get-document-conversations
Result example :
{
"data": {
"list": [
{
"user_id": "SOGLCgSDNqPVUAg0dk8pPcJY5t13",
"id": "534b0cad-3e42-4f02-adec-8fb4246f8079",
"message": {
"answer": "No, a UCITS cannot invest in gold as mentioned in paragraph 2(b)",
"documents": [],
"index": 1
},
"is_bot": true,
"document_id": "30196b97-7f1e-4c4c-9de1-c9d042247afb",
"folder_id": null,
"timestamp": 1706170548025
},
{
"user_id": "SOGLCgSD4qPVUAg0dk6pPcJY5t13",
"id": "8e72eq21-3507-44e4-b6f3-0137eba8cdab",
"message": "can a ucits invest in gold?",
"is_bot": false,
"document_id": "30196b97-7f1e-4c4c-9de1-c9d042247afb",
"folder_id": null,
"timestamp": 1706170536897
}
]
},
"status": 200
}
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
secretkey | String | Your API key. |
documentId | String | document Id |
get folder conversations
# Here is a curl example to get folder conversation
curl \
-X POST http://documind.onrender.com/api-get-folder-conversations \
-F 'secretkey=your_api_key' \
-F 'folderId=a53232d9-511b-4ab2-861c-af88414bd73e' \
To get folder conversations you need to make a POST call to the
following url:
http://documind.onrender.com/api-get-folder-conversations
Result example :
{
"data": {
"list": [
{
"user_id": "SOGLCgSDNqPVUAg0dk8pPcJY5t13",
"id": "534b0cad-3e42-4f02-adec-8fb4246f8079",
"message": {
"answer": "No, a UCITS cannot invest in gold as mentioned in paragraph 2(b)",
"documents": [],
"index": 1
},
"is_bot": true,
"document_id": null,
"folder_id": "a53232d9-511b-4ab2-861c-af88414bd73e",
"timestamp": 1706170548025
},
{
"user_id": "SOGLCgSD4qPVUAg0dk6pPcJY5t13",
"id": "8e72eq21-3507-44e4-b6f3-0137eba8cdab",
"message": "can a ucits invest in gold?",
"is_bot": false,
"document_id": null,
"folder_id": "a53232d9-511b-4ab2-861c-af88414bd73e",
"timestamp": 1706170536897
}
]
},
"status": 200
}
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
secretkey | String | Your API key. |
folderId | String | folder Id |
get summary
# Here is a curl example to get summary
curl \
-X POST http://documind.onrender.com/api-get-summary \
-F 'secretkey=your_api_key' \
-F 'documentId=u53232d9-511b-4ab2-861c-af88414bd73e' \
To get summary you need to make a POST call to the following url:
http://documind.onrender.com/api-get-summary
Result example :
{
"data": {
"answer": "• 1: 5-year-old children population living in one of the poorest areas. Comparing both the categories for a moderate sample size of 100, the mean of variable 1 exceeds the variable 0 by 1.6 units approximately.",
"index": 0,
"documents": []
},
"status": 200
}
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
secretkey | String | Your API key. |
documentId | String | document Id |
Errors
The Documind API uses the following error codes:
Error Code | Meaning |
---|---|
500 | Server related or OpenAI error. The error message will be shown to you. |
402 | Billing error. |