API
Models & Files API
ImplementedA file is a blob. A model version is what is ingested. The API separates upload from ingest so R2, not the API process, holds the binary.
Why this exists
Why this API boundary exists
A file is a blob. A model version is what is ingested. The API separates upload from ingest so R2, not the API process, holds the binary.
Endpoints
/files/init-uploadImplementedCreate a file row and a presigned R2 PUT URL.
Auth: clerk
services/api/app/routes/files.py
/files/complete-uploadImplementedVerify the object exists, create model/version, enqueue ingest.
Auth: clerk
services/api/app/routes/files.py
/files/{file_id}/reingestImplementedRe-queue structural ingest for an existing blob.
Auth: clerk
services/api/app/routes/files.py
/filesImplementedList org files, optionally filtered by project_id.
Auth: clerk
services/api/app/routes/files.py
/files/{file_id}/statusImplementedPoll ingest and element-recognition job status.
Auth: clerk
services/api/app/routes/files.py
/files/{file_id}ImplementedDelete a file and cascade related rows.
Auth: clerk
services/api/app/routes/files.py