> ## Documentation Index
> Fetch the complete documentation index at: https://docs.okrapdf.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Upload PDF (Binary)

> Stream a raw PDF binary in the request body.

## Overview

Upload a PDF by streaming the raw binary in the request body. Set `Content-Type: application/pdf`. Useful for programmatic uploads where you already have the file bytes.

## Request

**id** `string` *required*

Document ID (e.g. `doc-abc123`) or 6-char short hash.

**page\_images** `string`

Page image rendering strategy: `eager` (default, render all pages), `cover` (page 1 only), or `none`. `lazy` is accepted as a deprecated alias for `eager`.

**filename** `string`

Original filename hint (used in UI and exports).

```bash theme={null}
curl -X POST https://api.okrapdf.com/v1/documents/doc-abc123/upload \
  -H "Authorization: Bearer okra_YOUR_KEY" \
  -H "Content-Type: application/pdf" \
  --data-binary @report.pdf
```

### Response (202)

```json theme={null}
{
  "id": "doc-abc123",
  "phase": "uploading",
  "status_url": "https://api.okrapdf.com/v1/documents/doc-abc123"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.