Skip to main content
Use Unfold for hosted jobs or DirectUnfold for direct provider calls. Both expose the same parse(input, options) shape.

Inputs

The SDK accepts:
  • A file path or public HTTP(S) URL as a string
  • URL, File, or Blob
  • ArrayBuffer or an array-buffer view
  • ReadableStream<Uint8Array>
  • Explicit file, URL, byte, or named stream input objects
Use a named stream when uploading from object storage so Unfold receives the original filename and content type without buffering the stream:

Options

pageFields requires outputs: ["pages"] (or another output list containing pages). Unfold always retains each page’s pageNumber and warnings. Hosted calls also accept idempotencyKey. When omitted, the client generates a UUID for the request. Hosted results expose the resource IDs created by the convenience call:
Deleting the document also removes its retained job and execution results. Failed hosted requests throw UnfoldError. Its requestId identifies the server request when you need support or are correlating application logs.
Unfold rejects outputs and page fields the selected provider does not advertise before starting the provider request. Use client.providers.list() to discover the hosted capabilities at runtime.