AI Agent
AI Agent APIs enhance user interaction by providing intelligent automation and decision-making support. These APIs allow you to integrate AI-driven features into workflows such as automated approval, task assignments, and user interactions through chat-based interfaces.
AI Agent Server Gateway APIs
1. Answer Question
Ask a question to an AI Agent and get an intelligent response using RAG (Retrieval-Augmented Generation).
Endpoint for Demo:
POST https://app-gateway.demo.imbrace.co/3rd/ai-service/rag/answer_questionEndpoint for Dev:
POST https://app-gateway.dev.imbrace.co/3rd/ai-service/rag/answer_questionHeaders:
Content-Type:application/jsonX-Access-Token:Contact to iMBRACE
Body:
{ "text": "are there any spa services in the hotel?", "instructions": "", "thread_id": "testin-4243437433gg454bbbdfm", "role": "user", "assistant_id": "83be0c01-8242-4339-b280-2606260842ae", "streaming": true }Result:
Status code: 200 OK
{ "thread_id": "testin-4243437433gg454bbbdfm", "message": "Your name is Michael.", "is_partial": true, "message_id": "f7e39bb6-66d9-4c51-bc3d-1c3b94843482", "sources": [], "echart": null, "echart_id": "" }Example:
curl --request POST \ --url https://app-gateway.demo.imbrace.co/3rd/ai-service/rag/answer_question \ --header 'X-Api-Key: your-api-key' \ --header 'content-type: application/json' \ --data '{ "text": "are there any spa services in the hotel?", "instructions": "", "thread_id": "testin-4243437433gg454bbbdfm", "role": "user", "assistant_id": "83be0c01-8242-4339-b280-2606260842ae", "streaming": true }'
2. Get File by ID
Retrieve detailed information about a specific file by its ID.
Endpoint for Demo:
GET https://app-gateway.demo.imbrace.co/3rd/ai-service/files/{file_id}Endpoint for Dev:
GET https://app-gateway.dev.imbrace.co/3rd/ai-service/files/{file_id}Headers:
Content-Type:multipart/form-dataX-Access-Token:Contact to iMBRACE
Path Parameters:
file_id: The ID of the file to retrieve
Result:
Status code: 200 OK
Example:
3. Upload File
Upload a file to an AI Agent's knowledge base for RAG (Retrieval-Augmented Generation).
Endpoint for Demo:
POST https://app-gateway.demo.imbrace.co/3rd/ai-service/rag/filesEndpoint for Dev:
POST https://app-gateway.dev.imbrace.co/3rd/ai-service/rag/filesHeaders:
Content-Type:multipart/form-data
Body (Form Data):
file: The file to uploadtext_input: Optional text input for additional context
Result:
Status code: 200 OK
Example:
4. Delete File
Delete a file from an AI Agent's knowledge base.
Endpoint for Demo:
DELETE https://app-gateway.demo.imbrace.co/3rd/ai-service/rag/files/{file_id}Endpoint for Dev:
DELETE https://app-gateway.dev.imbrace.co/3rd/ai-service/rag/files/{file_id}Headers:
Content-Type:multipart/form-dataX-Access-Token:Contact to iMBRACE
Path Parameters:
file_id: The ID of the file to delete
Result:
Status code: 200 OK
Example:
5. Create Embedding
Create embeddings for board items data to enable AI-powered search and retrieval.
Endpoint for Demo:
POST https://app-gateway.demo.imbrace.co/3rd/ai-service/embeddingEndpoint for Dev:
POST https://app-gateway.dev.imbrace.co/3rd/ai-service/embeddingHeaders:
Content-Type:application/jsonX-Access-Token:Contact to iMBRACE
Body:
Result:
Status code: 200 OK
Example:
6. Delete Embedding by Board ID
Delete embeddings associated with a specific board ID.
Endpoint for Demo:
DELETE https://app-gateway.demo.imbrace.co/3rd/ai-service/embedding/board/{board_id}Endpoint for Dev:
DELETE https://app-gateway.dev.imbrace.co/3rd/ai-service/embedding/board/{board_id}Headers:
Content-Type:application/jsonX-Access-Token:Contact to iMBRACE
Path Parameters:
board_id: The ID of the board to delete embeddings for
Body:
Result:
Status code: 200 OK
Example:
7. Delete Embedding by Board Item ID
Delete embeddings associated with a specific board item ID.
Endpoint for Demo:
DELETE https://app-gateway.demo.imbrace.co/3rd/ai-service/embedding/{boarditem_id}Endpoint for Dev:
DELETE https://app-gateway.dev.imbrace.co/3rd/ai-service/embedding/{boarditem_id}Headers:
Content-Type:application/jsonX-Access-Token:Contact to iMBRACE
Path Parameters:
boarditem_id: The ID of the board item to delete embeddings for
Body:
Result:
Status code: 200 OK
Example:
8. Get ECharts by Thread ID
Delete embeddings associated with a specific board item ID.
Endpoint for Demo:
GET https://app-gateway.demo.imbrace.co/3rd/ai-service/rag/echarts/{thread_id}Endpoint for Dev:
GET https://app-gateway.dev.imbrace.co/3rd/ai-service/embedding/{thread_id}Headers:
Content-Type:application/jsonX-Access-Token:Contact to iMBRACE
Path Parameters:
thread_id: The ID of the thread_id
Body:
Result:
Status code: 200 OK
Example:
Last updated