The URL must point directly to the file. Links that require authentication, redirect to a login page, or return HTML instead of the file will fail with a 400 error. For services like Google Drive or Dropbox, use the direct download URL, not the sharing link.
MIME type of the file (e.g. application/pdf, image/png). Strongly recommended.
filename
No
Original filename. Helps Matil detect the file type when mime_type is not provided.
Send only the raw base64 string. Do not include the data:application/pdf;base64, prefix — that is a Data URI format used in browsers, not in API requests.
Send plain text directly. This is useful for passing additional instructions or context alongside other documents, or for processing text that you already have extracted.
{ "documents": [ { "type": "url", "url": "https://example.com/invoice.pdf" }, { "type": "text", "text": "The invoice currency is USD. The supplier VAT ID is ES12345678A." } ]}
In this example, the first document is the actual file and the second provides extra context that helps Matil extract the data more accurately.