API referenceFilesDownload content

Download file content

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

Return the file’s bytes with its stored Content-Type and a Content-Disposition header carrying the filename. Use it to fetch batch results, files produced by code execution, or your own uploads. Files with purpose document or vision can be downloaded only by keys in the same workspace.

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.

Response

200 OK

The body is the raw file, not JSON. Large files are streamed; write them to disk rather than holding them in memory.

Examples

curl -sS -o results.jsonl https://app.syntic.ai/v1/files/file_01JBXG7Q/content \
  -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, expired, deleted or another workspace’s file.
409conflict_errorfile_processingThe file is still being prepared. Try again shortly.
400invalid_request_errorfile_failedThe file failed processing and has no content to return.
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?