> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/open-webui/open-webui/llms.txt
> Use this file to discover all available pages before exploring further.

# List Files

Retrieve a list of files accessible to the authenticated user. Admin users with bypass access control enabled can see all files.

## Request

### Headers

<ParamField header="Authorization" type="string" required>
  Bearer token for authentication
</ParamField>

### Query Parameters

<ParamField query="content" type="boolean" default="true">
  Whether to include extracted content in the response. Set to `false` to reduce response size.
</ParamField>

## Response

Returns an array of file objects.

<ResponseField name="files" type="array">
  <ResponseField name="id" type="string">
    Unique identifier for the file
  </ResponseField>

  <ResponseField name="filename" type="string">
    Original filename
  </ResponseField>

  <ResponseField name="path" type="string">
    Storage path of the file
  </ResponseField>

  <ResponseField name="user_id" type="string">
    ID of the user who uploaded the file
  </ResponseField>

  <ResponseField name="meta" type="object">
    File metadata

    <ResponseField name="name" type="string">
      File name
    </ResponseField>

    <ResponseField name="content_type" type="string">
      MIME type of the file
    </ResponseField>

    <ResponseField name="size" type="number">
      File size in bytes
    </ResponseField>
  </ResponseField>

  <ResponseField name="data" type="object">
    Processing and content data

    <ResponseField name="status" type="string">
      Processing status: `pending`, `completed`, or `failed`
    </ResponseField>

    <ResponseField name="content" type="string">
      Extracted text content (only if `content=true`)
    </ResponseField>
  </ResponseField>

  <ResponseField name="created_at" type="number">
    Unix timestamp of when the file was created
  </ResponseField>

  <ResponseField name="updated_at" type="number">
    Unix timestamp of when the file was last updated
  </ResponseField>
</ResponseField>

## Examples

### List all files with content

```bash theme={null}
curl https://your-domain.com/api/files \
  -H "Authorization: Bearer YOUR_TOKEN"
```

```json Response theme={null}
[
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "filename": "document.pdf",
    "path": "550e8400-e29b-41d4-a716-446655440000_document.pdf",
    "user_id": "user123",
    "meta": {
      "name": "document.pdf",
      "content_type": "application/pdf",
      "size": 153600
    },
    "data": {
      "status": "completed",
      "content": "This is the extracted text from the PDF..."
    },
    "created_at": 1709856000,
    "updated_at": 1709856100
  },
  {
    "id": "660e8400-e29b-41d4-a716-446655440001",
    "filename": "recording.mp3",
    "path": "660e8400-e29b-41d4-a716-446655440001_recording.mp3",
    "user_id": "user123",
    "meta": {
      "name": "recording.mp3",
      "content_type": "audio/mpeg",
      "size": 2048000
    },
    "data": {
      "status": "completed",
      "content": "Transcribed audio content..."
    },
    "created_at": 1709857000,
    "updated_at": 1709857200
  }
]
```

### List files without content

```bash theme={null}
curl https://your-domain.com/api/files?content=false \
  -H "Authorization: Bearer YOUR_TOKEN"
```

```json Response theme={null}
[
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "filename": "document.pdf",
    "path": "550e8400-e29b-41d4-a716-446655440000_document.pdf",
    "user_id": "user123",
    "meta": {
      "name": "document.pdf",
      "content_type": "application/pdf",
      "size": 153600
    },
    "data": {
      "status": "completed"
    },
    "created_at": 1709856000,
    "updated_at": 1709856100
  }
]
```

## Search Files

To search for files by filename pattern, use the search endpoint:

```bash theme={null}
GET /api/files/search?filename=*.pdf&skip=0&limit=50
```
