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

# API Quickstart

> Get up and running with Reducto in minutes.

The fastest way to use Reducto is to **upload a document → parse it → get structured output**.

We’ll show you how with our Python and Node.js SDKs, then link you to more advanced options.

<CardGroup cols={2}>
  <Card title="Python SDK" icon="snake" href="https://github.com/reductoai/reducto-python-sdk">
    Most popular — works anywhere Python runs.
  </Card>

  <Card title="Node.js SDK" icon="box-heart" href="https://github.com/reductoai/reducto-node-sdk">
    For JavaScript & Node.js environments.
  </Card>
</CardGroup>

<Tip>
  Need help finding your API Key? Find them in your [Studio account](https://studio.reducto.ai/) under "API Keys".
</Tip>

Prepare a document (PDF, DOCX, image, XLSX, etc) to test with, or download a sample PDF from a demo pipeline at [this link](https://studio.reducto.ai/pipeline/demo-0).

## Method 1: use the Reducto SDKs

<Card title="Code Notebook Quickstart" icon="book" horizontal href="https://colab.research.google.com/drive/1xagcIu4FQT0PE4vugBKlZam07peU__8R?usp=sharing">
  See an interactive Colab notebook version of the API quickstart using the Python SDK.
</Card>

<Steps>
  <Step title="Install the SDK" stepNumber={1}>
    <CodeGroup>
      ```python Python theme={null}
      pip install reductoai
      ```

      ```javascript Javascript theme={null}
      npm i reductoai
      ```
    </CodeGroup>
  </Step>

  <Step title="Parse a Document" stepNumber={2}>
    If no configuration is provided, the Parse endpoint runs with the default settings. In most cases, this will work as is. For complex documents, refer to [our best practices guide](https://docs.reducto.ai/parsing/best-practices-parse).

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

      client = Reducto(api_key='REDUCTO_API_KEY')
      upload = client.upload(file=Path("sample.pdf"))
      result = client.parse.run(document_url=upload)

      print(result)
      ```

      ```javascript Javascript theme={null}
      import Reducto from 'reductoai';
      import fs from 'fs';

      const client = new Reducto({ apiKey: "YOUR_API_KEY" });

      async function main() {
        const upload = await client.upload({ file: fs.createReadStream("sample.pdf") });
        const result = await client.parse.run({ document_url: upload });
        
        console.log(result);
      }

      main();
      ```
    </CodeGroup>
  </Step>

  <Step title="Add custom configurations" stepNumber={3}>
    Reducto's APIs offer a wide range of configurations that customize for your use case. Check out our [API Reference](https://docs.reducto.ai/api-reference/parse) or the **Configurations** section for more.

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

      client = Reducto(api_key='REDUCTO_API_KEY')
      upload = client.upload(file=Path("sample.pdf"))
      result = client.parse.run(
        document_url=upload,
        options={ # Sample configurations
          "ocr_mode": "agentic",
          "extraction_mode": "ocr",
          "chunking": {
              "chunk_mode": "variable",
          }
        },
        advanced_options={
          "ocr_system": "multilingual",
          "page_range": {
              "start": 1,
              "end": 10,
          },
          "table_output_format": "ai_json",
          "merge_tables": True,
        },
        experimental_options={
          "enable_checkboxes": True,
          "return_figure_images": False,
          "rotate_pages": True,
        }
      )
      print(result)
      ```

      ```javascript Javascript theme={null}
      import Reducto from 'reductoai';
      import fs from 'fs';

      const client = new Reducto({ apiKey: "YOUR_API_KEY" });

      async function main() {      
        const upload = await client.upload({ file: fs.createReadStream("sample.pdf") });
        const result = await client.parse.run({ 
          document_url: upload,
          options: { // Sample configurations
            ocr_mode: "agentic",
            extraction_mode: "ocr",
            chunking: {
              chunk_mode: "variable"
            }
          },
          advanced_options: {
            ocr_system: "multilingual",
            page_range: {
              start: 1,
              end: 10
            },
            table_output_format: "ai_json",
            merge_tables: true
          },
          experimental_options: {
            enable_checkboxes: true,
            return_figure_images: false,
            rotate_pages: true
          }
        });
        
        console.log(result);
      }

      main();
      ```
    </CodeGroup>
  </Step>
</Steps>

✅ **You’ve parsed your first document!** You can now access all text, tables, and metadata in `result`. Learn to understand the result JSON format in the [response format guide.](https://docs.reducto.ai/parsing/response-format)

## Method 2: use the REST API endpoint

No SDK? Use cURL, Python `requests`, or `fetch`. All endpoints have an [API playground](https://docs.reducto.ai/api-reference/parse?playground=open) you can explore and use to get sample code.

<CodeGroup>
  ```python Python theme={null}
  import requests

  url = "https://platform.reducto.ai/parse"

  payload = {
      "options": {
        "ocr_mode": "agentic",
      },
      "advanced_options": {
        "page_range": {
          "start": 1,
          "end": 10,
        },
      },
      "priority": True
  }
  headers = {
      "Authorization": "Bearer REDUCTO_API_KEY",
      "Content-Type": "application/json"
  }

  response = requests.request("POST", url, json=payload, headers=headers)

  print(response.text)
  ```

  ```javascript Javascript theme={null}
  const options = {
    method: 'POST',
    headers: {
      Authorization: 'Bearer REDUCTO_API_KEY',
      'Content-Type': 'application/json'
    },
    body: '{"options":{"ocr_mode":"agentic"},"advanced_options":{"page_range":{"start":1,"end":10}},"priority":true}'
  };

  fetch('https://platform.reducto.ai/parse', options)
    .then(response => response.json())
    .then(response => console.log(response))
    .catch(err => console.error(err));
  ```

  ```bash cURL theme={null}
  curl -X POST https://platform.reducto.ai/parse \
    -H "Authorization: Bearer REDUCTO_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "options": {
        "ocr_mode": "agentic"
      },
      "advanced_options": {
        "page_range": {
          "start": 1,
          "end": 10
        }
      },
      "priority": true
    }'
  ```
</CodeGroup>

## Next steps

* Experiment with documents in [Studio](https://studio.reducto.ai/) to test out different configurations.
* Build end-to-end pipelines with **Upload → Parse → Extract**.
