> ## 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

<ParamField path="id" type="string" required>
  Document ID (e.g. `doc-abc123`) or 6-char short hash.
</ParamField>

<ParamField query="page_images" type="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`.
</ParamField>

<ParamField query="filename" type="string">
  Original filename hint (used in UI and exports).
</ParamField>

<RequestExample>
  ```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
  ```
</RequestExample>

### Response (202)

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