AI Chat PDF
AI Chatbot for PDF1
Domain
Register device
POST
/auth/register-device
Register device for authenticate
Headers
Name | Value |
---|---|
Content-Type |
|
Body
Name | Type | Description |
---|---|---|
deviceId | string | ID of mobile device |
Response
Upload file
POST
/upload/register-file
Upload new file want to ask bot by form-data. This api will provide to you sourceId
and conversationId
<_id> that can use it for later.
Headers
Name | Value |
---|---|
Content-Type |
|
Device-Id |
|
Body
Name | Type | Description |
---|---|---|
| buffer | File upload. Accept PDF only |
page | number | Number pages of file. Optional |
Response
Chat
GET
/messages/chatting
Chat with bot in file context upload previous. Using Server-Send-Event
Headers
Name | Value |
---|---|
Content-Type |
|
Device-Id |
|
Query
Name | Type | Description |
---|---|---|
| string | Source Id was came from response of api Upload File |
| string | Question of user or bot. In case isReGenerate is true, the message is the re-generate message. |
isReGenerate | boolean | Mark the message is generate or not. Default false |
Response is SSE
Get conversations
GET
/conversations
List all conversations of user
Headers
Name | Value |
---|---|
Content-Type |
|
Device-ID |
|
Query
Name | Type | Description |
---|---|---|
| number | The number page |
| number | The records per page |
Response
Get contents of conversation
POST
/messages/conversation/:conversationId
Get all messages of specific conversation
Headers
Name | Value |
---|---|
Content-Type |
|
DeviceId |
|
Query
Name | Type | Description |
---|---|---|
| number | The number page |
| number | The records per page |
Response
Summarize file
GET
/conversations/summarize
Get summarize of file upload
Headers
Name | Value |
---|---|
Content-Type |
|
Device-ID |
|
Query string
Name | Type | Description |
---|---|---|
| string | ID of mobile device |
Response is SSE
Update conversation
PUT
/conversations/:conversationId
Update content of specific conversation
Headers
Name | Value |
---|---|
Content-Type |
|
Device-ID |
|
Params
Name | Type | Description |
---|---|---|
| string | Id of conversation |
Body
Name | Type | Description |
---|---|---|
| string | Title of conversation |
Response
Delete conversation
DELETE
/conversations/:conversationId
Delete conversation already exists and belongs to user
Headers
Name | Value |
---|---|
Content-Type |
|
Device-Id |
|
Params
Name | Type | Description |
---|---|---|
| string | Id of conversation |
Response
Upgrade Plan
PUT
/user/upgrade-plan
Upgrade new plan of user
Headers
Name | Value |
---|---|
Content-Type |
|
Device-Id |
|
Body
Name | Type | Description |
---|---|---|
| string | Accept 3 values: |
Response
Get user quota
GET
/user/quota
Get quota of user
Headers
Name | Value |
---|---|
Content-Type |
|
Device-Id |
|
Name | Type | Description |
---|---|---|
| string | Name of the user |
| number | Age of the user |
Response
Last updated