Get Document
Retrieve detailed information about a specific document, including its processing status and download URLs when available.
Request
Bearer token authentication. See our Authentication guide for more details. Example: Bearer YOUR_API_KEY
Path Parameters
The unique identifier of the document
Example Request
curl https://api.doctly.ai/api/v1/documents/123e4567-e89b-12d3-a456-426614174000 \
-H "Authorization: Bearer YOUR_API_KEY"
Response
Unique identifier for the document
Size of the file in bytes
ISO 8601 timestamp of creation
Current processing status: PENDING
, PROCESSING
, COMPLETED
, FAILED
, or EXPIRED
Selected accuracy level: lite
or ultra
Number of pages in the document
URL to download the processed content (available when status is COMPLETED
)
URL to download the original file (available when status is COMPLETED
)
Name of the processed output file
Example Responses
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"file_name": "document.pdf",
"file_size": 1048576,
"created_at": "2024-03-21T13:45:00Z",
"status": "COMPLETED",
"accuracy": "ultra",
"page_count": 10,
"output_file_url": "https://api.doctly.ai/output/123e4567-e89b-12d3-a456-426614174000",
"file_url": "https://api.doctly.ai/files/123e4567-e89b-12d3-a456-426614174000",
"output_file_name": "document.md"
}
Processing Status
The document goes through several states during processing:
PENDING
: Document is queued for processing
PROCESSING
: Document is being processed
COMPLETED
: Processing finished successfully
FAILED
: Processing failed
EXPIRED
: Document has expired and is no longer available
Download URLs are temporary and will expire after a certain period. Make sure to download the files promptly when they become available.