FileListResponse - TypeScript SDK

FileListResponse type definition

The TypeScript SDK and docs are currently in beta. Report issues on GitHub.

A page of files belonging to the requesting workspace.

Example Usage

1import { FileListResponse } from "@openrouter/sdk/models";
2
3let value: FileListResponse = {
4 cursor: null,
5 data: [
6 {
7 createdAt: "2025-01-01T00:00:00Z",
8 downloadable: false,
9 filename: "document.pdf",
10 id: "file_011CNha8iCJcU1wXNR6q4V8w",
11 mimeType: "application/pdf",
12 sizeBytes: 1024000,
13 type: "file",
14 },
15 ],
16 firstId: "file_011CNha8iCJcU1wXNR6q4V8w",
17 hasMore: false,
18 lastId: "file_011CNha8iCJcU1wXNR6q4V8w",
19};

Fields

FieldTypeRequiredDescription
cursorstring✔️Opaque cursor for the next page; null when there are no more results.
datamodels.FileMetadata[]✔️N/A
firstIdstring✔️N/A
hasMoreboolean✔️N/A
lastIdstring✔️N/A