Assistant Files
Assistant Files API
Achtung
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
https://app.meingpt.com/api/assistant-files/v1/assistants/{assistantId}/filesList all files for an assistant
Returns a list of all files uploaded to the specified assistant with metadata for change detection.
🔒 ApiKeyAuth
Parameter
| Parameter | In | Typ | Beschreibung |
|---|---|---|---|
| Authorization* | header | string | API key for authentication. Use 'Bearer <your-api-key>' format. |
| assistantId* | path | string | The assistant ID |
Responses
| Feld | Typ | Beschreibung |
|---|---|---|
| files* | Array<object> | |
| count* | number | |
| assistantId* | string |
| Feld | Typ | Beschreibung |
|---|---|---|
| status | string | |
| message | string |
| Feld | Typ | Beschreibung |
|---|---|---|
| status | string | |
| message | string |
| Feld | Typ | Beschreibung |
|---|---|---|
| status | string | |
| message | string |
https://app.meingpt.com/api/assistant-files/v1/assistants/{assistantId}/filesUpload a new file to an assistant
Uploads a file and adds it to the assistant's knowledge base. Limit: max 150MB per file.
🔒 ApiKeyAuth
Parameter
| Parameter | In | Typ | Beschreibung |
|---|---|---|---|
| Authorization* | header | string | API key for authentication. Use 'Bearer <your-api-key>' format. |
| assistantId* | path | string | The assistant ID |
Responses
| Feld | Typ | Beschreibung |
|---|---|---|
| success* | boolean | |
| assistantId* | string | |
| file* | object |
| Feld | Typ | Beschreibung |
|---|---|---|
| status | string | |
| message | string |
| Feld | Typ | Beschreibung |
|---|---|---|
| status | string | |
| message | string |
| Feld | Typ | Beschreibung |
|---|---|---|
| status | string | |
| message | string |
https://app.meingpt.com/api/assistant-files/v1/assistants/{assistantId}/files/{documentId}Get metadata for a specific file
Returns metadata for a specific file, useful for change detection.
🔒 ApiKeyAuth
Parameter
| Parameter | In | Typ | Beschreibung |
|---|---|---|---|
| Authorization* | header | string | API key for authentication. Use 'Bearer <your-api-key>' format. |
| assistantId* | path | string | The assistant ID |
| documentId* | path | string | The document ID |
Responses
| Feld | Typ | Beschreibung |
|---|---|---|
| id* | string | |
| originalName* | string | |
| mimeType* | string | |
| size* | number | |
| createdAt* | string | |
| updatedAt | string | |
| processingStatus | string | |
| derivations* | Array<string> | |
| assistantId* | string |
| Feld | Typ | Beschreibung |
|---|---|---|
| status | string | |
| message | string |
| Feld | Typ | Beschreibung |
|---|---|---|
| status | string | |
| message | string |
| Feld | Typ | Beschreibung |
|---|---|---|
| status | string | |
| message | string |
https://app.meingpt.com/api/assistant-files/v1/assistants/{assistantId}/files/{documentId}Replace an existing file
Replaces an existing file by uploading a new one and deleting the previous document. Note: the replacement upload will receive a new id.
🔒 ApiKeyAuth
Parameter
| Parameter | In | Typ | Beschreibung |
|---|---|---|---|
| Authorization* | header | string | API key for authentication. Use 'Bearer <your-api-key>' format. |
| assistantId* | path | string | The assistant ID |
| documentId* | path | string | The document ID to replace |
Responses
| Feld | Typ | Beschreibung |
|---|---|---|
| success* | boolean | |
| assistantId* | string | |
| replacedId* | string | |
| originalId* | string | |
| file* | object |
| Feld | Typ | Beschreibung |
|---|---|---|
| status | string | |
| message | string |
| Feld | Typ | Beschreibung |
|---|---|---|
| status | string | |
| message | string |
| Feld | Typ | Beschreibung |
|---|---|---|
| status | string | |
| message | string |
https://app.meingpt.com/api/assistant-files/v1/assistants/{assistantId}/files/{documentId}Delete a file from an assistant
Permanently deletes a file from the assistant's knowledge base.
🔒 ApiKeyAuth
Parameter
| Parameter | In | Typ | Beschreibung |
|---|---|---|---|
| Authorization* | header | string | API key for authentication. Use 'Bearer <your-api-key>' format. |
| assistantId* | path | string | The assistant ID |
| documentId* | path | string | The document ID to delete |
Responses
| Feld | Typ | Beschreibung |
|---|---|---|
| success* | boolean | |
| assistantId* | string | |
| originalId* | string |
| Feld | Typ | Beschreibung |
|---|---|---|
| status | string | |
| message | string |
| Feld | Typ | Beschreibung |
|---|---|---|
| status | string | |
| message | string |
| Feld | Typ | Beschreibung |
|---|---|---|
| status | string | |
| message | string |
Hinweis
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/
