The file object

⚠️
Preview — this feature is being built; the design below is the spec.

The file object as the API returns it. Every field below appears in every response that returns this object; fields with no value are null rather than missing.

Example

{
  "id": "file_01JBW9Q6RZ",
  "object": "file",
  "filename": "lease.pdf",
  "purpose": "document",
  "bytes": 482113,
  "mime_type": "application/pdf",
  "created_at": 1791820800,
  "expires_at": 1794412800,
  "status": "ready",
  "source": "upload",
  "workspace_id": "wrkspc_01JC0A2C4E6G8J0L2N4Q"
}

Fields

FieldTypeDescription
idstringStarts with file_. Use it wherever a request accepts a file_id.
objectstringAlways file.
filenamestringThe name sent with the upload, or the name Syntic gave a generated file.
purposestringdocument, vision, batch, code_input or skill.
bytesintegerSize in bytes.
mime_typestringDetected media type.
created_atintegerUnix seconds.
expires_atintegerUnix seconds when the file is deleted. Every file expires.
statusstringprocessing (being scanned and prepared), ready, or failed with status_detail.
sourcestringupload, batch_output or code_execution.
workspace_idstringThe workspace that owns the file.

Returned by

Was this page helpful?