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

# SDKs

> Install and use the official Pulse SDKs for Python and TypeScript.

Pulse publishes SDKs generated from the OpenAPI specification in the Fern configuration. Use the SDKs when you want typed request objects, consistent authentication, multipart upload handling, and generated helpers for long-running endpoints.

## Install

<CodeGroup>
  ```bash Python theme={null}
  pip install pulse-python-sdk
  ```

  ```bash TypeScript theme={null}
  npm install pulse-ts-sdk
  ```
</CodeGroup>

## Initialize A Client

<CodeGroup>
  ```python Python theme={null}
  import os
  from pulse import Pulse

  client = Pulse(api_key=os.environ["PULSE_API_KEY"])
  ```

  ```typescript TypeScript theme={null}
  import { PulseClient } from "pulse-ts-sdk";

  const client = new PulseClient({
    apiKey: process.env.PULSE_API_KEY!,
  });
  ```
</CodeGroup>

## First Request

<CodeGroup>
  ```python Python theme={null}
  from pulse import Pulse

  client = Pulse(api_key="YOUR_API_KEY")

  result = client.extract(
      file=open("document.pdf", "rb"),
  )

  print(result.extraction_id)
  print(result.markdown)
  ```

  ```typescript TypeScript theme={null}
  import { PulseClient } from "pulse-ts-sdk";
  import * as fs from "fs";

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

  const result = await client.extract({
    file: fs.createReadStream("document.pdf"),
  });

  console.log(result.extraction_id);
  console.log(result.markdown);
  ```
</CodeGroup>

## Environment

By default, SDK requests go to:

```text theme={null}
https://api.runpulse.com
```

For local testing or dedicated environments, pass the SDK environment/base URL option supported by your generated SDK version.

## Working With Async Jobs

Many Pulse endpoints accept `async: true`. In Python, use `async_` because `async` is a reserved keyword.

<CodeGroup>
  ```python Python theme={null}
  job = client.extract(
      file=open("large-document.pdf", "rb"),
      async_=True,
  )

  status = client.jobs.get_job(job_id=job.job_id)
  ```

  ```typescript TypeScript theme={null}
  const job = await client.extract({
    file: fs.createReadStream("large-document.pdf"),
    async: true,
  });

  const status = await client.jobs.getJob({ jobId: job.job_id });
  ```
</CodeGroup>

## SDK And API Reference

The API reference is generated from the same public contract used for SDK generation. If a parameter appears in the endpoint reference, prefer the matching SDK field rather than constructing raw HTTP requests by hand.

<CardGroup cols={2}>
  <Card title="API Quickstart" icon="rocket" href="/quickstart">
    Parse your first document with code.
  </Card>

  <Card title="Endpoint Reference" icon="book" href="/api-reference/introduction">
    Browse every public endpoint.
  </Card>

  <Card title="Chaining Steps" icon="link" href="/concepts/chaining">
    Connect Extract, Schema, Split, Tables, and Jobs.
  </Card>

  <Card title="Error Handling" icon="triangle-exclamation" href="/advanced/error-handling">
    Build resilient SDK integrations.
  </Card>
</CardGroup>
