Files API
The files endpoints, each in TypeScript, Python, the CLI and curl.
Set up
Section titled “Set up”npm install @reminix/sdkexport REMINIX_API_KEY="<your API key>"pip install reminixexport REMINIX_API_KEY="<your API key>"npm install -g @reminix/clireminix loginexport REMINIX_API_KEY="<your API key>"To pass the key yourself, use createClient({ apiKey: key }) in TypeScript or Reminix(api_key=key) in Python.
Upload a file
Section titled “Upload a file”POST /v1/files Try it in the API playground (opens in a new tab) Scope: runs:write.
Uploads a file that a run can take as a file input.
import { readFile } from "node:fs/promises";import { createClient } from "@reminix/sdk";
// Uses the REMINIX_API_KEY environment variable.const reminix = createClient();const file = await reminix.files.upload(await readFile("adjustments.csv"), { name: "adjustments.csv",});console.log(file);from pathlib import Pathfrom reminix import Reminix
# Uses the REMINIX_API_KEY environment variable.reminix = Reminix()file = reminix.files.upload( Path("adjustments.csv").read_bytes(), name="adjustments.csv",)print(file)reminix files upload ./adjustments.csvcurl -X POST "https://api.reminix.com/v1/files?name=adjustments.csv" \ -H "Authorization: Bearer $REMINIX_API_KEY" \ -H "Content-Type: application/octet-stream" \ --data-binary @adjustments.csvReturns:
{ "id": "file_36d59242-1144-4fcb-851f-20f4c444d538", "name": "adjustments.csv", "mediaType": "text/csv", "sizeBytes": 18432, "origin": "input", "runId": null, "input": null, "sha256": null, "createdAt": "2026-10-01T09:14:12.000Z", "expiresAt": "2026-10-02T09:14:12.000Z", "downloadUrl": "https://3c5a….r2.cloudflarestorage.com/files/…?X-Amz-Expires=3600&X-Amz-Signature=…"}| Field | Description |
|---|---|
name | The file's name. |
More about this endpoint
Send the file’s bytes as the request body, with Content-Type and Content-Length headers, and its name as ?name=. Then pass the returned id as the file input’s value ({ "adjustments": "file_36d59242-1144-4fcb-851f-20f4c444d538" }). You can give each upload to only one run. If no run uses an upload within a day, Reminix deletes it. Your plan sets the largest file you can upload. Reminix refuses a file over 1,000 MB on every plan.
List files
Section titled “List files”GET /v1/files Try it in the API playground (opens in a new tab) Scope: runs:read.
Lists the files that runs saved, newest first, across the scripts you can see.
import { createClient } from "@reminix/sdk";
// Uses the REMINIX_API_KEY environment variable.const reminix = createClient();const files = await reminix.files.list();console.log(files);from reminix import Reminix
# Uses the REMINIX_API_KEY environment variable.reminix = Reminix()files = reminix.files.list()print(files)reminix files listcurl -X GET "https://api.reminix.com/v1/files" \ -H "Authorization: Bearer $REMINIX_API_KEY"Returns:
{ "items": [ { "id": "file_ab689098-cd54-4061-8322-c3eec1f29745", "name": "revenue-2026-09.csv", "mediaType": "text/csv", "sizeBytes": 52480, "origin": "saved", "runId": "run_d3c0553c-fa27-400f-8525-7b2985b36444", "input": null, "sha256": "9f2c4e1a7b3d5f60c8e2a4b6d8f0a1c3e5b7d9f1a3c5e7b9d1f3a5c7e9b1d3f5", "createdAt": "2026-10-01T09:14:20.000Z", "expiresAt": "2026-10-08T09:14:20.000Z", "downloadUrl": "https://3c5a….r2.cloudflarestorage.com/files/…?X-Amz-Expires=3600&X-Amz-Signature=…", "script": { "slug": "monthly-report", "name": "Monthly report" }, "run": { "id": "run_d3c0553c-fa27-400f-8525-7b2985b36444", "startedAt": "2026-10-01T09:14:15.000Z" }, "startedBy": { "userId": "usr_276b6c46-92e7-4d47-89c1-2ada515bc3e4", "name": "Ana Lopez", "credential": { "type": "pat", "name": "ci" } } } ], "nextCursor": null}| Field | Description |
|---|---|
limit | Items per page, 1–100 (default 25). |
cursor | Opaque token from a previous page's nextCursor. |
before | Start from this moment: items older than it, newest first. Ignored with cursor, which already says where to go on. |
script | Only files from this script's runs, by its slug. |
origin | Which files to list: saved for files runs saved (the default), input for files runs took as inputs, or all for both. |
name | Only files whose name contains this text. |
More about this endpoint
A file stays in the list until it expires. Pass ?script=<slug> for one script’s files. Pass ?origin=input for the files runs took as inputs, or ?origin=all for both. Pass ?name= to match file names. Each file comes with a download link that works for an hour. Pass ?before= to start from a moment. Paginate with the opaque nextCursor token.
Get a file
Section titled “Get a file”GET /v1/files/{fileId} Try it in the API playground (opens in a new tab) Scope: runs:read.
Returns a file’s name, media type and size, the run that took or saved it, and a download link that works for an hour.
import { createClient } from "@reminix/sdk";
// Uses the REMINIX_API_KEY environment variable.const reminix = createClient();const file = await reminix.files.get("file_36d59242-1144-4fcb-851f-20f4c444d538");console.log(file);from reminix import Reminix
# Uses the REMINIX_API_KEY environment variable.reminix = Reminix()file = reminix.files.get("file_36d59242-1144-4fcb-851f-20f4c444d538")print(file)reminix files get file_36d59242-1144-4fcb-851f-20f4c444d538curl -X GET "https://api.reminix.com/v1/files/file_36d59242-1144-4fcb-851f-20f4c444d538" \ -H "Authorization: Bearer $REMINIX_API_KEY"Returns:
{ "id": "file_36d59242-1144-4fcb-851f-20f4c444d538", "name": "adjustments.csv", "mediaType": "text/csv", "sizeBytes": 18432, "origin": "input", "runId": null, "input": null, "sha256": null, "createdAt": "2026-10-01T09:14:12.000Z", "expiresAt": "2026-10-02T09:14:12.000Z", "downloadUrl": "https://3c5a….r2.cloudflarestorage.com/files/…?X-Amz-Expires=3600&X-Amz-Signature=…"}| Field | Description |
|---|---|
fileId | The file's ID. |
More about this endpoint
Anyone who can see a run can read its files. Until a run uses an upload, only the person who uploaded it, a workspace owner or admin, or a workspace API key can read it.
Get a file’s content
Section titled “Get a file’s content”GET /v1/files/{fileId}/content Try it in the API playground (opens in a new tab) Scope: runs:read.
Returns the file’s bytes as a download.
import { writeFile } from "node:fs/promises";import { createClient } from "@reminix/sdk";
// Uses the REMINIX_API_KEY environment variable.const reminix = createClient();const file = await reminix.files.content("file_36d59242-1144-4fcb-851f-20f4c444d538");await writeFile("report.csv", Buffer.from(await file.arrayBuffer()));from pathlib import Pathfrom reminix import Reminix
# Uses the REMINIX_API_KEY environment variable.reminix = Reminix()Path("report.csv").write_bytes(reminix.files.content("file_36d59242-1144-4fcb-851f-20f4c444d538"))reminix files download \ file_36d59242-1144-4fcb-851f-20f4c444d538 \ --out report.csvcurl -X GET "https://api.reminix.com/v1/files/file_36d59242-1144-4fcb-851f-20f4c444d538/content" \ -H "Authorization: Bearer $REMINIX_API_KEY" \ -o report.csvReturns the file itself (application/octet-stream), which the example saves to disk.
| Field | Description |
|---|---|
fileId | The file's ID. |
More about this endpoint
The response always has Content-Disposition: attachment, so a browser saves the file instead of showing it as a page.