v1

latestOpenAPI 3.1.02026-07-1255227258.8 KB
documents

Get Document Content

Get the content of a document. The media_type parameter can be used to request the content in a different format. When requesting as application/json additional metadata about the document will be included. If the original document contained content such as images or other non-textual media, this response will include a text description of that media instead of the original file data. Using mime types such as audio/mpeg or video/mp4 will stream the file in a format that can be provided to an audio video player.

get/documents/{document_id}/content

Path parameters

document_idstring uuid required

The id of the document.

Example:00000000-0000-0000-0000-000000000000

The id of the document.

Query parameters

'text/plain' | 'audio/mpeg' | 'video/mp4' | 'image/webp' | 'image/heic' | 'image/bmp' | 'image/png' | 'image/jpeg' | 'image/tiff'
OR
'application/json'

The desired media type of the content to return described as a mime type. An error will be returned if the requested media type is not supported for the document's type.

downloadboolean

Whether to return the content as a file download or a raw stream. If set to true, the content will be returned as a named file for download.

Whether to return the content as a file download or a raw stream. If set to true, the content will be returned as a named file for download.

Headers

partitionstring nullable

An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.

Example:acme_customer_id

An optional partition to scope the request to. If omitted, accounts created after 1/9/2025 will have the request scoped to the default partition, while older accounts will have the request scoped to all partitions. Older accounts may opt in to strict partition scoping by contacting support@ragie.ai. Older accounts using the partitions feature are strongly recommended to scope the request to a partition.

rangestring nullable

Response

Successful Response

statusstring required
idstring uuid required
created_atstring date-time required
updated_atstring date-time required
namestring required
metadataobject required
partitionstring required
chunk_countinteger nullable
external_idstring nullable
page_countnumber nullable
contentstring required