Files
Upload a binary document to Strata and download it back by ID. Uploads are ephemeral: each file is stored for 24 hours, then deleted automatically. Files are bound to the organization that issued the API key — a key from another org can never read them.
NoteUploads are capped at 25 MB per file and expire 24 hours after upload. Re-upload if you need the bytes again after expiry.
Authentication
Both endpoints require a Bearer API key with the files scope. The key format is sk_strata_live_... in production (sk_strata_test_... on non-production). See Authentication for how an admin mints and rotates keys.
NoteErrors follow RFC 7807 and are returned as
application/problem+jsonwithtype,title, andstatusfields — not a bare error object.
File types
The upload endpoint does not restrict content types — any file up to 25 MB is accepted. The original MIME type you send is preserved and returned on download via the Content-Type header. If the file is later rebuilt from disk (after a server restart), Strata infers the MIME type from the extension and falls back to application/octet-stream for unknown extensions.
Common types include PDF, DOCX, XLSX, PPTX, CSV, JSON, TXT, PNG, and JPG.
POST /v1/files
Upload a file. Returns a file_id you can pass to the document-generation endpoints or download later.
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer sk_strata_live_... with the files scope. |
Content-Type | Yes | multipart/form-data with boundary. |
Body
Multipart form data with a single field.
| Field | Type | Required | Description |
|---|---|---|---|
file | binary | Yes | The file to upload. Max 25 MB. |
Example request
curl -X POST https://app.strata.kronisys.com/v1/files \
-H "Authorization: Bearer sk_strata_live_..." \
-F "file=@quarterly-report.pdf"
Example response
{
"file_id": "9f1c2e7a-3b4d-4e5f-8a90-1b2c3d4e5f60",
"name": "quarterly-report.pdf",
"size": 482914,
"mime_type": "application/pdf",
"expires_at": "2026-06-25T14:22:08.000Z",
"download_url": "/v1/files/9f1c2e7a-3b4d-4e5f-8a90-1b2c3d4e5f60"
}
Errors
| Status | Slug | When |
|---|---|---|
| 400 | invalid_request | The request was not multipart/form-data with a single file field. |
| 401 | missing_token / invalid_token | API key is missing, invalid, expired, or revoked. |
| 403 | insufficient_scope | The key lacks the files scope. |
| 413 | payload_too_large | File exceeds the 25 MB upload limit. |
GET /v1/files/:id
Download the original file bytes. The response uses the Content-Type from upload. The id must be a valid UUID.
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer sk_strata_live_... with the files scope. |
Example request
curl -X GET https://app.strata.kronisys.com/v1/files/9f1c2e7a-3b4d-4e5f-8a90-1b2c3d4e5f60 \
-H "Authorization: Bearer sk_strata_live_..." \
-o quarterly-report.pdf
Example response
The response body is the raw file. Notable response headers:
Content-Type: application/pdf
Content-Length: 482914
Content-Disposition: attachment; filename="quarterly-report.pdf"
Errors
| Status | Slug | When |
|---|---|---|
| 404 | not_found | The file ID is malformed, does not exist, belongs to a different org, or has expired. |
| 403 | insufficient_scope | The key lacks the files scope. |
What you can do with an uploaded file
Today the only thing the API does with an uploaded file_id is hand the bytes back on GET /v1/files/:id. Use it as ephemeral, org-scoped storage — for example, stage a file from one process and download it from another within the 24-hour window.
WarningUploaded API files are not yet wired into the other
/v1endpoints. POST /v1/chat has nofile_idsparameter, and the document generators take a full JSON spec rather than afile_id— to embed an image in a generated file, pass it inline as adata:URI or a publichttps://URL in the spec, not as an uploaded file reference. To analyze a document in chat from the web app, upload it directly in the chat composer.