Assistant Files
Assistant Files API
This API is a premium feature and must be enabled for your organization. Contact support to request access.
Authentication
This API uses User API Keys. These can be created in the user settings and have the prefix sk_meingpt_.
curl -X GET "https://app.meingpt.com/api/assistant-files/v1/assistants/{assistantId}/files" \
-H "Authorization: Bearer $MEINGPT_API_KEY"Permissions
- List files / Get metadata: Requires
VIEW,EDIT, orOWNERpermission for the assistant - Upload / Replace / Delete files: Requires
EDITorOWNERpermission for the assistant
Endpoints
/assistant-files/v1/assistants/{assistantId}/filesAuthorization
ApiKeyAuth API key for authentication. Use 'Bearer ' format.
In: header
Path Parameters
The assistant ID
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://app.meingpt.com/api/assistant-files/v1/assistants/string/files"{
"files": [
{
"id": "string",
"originalName": "string",
"mimeType": "string",
"size": 0,
"createdAt": "string",
"updatedAt": "string"
}
],
"count": 0,
"assistantId": "string"
}{
"status": "error",
"message": "string"
}{
"status": "error",
"message": "string"
}{
"status": "error",
"message": "string"
}/assistant-files/v1/assistants/{assistantId}/filesAuthorization
ApiKeyAuth API key for authentication. Use 'Bearer ' format.
In: header
Path Parameters
The assistant ID
Request Body
multipart/form-data
binaryResponse Body
application/json
application/json
application/json
application/json
curl -X POST "https://app.meingpt.com/api/assistant-files/v1/assistants/string/files"{
"success": true,
"assistantId": "string",
"file": {
"id": "string",
"originalName": "string",
"size": 0,
"mimeType": "string",
"uploadedAt": "string"
}
}{
"status": "error",
"message": "string"
}{
"status": "error",
"message": "string"
}{
"status": "error",
"message": "string"
}/assistant-files/v1/assistants/{assistantId}/files/{documentId}Authorization
ApiKeyAuth API key for authentication. Use 'Bearer ' format.
In: header
Path Parameters
The assistant ID
The document ID
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://app.meingpt.com/api/assistant-files/v1/assistants/string/files/string"{
"id": "string",
"originalName": "string",
"mimeType": "string",
"size": 0,
"createdAt": "string",
"updatedAt": "string",
"processingStatus": "string",
"derivations": [
"string"
],
"assistantId": "string"
}{
"status": "error",
"message": "string"
}{
"status": "error",
"message": "string"
}{
"status": "error",
"message": "string"
}/assistant-files/v1/assistants/{assistantId}/files/{documentId}Authorization
ApiKeyAuth API key for authentication. Use 'Bearer ' format.
In: header
Path Parameters
The assistant ID
The document ID to replace
Request Body
multipart/form-data
binaryResponse Body
application/json
application/json
application/json
application/json
curl -X PUT "https://app.meingpt.com/api/assistant-files/v1/assistants/string/files/string"{
"success": true,
"assistantId": "string",
"replacedId": "string",
"originalId": "string",
"file": {
"id": "string",
"originalName": "string",
"size": 0,
"mimeType": "string",
"uploadedAt": "string"
}
}{
"status": "error",
"message": "string"
}{
"status": "error",
"message": "string"
}{
"status": "error",
"message": "string"
}/assistant-files/v1/assistants/{assistantId}/files/{documentId}Authorization
ApiKeyAuth API key for authentication. Use 'Bearer ' format.
In: header
Path Parameters
The assistant ID
The document ID to delete
Response Body
application/json
application/json
application/json
application/json
curl -X DELETE "https://app.meingpt.com/api/assistant-files/v1/assistants/string/files/string"{
"success": true,
"assistantId": "string",
"originalId": "string"
}{
"status": "error",
"message": "string"
}{
"status": "error",
"message": "string"
}{
"status": "error",
"message": "string"
}Replacing a file uploads a new document and then deletes the old one. The replacement upload will receive a new id.
Finding the AssistantId
- Go to edit mode for your assistant
- In the URL, you'll find the AssistantId after
/assistants/
