Create Upload
Request a presigned URL to upload a file to object storage (step 1 of 2).
The two-step upload flow:
POST /uploads— register the file and receive a short-livedupload_url. PUT your file bytes directly to that URL (do not send them to this API).POST /uploads/{id}— confirm the upload completed and bind the file to a resource (e.g. a workflow). The file is moved to its final location and the upload record transitions frompendingtouploaded.
category controls which file formats are accepted:
script— text-based formats (txt, pdf)dictionary— audio formats (mp3, wav, m4a, ogg, webm)
The presigned URL expires within a short window (see upload_url TTL in the
response). If the URL expires before the PUT completes, discard this upload
record and start over with a fresh POST /uploads call.
X-Workspace-Id is optional but recommended for workspace-scoped storage
quota tracking. API keys with a bound workspace attach automatically.
Dual-auth: Bearer JWT or API key (scope uploads:write).
Authentication
Onepin live API key (op_live_...). Test and public keys are reserved in Phase 1.
Headers
Request
Original filename including extension (e.g. script.txt). Must include a file extension.
File category. Determines which formats are accepted: script for text formats (txt, pdf); dictionary for audio formats (mp3, wav, m4a, ogg, webm).

