Files.list() limitations?

The limit on file list return you report is undocumented.

This seems like a case where you must (anyway) be keeping a local database of what you’ve uploaded and the purpose, as there is no metadata and no query you can perform besides sending a purpose. (Not that I didn’t communicate that need for metadata upon which a subsearch could be done to OpenAI months ago…)

Trying some random queries like assistants supports; like you say, no difference:

url = f"https://api.openai.com/v1/files?purpose=assistants&limit=3"
requests.get(url, headers=headers).json()

Just a listing of all assistants files.

1 Like