Download file content
⚠️
Preview — this feature is being built; the design below is the spec.
GET https://app.syntic.ai/v1/files/{file_id}/contentReturn 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
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer <key>: a private inference key (sk_live_...). See Authentication. |
Path parameters
| Parameter | Type | Description |
|---|---|---|
file_id | string | The 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:
| Status | type | code | When |
|---|---|---|---|
| 404 | not_found_error | file_not_found | Unknown, expired, deleted or another workspace’s file. |
| 409 | conflict_error | file_processing | The file is still being prepared. Try again shortly. |
| 400 | invalid_request_error | file_failed | The file failed processing and has no content to return. |
| 401 | authentication_error | invalid_api_key | The key is missing, unknown, revoked or expired. |
| 429 | rate_limit_error | rate_limited | Too many requests; wait for Retry-After. See Rate-limit headers. |
Related
Was this page helpful?