Register New Edition of an Existing Model
POST/api/v1/orgs/{orgId}/ai-models/{modelId}/editions
Creates the edition (status Pending) and, when file info is supplied, opens an upload session — step 1 of the resumable upload flow.
-
Omit all of
fileName/fileSize/fileHashto create an emptyPendingedition with no upload (uploadId/tusEndpoint/fileare null). Supplying only some of the three returns 400 (InvalidRequest). -
When file info is supplied, returns a scoped
tusEndpointURL plus theuploadIdto send (base64-encoded) in theUpload-Metadataheader when creating the TUS upload. -
The session expires 12 hours after registration (
uploadExpiresAt); the actual bytes must be transferred before then. -
fileHashmust be a 64-char lowercase SHA-256 hex string; it is re-verified server-side after the transfer completes. -
Re-registering an edition that is still
Pendingreuses it (resume/retry); returns 409 (EditionAlreadyExists) only if it already has a verified file. -
Returns 400 for a missing orgId (MissingOrgId), an invalid edition string (InvalidEditionFormat), incomplete file info (InvalidRequest), or a malformed hash (InvalidClientHash); 413 if the file exceeds the maximum size (FileTooLarge); 403 on tenant mismatch (TenantMismatch); 404 if the model is not found (ModelNotFound); and 409 if the edition already has a file (EditionAlreadyExists).
Request
Responses
- 201
- 400
- 404
- 409
Created
Bad Request
Not Found
Conflict