Retrieve File Content
Download the raw bytes of an uploaded file.
Download the raw bytes of an uploaded file. The response body is the file
itself - same Content-Type as the upload, with a
Content-Disposition: attachment; filename="..." header.
GET /v1/files/:file_id/contentPath parameters
file_idstringrequiredThe id of the file (prefixed file-).
Response
bodybinaryoptionalRaw file bytes. No JSON envelope.
This endpoint is symmetric with
POST /v1/files - whatever you uploaded
comes back unchanged. It does not return the extracted text used by
chat completions; that extraction is cached internally and only surfaced
through the chat endpoint.
Errors
| Status | Reason |
|---|---|
404 | No such File object: <id> - id does not exist or is owned by another user. |