Skip to content
Get started

Upload And Process File

POST/api/v1/layers/process-file

Upload a single file, extract text (txt, docx, pdf, or images), run input-layer policies to hide sensitive data, and return processed file.

For images (jpg, jpeg, png, gif, webp): Uses OCR and PII obfuscation. For PDFs: Attempts normal extraction first; if no text found, uses OCR. For text files: Standard text extraction and processing.

Query ParametersExpand Collapse
use_cache: optional boolean
ReturnsExpand Collapse
overall_policy_outcome: string
policy_results: map[map[unknown]]
processed_file: map[unknown]
span_context: map[string]
processed_data: optional string
Upload And Process File
curl http://api-staging.overmind.ai/api/v1/layers/process-file \
    -H 'Content-Type: multipart/form-data' \
    -F file=undefined
{
  "overall_policy_outcome": "overall_policy_outcome",
  "policy_results": {
    "foo": {
      "foo": "bar"
    }
  },
  "processed_file": {
    "foo": "bar"
  },
  "span_context": {
    "foo": "string"
  },
  "processed_data": "processed_data"
}
Returns Examples
{
  "overall_policy_outcome": "overall_policy_outcome",
  "policy_results": {
    "foo": {
      "foo": "bar"
    }
  },
  "processed_file": {
    "foo": "bar"
  },
  "span_context": {
    "foo": "string"
  },
  "processed_data": "processed_data"
}