Get a file

⚠️
Preview — this feature is being built; the design below is the spec.
GET https://app.syntic.ai/v1/files/{file_id}

Return one file’s details, including its processing status. Poll this after an upload if you need the file to be ready before using it; requests that reference a processing file also wait up to 30 seconds on their own.

For how this fits into a full workflow, see Files API.

Headers

HeaderRequiredValue
AuthorizationYesBearer <key>: a private inference key (sk_live_...). See Authentication.

Path parameters

ParameterTypeDescription
file_idstringThe file’s id, starting with file_.

Response

200 OK, Content-Type: application/json

{
  "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"
}
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.

Examples

curl -sS https://app.syntic.ai/v1/files/file_01JBW9Q6RZ \
  -H "Authorization: Bearer $SYNTIC_API_KEY"

Errors

Errors use the error envelope and carry a request_id. Codes specific to this operation:

StatustypecodeWhen
404not_found_errorfile_not_foundUnknown id, expired, deleted, or in another workspace. The response never says which.
401authentication_errorinvalid_api_keyThe key is missing, unknown, revoked or expired.
429rate_limit_errorrate_limitedToo many requests; wait for Retry-After. See Rate-limit headers.
Was this page helpful?