---
title: "List files stored by an AI assistant."
method: GET
path: "/ai_assistants/{assistant_id}/files"
tags: ["AI Assistants"]
---

# List files stored by an AI assistant.

`GET /ai_assistants/{assistant_id}/files`

## Request

- Base URL: `https://h2ogpte.genai.h2o.ai/api/v1`
- URL: `https://h2ogpte.genai.h2o.ai/api/v1/ai_assistants/{assistant_id}/files`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/h2o/apis/h2ogpte-rest-api/docs/ai_assistants/:assistant_id/files/get.ts> (a function with typed inputs; its response is checked against the schema)

Supports optional offset and limit query parameters for pagination (default offset=0, limit=100).

## Path parameters

- `assistant_id` string, required

## Query parameters

- `offset` integer
- `limit` integer

## Response `200`

Successful operation

- AiAssistantFile[]
  - `file_id` string, uuid
  - `created_at` string, date-time
  - `source` string: Source of the file reference: 'message' or 'forum_post'

## Other responses

- `401`: Unauthorized - Invalid or missing API key
- `default`: Unexpected error

---

[API](https://skmtc.dev/h2o/apis/h2ogpte-rest-api.md) - [All operations](https://skmtc.dev/h2o/apis/h2ogpte-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/h2o/apis/h2ogpte-rest-api/revisions/a82a117320f4?raw)
