> For the complete documentation index, see [llms.txt](https://docs.knowbase.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.knowbase.ai/api-reference/list-files.md).

# List Files

## Get all files in your library

`GET` `https://api.knowbase.ai/api/v1/files`

Returns a list of all files in your library with their processing status, size, type, and other metadata.

#### Headers

| Name            | Type   | Description             |
| --------------- | ------ | ----------------------- |
| Authorization\* | string | `Bearer YOUR_API_TOKEN` |

#### Responses

**200: OK** Successfully retrieved files

```json
{
  "files": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "filename": "report.pdf",
      "type": "pdf",
      "status": "success",
      "file_size": 1048576,
      "created_at": "2025-03-15",
      "summary": "This report covers Q4 financial results...",
      "errors": null
    },
    {
      "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "filename": "meeting.mp3",
      "type": "audio",
      "status": "success",
      "file_size": 5242880,
      "created_at": "2025-03-14",
      "summary": null,
      "errors": null
    }
  ]
}
```

**File status values:**

| Status                    | Meaning                                  |
| ------------------------- | ---------------------------------------- |
| `success`                 | Ready for querying                       |
| `embed_file_started`      | Currently being processed                |
| `transcribe_file_started` | Audio/video being transcribed            |
| `failure`                 | Processing failed (check `errors` field) |

### Example

```python
import requests

url = "https://api.knowbase.ai/api/v1/files"
headers = {"Authorization": "Bearer YOUR_API_TOKEN"}

response = requests.get(url, headers=headers)
for file in response.json()["files"]:
    print(f"{file['filename']} - {file['status']}")
```

```bash
curl https://api.knowbase.ai/api/v1/files \
  -H "Authorization: Bearer YOUR_API_TOKEN"
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.knowbase.ai/api-reference/list-files.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
