Files
List files
GET
Your uploaded files that have not expired. Batch result files are not listed; read them by ID. Requires an admin API key or the console session. Other keys get 403 and can still read a file by its ID.
ApiKeyAuthheader
Authorization<token>purpose?stringOnly batch returns files. Any other value returns an empty list.
order?stringUpload order.
Default
"desc"Value in
"asc""desc"limit?integerRange
1 <= value <= 10000Default
10000after?stringThe last_id of the previous page. Paging continues even if that file was deleted.
Successful response
application/json- response
data*array<>first_id*stringhas_more*booleanlast_id*stringPass as after for the next page; null on an empty page.
object*"list"Value in
"list"curl -X GET 'https://api.ohmygpt.com/v1/files'Example Response
{ "data": [ { "bytes": 0, "created_at": 0, "expires_at": 0, "filename": "string", "id": "string", "object": "file", "purpose": "batch", "status": "processed" } ], "first_id": "string", "has_more": true, "last_id": "string", "object": "list"}Still stuck? Live chat · [email protected] · Telegram group