Upload a file
Upload the file withmultipart/form-data.
The live OpenAPI spec requires file and purpose.
Note: multipart file parts must include a nonblank filename. The lowercase WHATWG placeholder filename "blob" is treated as missing.
file object with an ID such as file-abc123.
List files with pagination
File listings are sorted bycreated_at (newest first by default) and return up to limit items per page.
When has_more is true, pass the last item’s id as after to fetch the next page.
id as before instead: the response is the page immediately preceding that item in the display order.
Files attached in the same batch can share a creation timestamp; the cursor accounts for this, so a full walk returns every file exactly once.
If a cursor’s file no longer exists — for example, it was removed from the vector store while you were paging — the API returns 400 Invalid pagination cursor. Restart the walk from the first page.