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

# Authentication

> Learn how to authenticate with the Pulse API

## Overview

All Pulse API endpoints require authentication using an API key — or, for autonomous agents without an account, a per-request [MPP payment](https://docs.runpulse.com/advanced/mpp-payments.md). The API key identifies your organization and tracks usage for billing purposes.

## Getting Your API Key

**1. Sign Up**

Create an account at [platform.runpulse.com/](https://platform.runpulse.com/)

**2. Generate API Key**

Navigate to the API Keys section in your dashboard

**3. Copy Your Key**

Click "Create New Key" and copy the generated key immediately

![Pulse API Keys page with the Create New API Key dialog open](https://mintcdn.com/pulseai/OJ897TEZf8bV6lk8/images/platform/create-api-key-content.png?fit=max\&auto=format\&n=OJ897TEZf8bV6lk8\&q=85\&s=c6e2f7b495ba30ae487945cd102e2ab3)

> [!WARNING]
>
> API keys are shown only once when created. Store them securely - you cannot retrieve them later.

## Using Your API Key

### With the Official SDKs (Recommended)

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

# Initialize the client with your API key
client = Pulse(api_key="YOUR_API_KEY")

# Extract a document
response = client.extract(
    file_url="https://platform.runpulse.com/api/examples/637e5678-30b1-45fa-acc4-877f2d636419/pdf"
)

print(f"Extraction ID: {response.extraction_id}")
print(f"Markdown: {response.markdown[:200]}...")
```

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

// Initialize the client with your API key
const client = new PulseClient({ 
    apiKey: 'YOUR_API_KEY'
});

// Extract a document
const response = await client.extract({
    fileUrl: "https://platform.runpulse.com/api/examples/637e5678-30b1-45fa-acc4-877f2d636419/pdf"
});

console.log(`Extraction ID: ${response.extraction_id}`);
console.log(`Markdown: ${response.markdown?.substring(0, 200)}...`);
```

```bash curl theme={null}
curl -X POST https://api.runpulse.com/extract \
  -H "x-api-key: YOUR_API_KEY" \
  -F "file=@document.pdf"
```

### Install the SDKs

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

```bash TypeScript theme={null}
npm install pulse-ts-sdk
```

## API Key Security

> [accordion] Best Practices
>
> * **Never expose API keys in client-side code** - Use server-side proxies
> * **Use environment variables** - Don't hardcode keys in your source code
> * **Rotate keys regularly** - Generate new keys periodically
> * **Use separate keys** - Different keys for development, staging, and production

> [accordion] Environment Variables
>
> Store your API key in environment variables:
>
> ```bash .env theme={null}
> PULSE_API_KEY=your_api_key_here
> ```
>
> ```python Python theme={null}
> import os
> from pulse import Pulse
>
> client = Pulse(api_key=os.getenv("PULSE_API_KEY"))
> ```
>
> ```typescript TypeScript theme={null}
> import { PulseClient } from 'pulse-ts-sdk';
>
> const client = new PulseClient({
>     apiKey: process.env.PULSE_API_KEY!
> });
> ```

> [accordion] Key Rotation
>
> To rotate your API key:
>
> 1. Generate a new key in the Platform
> 2. Update your application to use the new key
> 3. Verify the new key is working
> 4. Delete the old key from the Platform

## Managing API Keys

### View Active Keys

Access your API keys at the [Platform](https://platform.runpulse.com):

* See all active keys
* View creation dates
* Monitor usage per key
* Delete compromised keys

### Key Permissions

All API keys have full access to:

* Document extraction endpoints
* File upload endpoints
* Job management endpoints
* Webhook configuration

> [!NOTE]
>
> Fine-grained permissions are coming soon. Contact support if you need restricted access patterns.

## Troubleshooting

### Common Authentication Errors

> [accordion] AUTH\_001: API key is required
>
> **Solution**: Ensure you're providing your API key when initializing the client
>
> ```python Python theme={null}
> from pulse import Pulse
>
> client = Pulse(api_key="YOUR_API_KEY")
> ```
>
> ```typescript TypeScript theme={null}
> import { PulseClient } from "pulse-ts-sdk";
>
> const client = new PulseClient({
>     apiKey: "YOUR_API_KEY"
> });
> ```
>
> ```bash curl theme={null}
> # Include in all requests:
> -H "x-api-key: YOUR_API_KEY"
> ```

> [accordion] AUTH\_002: Invalid API key
>
> **Possible causes**:
>
> * Key was typed incorrectly
> * Key has been deleted
> * Using a key from a different environment
>
> **Solution**: Verify your key in the Platform and ensure you're copying it correctly

> [accordion] BILLING\_001: Monthly page limit exceeded
>
> **Solution**:
>
> * Check your usage in the Platform
> * Upgrade your plan for higher limits
> * Contact support for temporary limit increases

## Next Steps

> [card] [Quickstart Guide](https://docs.runpulse.com/quickstart.md)
>
> Start making your first API calls

> [card] [API Reference](https://docs.runpulse.com/api-reference/introduction.md)
>
> Explore available endpoints


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