---
title: "Assistant Files"
canonical_url: "https://meingpt.com/en/docs/api/assistant-files"
language: en
---

# Assistant Files

# How the Assistant Files API Works

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_`.

```bash
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

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](/images/assistants/find_assistantID.png)
