{
  "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"
}

Get Document

Retrieve detailed information about a specific document, including its processing status and download URLs when available.

Request

Headers

Authorization
string
required

Bearer token authentication. See our Authentication guide for more details. Example: Bearer YOUR_API_KEY

Path Parameters

id
string
required

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

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:

  1. PENDING: Document is queued for processing
  2. PROCESSING: Document is being processed
  3. COMPLETED: Processing finished successfully
  4. FAILED: Processing failed
  5. 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.