Documents
Create an upload grant
A short-lived token for uploading one file straight to the document service, into the workspace workspace_id names, or, without one, for your document jobs. Free, and works at any balance.
- POST the file to upload_url as multipart form data, with the header X-Upload-Token: <token> and two parts:
- file: the file.
- metadata (required): JSON such as {"path": "..."}. Add total_size_bytes for files of 32 MiB or more.
- The upload's response carries the file under result.file.
- Pass its workspace_id and file_id as the job's source: {"type":"workspace_file","workspace_id":...,"file_id":...}.
The bytes never pass through Drex, so there is no 4.5 MB limit.
post/v1/documents/upload-grants
Request
- Base URLhttps://console.nace.ai
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Response
The grant.
Changes
No recorded changes to this operation across all 1 revision of this API.