Skip to main content

Upload Document

POST 

/external/v1/documents/upload

Uploads a document as a Base64 string for anonymization.

Optionally pass a config object to override the default project configuration (text/image labels, whitelist, blacklist, etc.). Omit config to use the default config from GET /external/v1/documents/default-config.

Convert a file to Base64

  • Windows (PowerShell): [Convert]::ToBase64String([System.IO.File]::ReadAllBytes("C:\path\to\your\file")) | Out-File -FilePath "C:\path\to\save\fileBase64.txt"
  • Linux / macOS: base64 -i "path-to-your-file" -o "path-to-your-output-file"

Returns a documentId and initial processing status. Poll status until a terminal status (COMPLETED, ERROR, or quota failure). If the status is COMPLETED then download the result. Suggested polling interval: 5-10 seconds.

Accepted types: PDF, DOC, DOCX, and common image formats.

Request

Responses

Document accepted for processing