---
title: "Mint a signed URL for a direct JSONL upload"
method: POST
path: "/v1/files/presign"
tags: ["Files"]
---

# Mint a signed URL for a direct JSONL upload

`POST /v1/files/presign`

For browser clients that upload the file straight to storage instead of through the API: returns a file id and a signed PUT URL (valid 15 minutes). After the PUT succeeds, register the file with the complete call. CLI and SDK clients should use the plain upload instead.

## Request body

- object
  - `bytes` integer, required — Exact size of the upcoming upload in bytes (max 200 MB).
  - `filename` string — Display name; not persisted.

## Response `200`

OK

- PresignUploadResponse — A minted file id and a signed URL for a direct browser upload.
  - `expires_at` integer, required — Unix timestamp (seconds) the signed URL stops working.
  - `file_id` string, required — File id to register with the complete call after the PUT succeeds.
  - `put_url` string, required — Signed URL; PUT the raw JSONL bytes to it.

## Other responses

- `400` — The request is invalid
- `401` — Missing or invalid API key
- `404` — Not found (also returned when the organization does not have Batch API access)

---

[API](https://skmtc.net/openrelay/apis/openrelay-api.md) · [All operations](https://skmtc.net/openrelay/apis/openrelay-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openrelay/openrelay-api/versions/4c42fd61ed41/schema)
