Mixedbread

List Files

List all files for the authenticated user.

GET
/v1/files

Authorization

ApiKeyAuth
headerAuthorizationBearer <token>

Api key to access Mixedbreads API

Query Parameters

limit?Limit

Maximum number of items to return per page (1-100)

Range1 <= value <= 100
Default20
after?|

Cursor for forward pagination - get items after this position. Use last_cursor from previous response.

before?|

Cursor for backward pagination - get items before this position. Use first_cursor from previous response.

include_total?Include Total

Whether to include total count in response (expensive operation)

Defaultfalse
q?|

Search query for fuzzy matching over name and description fields

Response Body

A list of files for the user

application/json
  1. response
pagination*

Response model for cursor-based pagination.

object?Object

The object type of the response

Default"list"
data*array<>

The list of files

from mixedbread import Mixedbreadmxbai = Mixedbread(api_key="YOUR_API_KEY")files = mxbai.files.list(limit=20)for file in files.data:    print(file.id, file.filename)
{  "object": "list",  "data": [    {      "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",      "filename": "document.pdf",      "bytes": 1048576,      "mime_type": "application/pdf",      "version": 1,      "created_at": "2025-01-15T10:00:00.000Z",      "updated_at": "2025-01-15T10:00:00.000Z",      "object": "file"    },    {      "id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",      "filename": "report.docx",      "bytes": 524288,      "mime_type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",      "version": 1,      "created_at": "2025-01-14T15:30:00.000Z",      "updated_at": "2025-01-14T15:30:00.000Z",      "object": "file"    }  ],  "pagination": {    "has_more": false,    "first_cursor": "eyJpZCI6ImZpbGVfYWJjMTIzIn0=",    "last_cursor": "eyJpZCI6ImZpbGVfZGVmNDU2In0="  }}