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

# Upload

> Upload documents to Reducto for processing

The Upload endpoint transfers documents to Reducto's servers, returning a unique `reducto://` identifier you can use with other endpoints like Parse, Split, Extract, and Edit.

<Info>
  **Files over 100MB?** Use the [presigned URL method](/upload/large-files) which supports files up to 5GB.
</Info>

***

## When to Use Upload

| Your situation               | What to do                                                       |
| ---------------------------- | ---------------------------------------------------------------- |
| Local file under 100MB       | Use Upload (this page)                                           |
| Local file over 100MB        | Use [Presigned URL Upload](/upload/large-files)                  |
| File already hosted at a URL | [Skip upload entirely](#url-passthrough) — pass the URL directly |
| Presigned S3/GCS/Azure URL   | [Skip upload entirely](#url-passthrough) — pass the URL directly |

### Supported File Types

| Category          | Formats                                                                                                                                                                                                                                                                                                                                                                         |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **PDF**           | PDF (Portable Document Format)                                                                                                                                                                                                                                                                                                                                                  |
| **Documents**     | DOCX (Word Open XML), DOC (Word Binary), DOTX (Word Template), RTF (Rich Text Format), TXT (Plain Text), WPD (WordPerfect)                                                                                                                                                                                                                                                      |
| **Spreadsheets**  | XLSX (Excel Open XML), XLSM (Excel Macro-Enabled), XLS (Excel Binary), XLTX (Excel Template), XLTM (Excel Macro-Enabled Template), CSV (Comma-Separated Values), QPW (Quattro Pro)                                                                                                                                                                                              |
| **Presentations** | PPTX (PowerPoint Open XML), PPT (PowerPoint Binary)                                                                                                                                                                                                                                                                                                                             |
| **Images**        | PNG (Portable Network Graphics), JPEG/JPG (Joint Photographic Experts Group), GIF (Graphics Interchange Format), BMP (Bitmap), TIFF (Tagged Image File Format), HEIC (High Efficiency Image Codec), PSD (Adobe Photoshop), PCX (PC Paintbrush), PPM (Portable Pixmap), APNG (Animated PNG), CUR (Windows Cursor), DCX (Multi-page PCX), FTEX (3D Textures), PIXAR (Pixar Image) |

<Tip>
  **Multi-page images:** TIFF files with multiple pages are processed as multi-page documents.
</Tip>

***

## Quick Start

<CodeGroup>
  ```python Python theme={null}
  from pathlib import Path
  from reducto import Reducto

  client = Reducto()  # Reads REDUCTO_API_KEY from environment

  upload = client.upload(file=Path("document.pdf"))
  print(upload.file_id)
  # Output: reducto://a8f8ead1-e360-4ec6-9ccd-b3277421b9ef.pdf

  # Now use it with Parse, Split, or Extract
  result = client.parse.run(input=upload.file_id)
  ```

  ```javascript Node.js theme={null}
  import Reducto from 'reductoai';
  import fs from 'fs';

  const client = new Reducto();  // Reads REDUCTO_API_KEY from environment

  const upload = await client.upload({
    file: fs.createReadStream('document.pdf'),
  });
  console.log(upload.file_id);
  // Output: reducto://a8f8ead1-e360-4ec6-9ccd-b3277421b9ef.pdf

  // Now use it with Parse, Split, or Extract
  const result = await client.parse.run({ input: upload.file_id });
  ```

  ```go Go theme={null}
  package main

  import (
      "context"
      "fmt"
      "io"
      "os"

      reducto "github.com/reductoai/reducto-go-sdk"
      "github.com/reductoai/reducto-go-sdk/option"
  )

  func main() {
      client := reducto.NewClient(option.WithAPIKey(os.Getenv("REDUCTO_API_KEY")))

      file, _ := os.Open("document.pdf")
      defer file.Close()

      upload, _ := client.Upload(context.Background(), reducto.UploadParams{
          File: reducto.F[io.Reader](file),
      })
      fmt.Println(upload.FileID)
      // Output: reducto://a8f8ead1-e360-4ec6-9ccd-b3277421b9ef.pdf
  }
  ```

  ```bash cURL theme={null}
  curl -X POST https://platform.reducto.ai/upload \
    -H "Authorization: Bearer $REDUCTO_API_KEY" \
    -F "file=@document.pdf"

  # Response: {"file_id": "reducto://a8f8ead1-e360-4ec6-9ccd-b3277421b9ef.pdf"}
  ```
</CodeGroup>

***

## URL Passthrough

If your document is already accessible via URL, skip the upload step entirely:

<CodeGroup>
  ```python Python theme={null}
  # No upload needed — pass URL directly
  result = client.parse.run(input="https://example.com/document.pdf")
  ```

  ```javascript Node.js theme={null}
  // No upload needed — pass URL directly
  const result = await client.parse.run({
    input: 'https://example.com/document.pdf',
  });
  ```

  ```go Go theme={null}
  // No upload needed — pass URL directly
  result, _ := client.Parse.Run(context.Background(), reducto.ParseRunParams{
      ParseConfig: reducto.ParseConfigParam{
          DocumentURL: reducto.F[reducto.ParseConfigDocumentURLUnionParam](
              shared.UnionString("https://example.com/document.pdf"),
          ),
      },
  })
  ```

  ```bash cURL theme={null}
  curl -X POST https://platform.reducto.ai/parse \
    -H "Authorization: Bearer $REDUCTO_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"input": "https://example.com/document.pdf"}'
  ```
</CodeGroup>

**This works with:**

* Public URLs (https\://...)
* Presigned S3, GCS, or Azure Blob URLs
* Any URL that returns the file directly when accessed

***

## Response Format

```json theme={null}
{
  "file_id": "reducto://a8f8ead1-e360-4ec6-9ccd-b3277421b9ef.pdf"
}
```

| Field     | Description                                                                      |
| --------- | -------------------------------------------------------------------------------- |
| `file_id` | Unique identifier in `reducto://` format. Pass this to Parse, Split, or Extract. |

<Warning>
  **Files expire after 24 hours.** The `reducto://` URI becomes invalid after expiration. Re-upload if you need to process the file again.
</Warning>

**Reuse the file\_id:** You can process the same document multiple times with different configurations without re-uploading — just use the same `file_id`.

***

## Common Questions

<AccordionGroup>
  <Accordion title="What's the maximum upload file size?">
    | Method                                      | Max Size |
    | ------------------------------------------- | -------- |
    | Direct upload (this page)                   | 100MB    |
    | [Presigned URL upload](/upload/large-files) | 5GB      |

    For files over 100MB, see [Uploading Large Files](/upload/large-files).
  </Accordion>

  <Accordion title="How long are uploaded files stored?">
    Files expire **24 hours** after upload. The `reducto://` URI becomes invalid after expiration.

    Need to process the same file again after 24 hours? Re-upload it.
  </Accordion>

  <Accordion title="Can I upload multiple files at once?">
    The Upload endpoint accepts one file per request. For batch uploads, make parallel requests:

    ```python theme={null}
    from concurrent.futures import ThreadPoolExecutor

    files = ["doc1.pdf", "doc2.pdf", "doc3.pdf"]

    with ThreadPoolExecutor(max_workers=10) as executor:
        uploads = list(executor.map(
            lambda f: client.upload(file=Path(f)), 
            files
        ))
    ```

    See our [batch processing guide](/workflows/batch-processing) for production patterns.
  </Accordion>

  <Accordion title="Can I delete an uploaded file?">
    Files are automatically deleted after 24 hours. There's no manual delete endpoint — files are purged automatically for security and compliance.
  </Accordion>
</AccordionGroup>

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Unsupported file format">
    **Error:** `Unsupported file format`

    **Fix:** Check that your file extension matches the [supported file types](#supported-file-types). When uploading programmatically, ensure the filename includes the extension.
  </Accordion>

  <Accordion title="File size exceeds maximum">
    **Error:** `File size exceeds maximum allowed`

    **Fix:** Direct upload is limited to 100MB. For larger files, use the [presigned URL method](/upload/large-files) which supports up to 5GB.
  </Accordion>

  <Accordion title="Request timeout">
    **Error:** `Request timeout`

    **Fix:**

    * For files approaching 100MB, consider using [presigned URL upload](/upload/large-files)
    * Check your network connection
    * Implement retry logic with exponential backoff
  </Accordion>
</AccordionGroup>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Parse" icon="file-lines" href="/parse">
    Convert documents into text, tables, and figures.
  </Card>

  <Card title="Extract" icon="brackets-curly" href="/extract">
    Pull specific fields into structured JSON using a schema.
  </Card>

  <Card title="Split" icon="scissors" href="/split">
    Divide documents into sections for targeted processing.
  </Card>

  <Card title="Large Files" icon="file-arrow-up" href="/upload/large-files">
    Upload files over 100MB using presigned URLs.
  </Card>
</CardGroup>
