API reference · API
List the account's files
GET/v1/filesAPI key
Parameters
| Field | Type | What it is |
|---|---|---|
| purpose (query) | string | batch or batch_output. |
| limit (query) | integer | At most 1000; 100 by default. At most 1000. |
| after (query) | string | A file id to continue after. |
| order (query) | string | Newest first by default. One of "asc", "desc". |
Answer 200
A page of files.
| Field | Type | What it is |
|---|---|---|
| object | "list" | |
| data | array of BatchFile | |
| data[] | string | |
| data[] | "file" | |
| data[] | integer | |
| data[] | integer | |
| data[] | null | |
| data[] | string | |
| data[] | string | assistants and user_data are documents for file search (scripts/openapi-vector.ts). One of "batch", "batch_output", "assistants", "user_data". |
| data[] | "processed" | |
| data[] | null | |
| first_id | string or null | |
| last_id | string or null | |
| has_more | boolean |
Errors
- 401OpenAI shaped error.
Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.