Docling API

Docling is an advanced document processing framework that simplifies parsing diverse document formats — including PDFs, DOCX, PPTX, XLSX, HTML, images, and audio files — with sophisticated understanding of document structure, layout, tables, and formulas. It provides a unified representation format and seamless integrations with the AI ecosystem.

We use Docling for secure document processing in Tinfoil. The Tinfoil document upload API is available at https://doc-upload.model.tinfoil.sh.

API Examples

Here are some examples of how to use the Docling API through our verified HTTP SDK (minimum version v0.1.6):

Tinfoil’s document upload service uses Docling and supports all docling API parameters.

See the docling reference for more details.

from tinfoil import SecureClient

client = SecureClient(
    enclave="doc-upload.model.tinfoil.sh",
    repo="tinfoilsh/confidential-doc-upload",
)
httpx_client = client.make_secure_http_client()

with open("doc.pdf", "rb") as file:
    response = httpx_client.post(
        "https://doc-upload.model.tinfoil.sh/v1alpha/convert/file", 
        files={'files': file},
        timeout=30,
    )
    print(response.json())

Attestation

The document upload API uses the same attestation mechanism as our other services. See our attestation architecture and predicate documentation for more details.

Chat UI Document Upload

Our chat interface also supports direct document uploads, allowing you to upload documents directly and chat about their contents.

Simply use the upload button in the chat interface to get started.