Files

Retrieve a file

Read file metadata including detected MIME type and downloadability.

Upload a file first, then replace the example file ID with its returned ID.

GET /file/v1/files/{file_id}● Supported

Request parameters

  • file_idstring必填

    path: ID of a tenant-owned live file, as returned by upload or list; starts with file_dp_.

Returns

200 file

Errors follow the OpenAI format — see error codes

Response

HTTP 200

OK

application/json

NameTypeDescription
idstringFile identifier: file_dp_ followed by a 26-character uppercase Crockford ULID. Use the ID returned by upload or list.
bytesintegerThe size of the file, in bytes.
created_atintegerThe Unix timestamp (in seconds) for when the file was created.
expires_atintegerThe Unix timestamp (in seconds) for when the file will expire.
filenamestringThe name of the file.
objectstringThe object type, which is always `file`.
purposestringUpload purpose. Image references in conversations require user_data.
statusstringDeprecated. The current status of the file, which can be either `uploaded`, `processed`, or `error`.
status_detailsstring | nullDeprecated; always null or absent.
mime_typestringContent-detected MIME type.
downloadablebooleanTenant-owned live files can be downloaded through this face.
scopeobjectPresent for session output files.
scope.typestringKind of scope; always `session`.
scope.idstringId of the session the file belongs to.
relative_pathstringPath within the session output directory; present for session outputs.
revisionintegerSession output revision; present for session outputs.