API reference · API
Retrieve a file
GET/v1/files/{id}API key
Parameters
| Field | Type | What it is |
|---|---|---|
| id (path)required | string | The file id. |
Answer 200
The file object.
| Field | Type | What it is |
|---|---|---|
| id | string | |
| object | "file" | |
| bytes | integer | |
| created_at | integer | |
| expires_at | null | |
| filename | string | |
| purpose | string | assistants and user_data are documents for file search (scripts/openapi-vector.ts). One of "batch", "batch_output", "assistants", "user_data". |
| status | "processed" | |
| status_details | null |
Errors
- 404OpenAI 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.