lume-omni reads it.
Upload
POST /v1/files needs the scope files:write. The body is multipart. purpose is user_data, and the file name ends in .pdf.
id is what you send on the chat request. It is file- followed by 32 characters, using letters, digits, _, and -. status is processed. The response includes X-Request-Id.
File is too large. The name has to end in .pdf, and the bytes have to be a PDF. purpose accepts user_data.
You can keep up to 1,000 files, and 100,000,000 bytes in total. An account can create 10 files a minute, and 1,000 files or 1 GiB on a UTC day. Past those limits, you’ll get HTTP 429. error.type is rate_limit_error. The code is rate_limit_exceeded with the message Create rate exceeded, storage_quota_exceeded with Storage quota exceeded, or ingestion_quota_exceeded with Ingestion quota exceeded.
expires_after[anchor] as created_at and expires_after[seconds] together. Seconds run from 3,600 through 30 days. The file object then includes expires_at. After that time the file is gone. Leave both fields out and the file stays until you delete it.
List, retrieve, and download
GET /v1/files needs the scope files:read. order is desc or asc, and it defaults to desc. limit defaults to 10,000, which is also the maximum. Pass after as a file ID from the page you already have. The body has object list, data, first_id, last_id, and has_more.
GET /v1/files/{file_id} returns the same file object. GET /v1/files/{file_id}/content returns the PDF bytes, with Cache-Control: private, no-store.
If the ID is missing, or it belongs to another account, you’ll get HTTP 404. The body does not say which of those it was.
file- pattern is HTTP 400, with the message Invalid file ID.
Delete
DELETE /v1/files/{file_id} needs the scope files:delete.
Next
Chat with files
Ask lume-omni about a PDF.
Authentication
See the files scopes on a key.

