Attention
This API is a premium feature and must be enabled for your organization. Contact support to request access.
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"
- List files / Get metadata: Requires
VIEW, EDIT, or OWNER permission for the assistant
- Upload / Replace / Delete files: Requires
EDIT or OWNER permission for the assistant
gethttps://app.meingpt.com/api/assistant-files/v1/assistants/{assistantId}/files
List 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 | |
401Unauthorized - missing or invalid API key
| Feld | Typ | Beschreibung |
|---|
| status | string | |
| message | string | |
403Forbidden - assistant file API not enabled or no permission
| Feld | Typ | Beschreibung |
|---|
| status | string | |
| message | string | |
404Assistant not found
| Feld | Typ | Beschreibung |
|---|
| status | string | |
| message | string | |
posthttps://app.meingpt.com/api/assistant-files/v1/assistants/{assistantId}/files
Upload a new file to an assistant
Uploads a file and adds it to the assistant's knowledge base. Limit: max 50MB 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
200File uploaded successfully | Feld | Typ | Beschreibung |
|---|
| success* | boolean | |
| assistantId* | string | |
| file* | object | |
401Unauthorized - missing or invalid API key
| Feld | Typ | Beschreibung |
|---|
| status | string | |
| message | string | |
403Forbidden - requires EDIT or OWNER permission
| Feld | Typ | Beschreibung |
|---|
| status | string | |
| message | string | |
404Assistant not found
| Feld | Typ | Beschreibung |
|---|
| status | string | |
| message | string | |
gethttps://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 | |
401Unauthorized - missing or invalid API key
| Feld | Typ | Beschreibung |
|---|
| status | string | |
| message | string | |
403Forbidden - assistant file API not enabled or no permission
| Feld | Typ | Beschreibung |
|---|
| status | string | |
| message | string | |
404File not found
| Feld | Typ | Beschreibung |
|---|
| status | string | |
| message | string | |
puthttps://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
200File replaced successfully | Feld | Typ | Beschreibung |
|---|
| success* | boolean | |
| assistantId* | string | |
| replacedId* | string | |
| originalId* | string | |
| file* | object | |
401Unauthorized - missing or invalid API key
| Feld | Typ | Beschreibung |
|---|
| status | string | |
| message | string | |
403Forbidden - requires EDIT or OWNER permission
| Feld | Typ | Beschreibung |
|---|
| status | string | |
| message | string | |
404File or assistant not found
| Feld | Typ | Beschreibung |
|---|
| status | string | |
| message | string | |
deletehttps://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
200File deleted successfully | Feld | Typ | Beschreibung |
|---|
| success* | boolean | |
| assistantId* | string | |
| originalId* | string | |
401Unauthorized - missing or invalid API key
| Feld | Typ | Beschreibung |
|---|
| status | string | |
| message | string | |
403Forbidden - requires EDIT or OWNER permission
| Feld | Typ | Beschreibung |
|---|
| status | string | |
| message | string | |
404File or assistant not found
| Feld | Typ | Beschreibung |
|---|
| status | string | |
| message | string | |
Note
Replacing a file uploads a new document and then deletes the old one. The replacement upload will receive a new id.
- Go to edit mode for your assistant
- In the URL, you'll find the AssistantId after
/assistants/
