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

# Set Up Your Extend Account

> Create an account, install the SDK, and make your first Extend call

Follow these steps to get an Extend account running alongside your existing Chunkr integration. You can keep both live while you validate.

<Steps>
  <Step title="Create an account and API key">
    1. Sign up at [extend.ai](https://extend.ai)
    2. Open the **Developers** page in the dashboard
    3. Create an API key and store it as `EXTEND_API_KEY`

    ```bash theme={"system"}
    export EXTEND_API_KEY="sk_..."
    ```

    <Tip>
      Extend offers **test-mode keys** that route to an isolated environment with no production data or webhooks. Use one while you migrate, then switch the key for production. See the [test environment guide](https://docs.extend.ai/general/test-environment-guide).
    </Tip>
  </Step>

  <Step title="Install the SDK">
    <CodeGroup>
      ```bash Python theme={"system"}
      pip install extend-ai
      ```

      ```bash TypeScript theme={"system"}
      npm install extend-ai
      ```
    </CodeGroup>

    Extend also ships [Java and Go SDKs](https://docs.extend.ai/sdks) and an `extend` CLI.
  </Step>

  <Step title="Make your first call">
    The Chunkr quickstart created a parse task and polled for it. On Extend, `create_and_poll` does both in one call.

    <CodeGroup>
      ```python Python theme={"system"}
      from extend_ai import Extend

      # Reads EXTEND_API_KEY from the environment
      client = Extend()

      run = client.parse_runs.create_and_poll(
          file={"url": "https://s3.us-east-1.amazonaws.com/chunkr-web/uploads/invoice.pdf"}
      )

      print(run.status)  # "PROCESSED"
      for chunk in run.output.chunks:
          print(chunk.content[:200])
      ```

      ```typescript TypeScript theme={"system"}
      import { ExtendClient } from "extend-ai";

      // Reads EXTEND_API_KEY from the environment
      const client = new ExtendClient();

      const run = await client.parseRuns.createAndPoll({
        file: { url: "https://s3.us-east-1.amazonaws.com/chunkr-web/uploads/invoice.pdf" },
      });

      console.log(run.status); // "PROCESSED"
      for (const chunk of run.output?.chunks ?? []) {
        console.log(chunk.content.slice(0, 200));
      }
      ```
    </CodeGroup>
  </Step>

  <Step title="Compare with your Chunkr output">
    Run the same document through both APIs and compare the markdown. The structure differs (see [Migrating Parse](/pages/migrate-to-extend/parse)) but the content should be equivalent. If something looks off, Extend's [Studio](https://docs.extend.ai/dashboard-quickstart) lets you inspect the run visually and tweak configuration before copying it into code.
  </Step>
</Steps>

## Side by side

Here is the Chunkr quickstart next to its Extend equivalent.

<CodeGroup>
  ```python Chunkr theme={"system"}
  import os
  import time
  from chunkr_ai import Chunkr

  client = Chunkr(api_key=os.environ["CHUNKR_API_KEY"])

  task = client.tasks.parse.create(
      file="https://s3.us-east-1.amazonaws.com/chunkr-web/uploads/invoice.pdf"
  )

  while not task.completed:
      task = client.tasks.parse.get(task_id=task.task_id)
      time.sleep(3)

  if task.status == "Succeeded":
      for chunk in task.output.chunks:
          print(chunk.embed)
  ```

  ```python Extend theme={"system"}
  from extend_ai import Extend

  client = Extend()

  run = client.parse_runs.create_and_poll(
      file={"url": "https://s3.us-east-1.amazonaws.com/chunkr-web/uploads/invoice.pdf"}
  )

  if run.status == "PROCESSED":
      for chunk in run.output.chunks:
          print(chunk.content)
  ```
</CodeGroup>

<Accordion title="Synchronous calls for quick tests">
  Extend also exposes synchronous endpoints that block until the result is ready. They have a hard **5-minute timeout**, so use them for testing and small files, and async runs for production.

  <CodeGroup>
    ```python Python theme={"system"}
    run = client.parse(
        file={"url": "https://s3.us-east-1.amazonaws.com/chunkr-web/uploads/invoice.pdf"}
    )
    ```

    ```typescript TypeScript theme={"system"}
    const run = await client.parse({
      file: { url: "https://s3.us-east-1.amazonaws.com/chunkr-web/uploads/invoice.pdf" },
    });
    ```
  </CodeGroup>
</Accordion>

## Next Steps

<Columns cols={2}>
  <Card title="Migrating Parse" href="/pages/migrate-to-extend/parse" icon="crop-simple">
    Update how you read chunks, blocks, and bounding boxes.
  </Card>

  <Card title="Migrating Extract" href="/pages/migrate-to-extend/extract" icon="brackets-curly">
    Adapt your schemas and read citations and confidence.
  </Card>
</Columns>


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