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, or OWNER permission for the assistant
  • Upload / Replace / Delete files: Requires EDIT or OWNER permission for the assistant

Endpoints

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

ParameterInTypBeschreibung
Authorization*headerstringAPI key for authentication. Use 'Bearer <your-api-key>' format.
assistantId*pathstringThe assistant ID

Responses

200List of files
FeldTypBeschreibung
files*Array<object>
count*number
assistantId*string
401Unauthorized - missing or invalid API key
FeldTypBeschreibung
statusstring
messagestring
403Forbidden - assistant file API not enabled or no permission
FeldTypBeschreibung
statusstring
messagestring
404Assistant not found
FeldTypBeschreibung
statusstring
messagestring
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 150MB per file.

🔒 ApiKeyAuth

Parameter

ParameterInTypBeschreibung
Authorization*headerstringAPI key for authentication. Use 'Bearer <your-api-key>' format.
assistantId*pathstringThe assistant ID

Responses

200File uploaded successfully
FeldTypBeschreibung
success*boolean
assistantId*string
file*object
401Unauthorized - missing or invalid API key
FeldTypBeschreibung
statusstring
messagestring
403Forbidden - requires EDIT or OWNER permission
FeldTypBeschreibung
statusstring
messagestring
404Assistant not found
FeldTypBeschreibung
statusstring
messagestring
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

ParameterInTypBeschreibung
Authorization*headerstringAPI key for authentication. Use 'Bearer <your-api-key>' format.
assistantId*pathstringThe assistant ID
documentId*pathstringThe document ID

Responses

200File metadata
FeldTypBeschreibung
id*string
originalName*string
mimeType*string
size*number
createdAt*string
updatedAtstring
processingStatusstring
derivations*Array<string>
assistantId*string
401Unauthorized - missing or invalid API key
FeldTypBeschreibung
statusstring
messagestring
403Forbidden - assistant file API not enabled or no permission
FeldTypBeschreibung
statusstring
messagestring
404File not found
FeldTypBeschreibung
statusstring
messagestring
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

ParameterInTypBeschreibung
Authorization*headerstringAPI key for authentication. Use 'Bearer <your-api-key>' format.
assistantId*pathstringThe assistant ID
documentId*pathstringThe document ID to replace

Responses

200File replaced successfully
FeldTypBeschreibung
success*boolean
assistantId*string
replacedId*string
originalId*string
file*object
401Unauthorized - missing or invalid API key
FeldTypBeschreibung
statusstring
messagestring
403Forbidden - requires EDIT or OWNER permission
FeldTypBeschreibung
statusstring
messagestring
404File or assistant not found
FeldTypBeschreibung
statusstring
messagestring
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

ParameterInTypBeschreibung
Authorization*headerstringAPI key for authentication. Use 'Bearer <your-api-key>' format.
assistantId*pathstringThe assistant ID
documentId*pathstringThe document ID to delete

Responses

200File deleted successfully
FeldTypBeschreibung
success*boolean
assistantId*string
originalId*string
401Unauthorized - missing or invalid API key
FeldTypBeschreibung
statusstring
messagestring
403Forbidden - requires EDIT or OWNER permission
FeldTypBeschreibung
statusstring
messagestring
404File or assistant not found
FeldTypBeschreibung
statusstring
messagestring

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

  1. Go to edit mode for your assistant
  2. In the URL, you'll find the AssistantId after /assistants/

AssistantId in Assistant edit mode

Was this page helpful?