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

Authorization

ApiKeyAuth
Authorization<token>

API key for authentication. Use 'Bearer ' format.

In: header

Path Parameters

assistantId*string

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"
}
POST/assistant-files/v1/assistants/{assistantId}/files

Authorization

ApiKeyAuth
Authorization<token>

API key for authentication. Use 'Bearer ' format.

In: header

Path Parameters

assistantId*string

The assistant ID

Request Body

multipart/form-data

file?file
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"
{
  "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}

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

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"
}
PUT/assistant-files/v1/assistants/{assistantId}/files/{documentId}

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

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"
{
  "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}

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

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

  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