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 assistant.
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: 43
{
"file": "binary",
"autoAddToAssistant": 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.
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 assistant by id
The ID of the agent file to delete from assistant.
5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b
Successfully deleted agent file from assistant.
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-assistant HTTP/1.1
Host: api.raia2.com
Agent-Secret-Key: YOUR_API_KEY
Accept: */*
No content
This endpoint adds the agent file to assistant by id
The ID of the agent file to add to assistant.
5f7b1b3b-3b3b-4b3b-3b3b-3b3b3b3b3b3b
Successfully added agent file to assistant.
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-assistant HTTP/1.1
Host: api.raia2.com
Agent-Secret-Key: YOUR_API_KEY
Accept: */*
No content