WebsitePlatform Login

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

Endpoints

GET/assistant-files/v1/assistants/{assistantId}/files

Returns a list of all files uploaded to the specified assistant with metadata for change detection.

Authorization

ApiKeyAuth
Authorization<token>

API key for authentication. Use 'Bearer ' format.

In: header

Path Parameters

assistantId*string

The assistant ID

Header Parameters

Authorization*string

API key for authentication. Use 'Bearer ' format.

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://app.meingpt.com/api/assistant-files/v1/assistants/string/files" \  -H "Authorization: Bearer sk_meingpt_..."
{
  "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"
}
POST/assistant-files/v1/assistants/{assistantId}/files

Uploads a file and adds it to the assistant's knowledge base. Limit: max 150MB per file.

Authorization

ApiKeyAuth
Authorization<token>

API key for authentication. Use 'Bearer ' format.

In: header

Path Parameters

assistantId*string

The assistant ID

Header Parameters

Authorization*string

API key for authentication. Use 'Bearer ' format.

Request Body

multipart/form-data

file*file

File upload (max 150MB)

Formatbinary

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://app.meingpt.com/api/assistant-files/v1/assistants/string/files" \  -H "Authorization: Bearer sk_meingpt_..." \  -F file="string"
{
  "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"
}
GET/assistant-files/v1/assistants/{assistantId}/files/{documentId}

Returns metadata for a specific file, useful for change detection.

Authorization

ApiKeyAuth
Authorization<token>

API key for authentication. Use 'Bearer ' format.

In: header

Path Parameters

assistantId*string

The assistant ID

documentId*string

The document ID

Header Parameters

Authorization*string

API key for authentication. Use 'Bearer ' format.

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" \  -H "Authorization: Bearer sk_meingpt_..."
{
  "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"
}
PUT/assistant-files/v1/assistants/{assistantId}/files/{documentId}

Replaces an existing file by uploading a new one and deleting the previous document. Note: the replacement upload will receive a new id.

Authorization

ApiKeyAuth
Authorization<token>

API key for authentication. Use 'Bearer ' format.

In: header

Path Parameters

assistantId*string

The assistant ID

documentId*string

The document ID to replace

Header Parameters

Authorization*string

API key for authentication. Use 'Bearer ' format.

Request Body

multipart/form-data

file*file
Formatbinary

Response Body

application/json

application/json

application/json

application/json

curl -X PUT "https://app.meingpt.com/api/assistant-files/v1/assistants/string/files/string" \  -H "Authorization: Bearer sk_meingpt_..." \  -F file="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"
}
DELETE/assistant-files/v1/assistants/{assistantId}/files/{documentId}

Permanently deletes a file from the assistant's knowledge base.

Authorization

ApiKeyAuth
Authorization<token>

API key for authentication. Use 'Bearer ' format.

In: header

Path Parameters

assistantId*string

The assistant ID

documentId*string

The document ID to delete

Header Parameters

Authorization*string

API key for authentication. Use 'Bearer ' format.

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" \  -H "Authorization: Bearer sk_meingpt_..."
{
  "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

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

AssistantId in Assistant edit mode

On this page