Reserve an upload slot and return a presigned Supabase Storage URL.
The caller PUTs the file bytes directly to upload_url — the API
never sees the bytes. Supabase enforces the signed-URL TTL (currently
2 hours) on its side; after that the caller must request a new slot.
The catalogue row returned here lives for 7 days if no job references
this upload_id; once referenced, retention tracks the job.
Validation. content_type must be one of chemical/x-pdb,
text/plain, or application/octet-stream. size_bytes is
capped at 50 MB. Violations return 400 invalid_request.
Plan gate. None. Uploads are free; paywalls live at downstream submit endpoints (e.g. complex prediction requires the Complex plan).
Cost: write — burns rate + quota. Does not debit credits.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body for POST /v1/uploads.
Original filename — used for logging and the Content-Disposition header when the file is re-served. Not used to pick a storage path; paths are opaque UUIDs.
1 - 255"antigen.pdb"
MIME type of the bytes the client will PUT. One of chemical/x-pdb, text/plain, or application/octet-stream.
"chemical/x-pdb"
Byte count the client will upload. Must be positive and at most 50 MB. Larger payloads are rejected 400.
x <= 5242880012345
Successful Response
Catalogue entry + presigned URL for one client upload.
Opaque upload identifier (UUID). Pass this to downstream submit endpoints.
"dddd4444-eeee-5555-ffff-666677778888"
Echo of the caller's filename.
Echo of the caller's declared content type.
Echo of the caller's declared byte count.
Presigned Supabase Storage URL. PUT the file bytes to this URL within the TTL. Include the token field as an Authorization: Bearer header if your HTTP client can't follow the query-string auth baked into the URL.
"https://<project>.supabase.co/storage/v1/object/upload/sign/api-uploads/..."
Bearer token matching upload_url. Only needed by clients that issue the PUT without preserving the URL's query string.
Object path within the api-uploads bucket. Stable for the lifetime of this upload; use it if you later need to fetch the bytes server-side.
"aaaa1111-2222-3333-4444-555566667777/dddd4444-eeee-5555-ffff-666677778888/antigen.pdb"
ISO-8601 timestamp (UTC) when the upload slot was reserved.
ISO-8601 timestamp (UTC) when the unreferenced upload is eligible for deletion (7 days after creation). Once the upload is referenced by a submitted job, it's retained for the job's lifetime.
Polymorphic discriminator. Always upload.
"upload"