create_upload_grant
Mint a short-lived grant an end client redeems to upload directly. Cost class: fast.
The customer's backend holds the API key; the end user's browser must never see it. This mints an HMAC-signed token that authorizes exactly one thing — upload_file into this workspace, optionally pinned to one destination path and a byte cap — until expires_at. The holder sends it in the X-Upload-Token header of a multipart POST to upload_url, so the bytes travel end-client → NDI once instead of end-client → customer → NDI twice.
The grant is stateless (no DB row); its short TTL stands in for revocation, except that revoking the minting API key kills its outstanding grants immediately. Where the deployment runs Redis the grant is additionally single-use.
Args: context: Resolved workspace plus the caller's access predicate. body: Optional path pin, byte cap, and TTL.
Returns: UploadGrantResponse with the token, the upload URL, and expiry.
Raises: PlatformError: invalid_request when max_bytes exceeds the service-wide upload cap.
Request
- Base URLhttps://ndi-api.nace.ai (the document declares no server; this is the origin it was published from)
- AuthAPI key in header X-API-Key
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Workspace identifier.
Request body
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.