Agent Files
This endpoint uploads an agent file associated with the provided API key.
The file to upload
Indicates whether to automatically add the file to the vector store.
true
Successfully uploaded agent file.
Failed to upload agent file.
Invalid API key or secret key. Ensure that you are using a valid authentication key.
Unexpected error occurred while processing the request. Please try again later.
POST /external/agent-files/upload HTTP/1.1
Host: api.raia2.com
Agent-Secret-Key: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 45
{
"file": "binary",
"autoAddToVectorStore": true
}
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"fileName": "example.txt",
"url": "https://example.com/file.txt",
"createdAt": "2023-10-01T12:00:00Z",
"vectorStoreFileId": "file-123e4567-e89b",
"isUploadedToVectorStore": true,
"uploadedToVectorStoreAt": "2023-10-01T12:00:00Z"
}
This endpoint retrieves the agent files associated with the provided API key.
Successfully retrieved agent files with details.
Invalid API key or secret key. Ensure that you are using a valid authentication key.
Agent files not found.
Unexpected error occurred while processing the request. Please try again later.
GET /external/agent-files/by-api-key HTTP/1.1
Host: api.raia2.com
Agent-Secret-Key: YOUR_API_KEY
Accept: */*
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"fileName": "example.txt",
"url": "https://example.com/file.txt",
"createdAt": "2023-10-01T12:00:00Z",
"vectorStoreFileId": "file-123e4567-e89b",
"isUploadedToVectorStore": true,
"uploadedToVectorStoreAt": "2023-10-01T12:00:00Z"
}
This endpoint deletes the agent file by id
The ID of the agent file to delete.
5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b
Successfully deleted agent file.
No content
Invalid API key or secret key. Ensure that you are using a valid authentication key.
Agent file not found.
Unexpected error occurred while processing the request. Please try again later.
DELETE /external/agent-files/{id}/delete HTTP/1.1
Host: api.raia2.com
Agent-Secret-Key: YOUR_API_KEY
Accept: */*
No content
This endpoint deletes the agent file from vector store by id
The ID of the agent file to delete from vector store.
5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b
Successfully deleted agent file from vector store.
No content
Invalid API key or secret key. Ensure that you are using a valid authentication key.
Agent file not found.
Unexpected error occurred while processing the request. Please try again later.
DELETE /external/agent-files/{id}/delete-from-vector-store HTTP/1.1
Host: api.raia2.com
Agent-Secret-Key: YOUR_API_KEY
Accept: */*
No content
This endpoint adds the agent file to vector store by id
The ID of the agent file to add to vector store.
5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b
Successfully added agent file to vector store.
No content
Invalid API key or secret key. Ensure that you are using a valid authentication key.
Agent file not found.
Unexpected error occurred while processing the request. Please try again later.
PUT /external/agent-files/{id}/add-to-vector-store HTTP/1.1
Host: api.raia2.com
Agent-Secret-Key: YOUR_API_KEY
Accept: */*
No content