# Document

A **document** is a PDF you uploaded, parsed and ready for questions and extraction. Private to your
account, deletable, and metered on ingest.

## Lifecycle

```mermaid
stateDiagram-v2
  [*] --> queued: POST /v1/documents
  queued --> running: parsing
  running --> succeeded: text, tables, layout indexed
  running --> failed: unparseable / encrypted / not a PDF
  succeeded --> [*]: DELETE /v1/documents/{id}
```

Parse status uses the shared Job status enum. A document is not queryable until `succeeded`.

## Shape

```json
{
  "object": "document",
  "id": "doc_8ba2f01c47",
  "status": "succeeded",
  "filename": "Attention is all you need.pdf",
  "page_count": 15,
  "library_id": "lib_5t7ye1kq0p",
  "created_at": "2026-08-10T11:52:16Z"
}
```

## Constraints

- 100 MB per file, `application/pdf` only. See files.
- Deleting a document deletes its derived data — parsed text, embeddings, extraction rows — within 24 hours, with backups purged in 30 days. See data-privacy.

## Not to be confused with

**File** — a File is the raw upload; a Document is the parsed, queryable thing built from it.
**Paper** — see the discriminator on that page.

## Related

documents · files · chat · library · data-privacy
