Skip to main content
Granular document operations (parse, split, classify, extract, and ground) all accept a source field in the request body. The source is a discriminated union on type.

URL source ("type": "url")

Point an operation at any reachable https:// URL. Use a presigned HTTPS URL for private object storage:
Fields:
  • url — https:// only. NDI verifies the resolved hostname.
  • file_name — Chooses the processing lane and appears in result metadata.

Upload source ("type": "upload")

Stage bytes with POST /v1/uploads, then pass the handle:
Lifecycle:
  • Default TTL is 24 hours. Set another with the ttl_seconds multipart form field, next to file. The cap is 7 days; a longer value is rejected with invalid_request (422), not clamped. expires_at is the unused-upload ceiling.
  • Use each handle for a single job. Bytes are deleted after that job finishes. expires_at only bounds an upload nothing ever consumed.
  • Upload IDs are scoped to your API key.
The SDK accepts the create_upload / createUpload response directly as a parse/extract/split/classify/ground source.

Workspace file source ("type": "workspace_file")

Reference a file already stored in a workspace. Granular operations read the raw source bytes — the file does not need to be ingested first.

Parse result source ("type": "parse_result")

Reuse a successful Parse job without paying for the parse twice:
The referenced job must belong to the same API key, have kind: "parse" and status: "succeeded", and still have an available result.

Workspace file uploads

Uploading into a workspace is a different endpoint — not POST /v1/uploads.
This returns a Job with kind: "upload_file". The file persists until you delete it, the workspace’s source_ttl_days elapses, or the account is closed; see Data retention. Large files use upload sessions. Browser clients use upload grants. Workspace .txt sources may be up to 1 GiB. The SDK automatically uses a resumable session for these files. After upload, workspace ingestion and Parse preserve the complete UTF-8 text as a streamed content artifact; inline Markdown is a representative preview and ParseResult.document.content_url streams the complete text. Split, Extract, and Ground retain their 256 MiB operation limit and return file_size_too_large above it.

Which upload to use?